You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Xiaomi Mi Air Purifier 3H reports None as operating mode which is not a valid operating mode and reported as such by Home Assistant (logs are full of it).
Version information (please complete the following information):
OS: Linux/Docker
python-miio: 0.5.6
Device information:
Xiaomi Mi Air Purifier 3H but this is not device specifiv
To Reproduce
Just use HA with a Xiaomi Air Purifier and the logs will fill up.
Expected behavior
A standard operating mode should be reported.
Console output Update for fan.air_purifier fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 401, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 609, in async_device_update raise exc File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/fan.py", line 931, in async_update { File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/fan.py", line 932, in <dictcomp> key: self._extract_value_from_attribute(state, value) File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/fan.py", line 719, in _extract_value_from_attribute value = getattr(state, attribute) File "/usr/local/lib/python3.9/site-packages/miio/airpurifier_miot.py", line 113, in mode return OperationMode(self.data["mode"]) File "/usr/local/lib/python3.9/enum.py", line 360, in __call__ return cls.__new__(cls, value) File "/usr/local/lib/python3.9/enum.py", line 678, in __new__ raise ve_exc ValueError: None is not a valid OperationMode
The text was updated successfully, but these errors were encountered:
Describe the bug
Xiaomi Mi Air Purifier 3H reports
None
as operating mode which is not a valid operating mode and reported as such by Home Assistant (logs are full of it).Version information (please complete the following information):
Device information:
Xiaomi Mi Air Purifier 3H but this is not device specifiv
To Reproduce
Just use HA with a Xiaomi Air Purifier and the logs will fill up.
Expected behavior
A standard operating mode should be reported.
Console output
Update for fan.air_purifier fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 401, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 609, in async_device_update raise exc File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/fan.py", line 931, in async_update { File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/fan.py", line 932, in <dictcomp> key: self._extract_value_from_attribute(state, value) File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/fan.py", line 719, in _extract_value_from_attribute value = getattr(state, attribute) File "/usr/local/lib/python3.9/site-packages/miio/airpurifier_miot.py", line 113, in mode return OperationMode(self.data["mode"]) File "/usr/local/lib/python3.9/enum.py", line 360, in __call__ return cls.__new__(cls, value) File "/usr/local/lib/python3.9/enum.py", line 678, in __new__ raise ve_exc ValueError: None is not a valid OperationMode
The text was updated successfully, but these errors were encountered: