-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mode and preset selection for Haier Aircons not working #265
Comments
same problem |
Same problem, |
Same problem. |
Same problem here :-) |
Same here, airco does turn off though. But HA still shows as 'on' |
Same problem. :( |
+1 |
same problem here with 0.14.0 and 2024.12.1 |
Same problem, hope you could take a look at it @Andre0512 |
+1 |
@Andre0512 do we need to start looking for an other integration? Tried the Givroux one, but it's missing sensors and entities. Could you please let us all know. |
Same issue here with AS35X and AS50XCAHRA |
Same problem using HA 14.1 and core 2024.12.5 |
Same problem. |
I'm having the same problem, but I'm not sure if this is related to an HA upgrade. I'm still running HA V2024.10.3 in a docker container that does not auto update. Both HON en PYHON are not updated since august 2024 and Hacks is from september. Is it possible that the Haier API is returning a different return code for turning off? I think that a 0 is a normal return code for this state. According to the Apple App store there are a serie of small bugfixes done on the Hon APP and in november they updated from 2.13 to 2.14. I looked in the code but I can't find the valid enum values, I think if we update the enum value for turning off to the correct value instead of 0 it will be fixed. |
I encountered the issue with turning off the AC using the Replace: self._device.sync_command("stopProgram", "settings") With: self._device.settings["settings.onOffStatus"].value = "0" This resolves the problem and ensures the AC turns off correctly. For anyone interested, I’ve shared my patched version of the integration here: Please note that this fork is not actively maintained. I hope this helps others facing the same issue! |
works for me too, great solution @sgmckay25 |
your fix work @sgmckay25 thanks!!! But I continue with this problem when I want to define a custom program (favorite program in hOn app) do you guys have the same error? |
Thanks for the fix! There are 2 instances of the original string so be sure to replace both. |
Can someone please confirm if the fix allows starting custom programs on an air conditioner? |
Describe the bug
till yesterday all was working fine, but now when I am trying to select preset mode "iot_heat" I am getting this error:
websocket_api script: Error executing script. Unexpected error for call_service at pos 1: Allowed values: ['2', '4', '5', '6', '7', '8'] But was: 0
To Reproduce
Steps to reproduce the behavior:
in HA go to Developer settings and trigger Action - Climate: Set preset mode with value iot_heat
Expected behavior
the preset heating shall be set, instead I am getting unknown error
I was thinking that it was caused by HA itself but I did the same thing with Tuya Thermostat (set HVAC preset/mode) and all is ok with this. So seems that it is only related to way how Haier controls the appliance mode
Screenshots
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
Home Assistant Logs
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 816, in handle_execute_script
script_result = await script_obj.async_run(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1801, in async_run
return await asyncio.shield(create_eager_task(run.async_run()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 464, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 528, in _async_step
self._handle_exception(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 558, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 764, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 727, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2802, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 800, in async_handle_set_preset_mode_service
await self.async_set_preset_mode(preset_mode)
File "/config/custom_components/hon/climate.py", line 232, in async_set_preset_mode
self._device.sync_command("startProgram", "settings")
File "/usr/local/lib/python3.12/site-packages/pyhon/appliance.py", line 311, in sync_command
self.sync_parameter(base_param, target_param)
File "/usr/local/lib/python3.12/site-packages/pyhon/appliance.py", line 326, in sync_parameter
target.value = main.value
^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyhon/parameter/enum.py", line 51, in value
raise ValueError(f"Allowed values: {self._values} But was: {value}")
ValueError: Allowed values: ['2', '4', '5', '6', '7', '8'] But was: 0
The text was updated successfully, but these errors were encountered: