AirCon icon indicating copy to clipboard operation
AirCon copied to clipboard

Quiet mode breaks AirCon (sometimes)

Open hzpz opened this issue 4 years ago • 0 comments

I am experimenting with setting quiet mode via MQTT from Home Assistant (basically the same way as described in #105). However I noticed that the status topic doesn't always return "on" when the quiet mode is clearly active. It does work sometimes, but not always.

Looking at the logs, I found the following:

I0618 09:59:07.707 query_handlers.py:136] Decrypted: {"seq_no":27651,"data":{"name":"t_control_value","value":271189058}} E0618 09:59:07.708 query_handlers.py:89] Failed to handle {'seq_no': 27651, 'data': {'name': 't_control_value', 'value': 271189058}}. Exception = 1 is not a valid FanSpeed

On one occation I even encountered an exception:

E0618 12:03:03.388 web_protocol.py:393] Error handling request ValueError: 1 is not a valid FanSpeed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/aiohttp-3.7.4-py3.7-linux-armv7l.egg/aiohttp/web_protocol.py", line 422, in _handle_request resp = await self._request_handler(request) File "/usr/local/lib/python3.7/site-packages/aiohttp-3.7.4-py3.7-linux-armv7l.egg/aiohttp/web_app.py", line 499, in _handle resp = await handler(request) File "/app/aircon/query_handlers.py", line 62, in command_handler property_updater() #TODO: should be async as well? File "/app/aircon/aircon.py", line 185, in property_updater = lambda: self.update_property(name, typed_value) File "/app/aircon/aircon.py", line 255, in update_property super().update_property(name, value, notify_value) File "/app/aircon/aircon.py", line 130, in update_property self._update_controlled_properties(value) File "/app/aircon/aircon.py", line 507, in _update_controlled_properties fan_speed = control_value.get_fan_speed(control) File "/app/aircon/control_value.py", line 11, in get_fan_speed return FanSpeed(int_val) File "/usr/local/lib/python3.7/enum.py", line 315, in call return cls.new(cls, value) File "/usr/local/lib/python3.7/enum.py", line 569, in new raise exc File "/usr/local/lib/python3.7/enum.py", line 553, in new result = cls.missing(value) File "/usr/local/lib/python3.7/enum.py", line 582, in missing raise ValueError("%r is not a valid %s" % (value, cls.name)) ValueError: 1 is not a valid FanSpeed

I am not entirely sure if that was the cause, but soon after the AirCon integration in Home Assistant stopped working altogether. I had to restart it.

I am using Home Assistant 2021.5.5 with HiSense Air Conditioners add-on 0.3.9 and Mosquitto broker 6.0.1. My app code is hisense-eu, the model is Smart-1-110-eu.

hzpz avatar Jun 18 '21 15:06 hzpz