syssi / xiaomi_airconditioningcompanion

Xiaomi Mi and Aqara Air Conditioning Companion integration for Home Assistant
Apache License 2.0
398 stars 94 forks source link

Target temperature and fan speed set wrongly #149

Open mouth4war opened 2 years ago

mouth4war commented 2 years ago

After the device goes unavailable (say after a power cut), once it comes back the target temperature is set to a new value which isn't the last set value.

Say it was at 26C, then goes unavailable. It comes back online in HASS at 20C.

mouth4war commented 2 years ago

Looking at the log, it looks like air_condition_configuration is changing and also the target temperature, led (false vs none), fan_speed (medium vs auto), :

from:

2022-04-14 18:13:44 DEBUG (MainThread) [custom_components.xiaomi_miio_airconditioningcompanion.climate] Got new state: <AirConditioningCompanionStatus air_condition_brand=519 air_condition_configuration=11101CA1 air_condition_model=b'\x01\x05\x02\x07\x00\x01\x122\x01' air_condition_remote=70194 device_type=5 fan_speed=FanSpeed.Medium is_on=True led=False load_power=108 mode=OperationMode.Cool model_format=1 power=on power_socket=None state_format=1 swing_mode=SwingMode.On target_temperature=28>

to:

2022-04-14 18:14:44 DEBUG (MainThread) [custom_components.xiaomi_miio_airconditioningcompanion.climate] Got new state: <AirConditioningCompanionStatus air_condition_brand=519 air_condition_configuration=111019B1 air_condition_model=b'\x01\x05\x02\x07\x00\x01\x122\x01' air_condition_remote=70194 device_type=5 fan_speed=FanSpeed.Medium is_on=True led=None load_power=640 mode=OperationMode.Cool model_format=1 power=on power_socket=None state_format=1 swing_mode=SwingMode.On target_temperature=25>

syssi commented 2 years ago

I am afraid you are describing the firmware behavior of the acpartner and the situation cannot be improved without introducing limitations.

syssi commented 2 years ago

I've released a new version skipping target temperature reading of an unavailable target temperature sensor. I hope this improves your situation too.