Skip to content
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

air purifier unknown oprating mode #1106

Closed
leonardpitzu opened this issue Aug 4, 2021 · 0 comments · Fixed by #1111
Closed

air purifier unknown oprating mode #1106

leonardpitzu opened this issue Aug 4, 2021 · 0 comments · Fixed by #1111
Labels

Comments

@leonardpitzu
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant