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

target_humidity missing after Home assistant upgrade #1974

Open
mwitkow opened this issue Oct 11, 2024 · 1 comment
Open

target_humidity missing after Home assistant upgrade #1974

mwitkow opened this issue Oct 11, 2024 · 1 comment
Labels

Comments

@mwitkow
Copy link

mwitkow commented Oct 11, 2024

Describe the bug
A clear and concise description of what the bug is.

Version information (please complete the following information):

  • OS: Ubuntu 24.04 LTS, Home Assistant Docker image >= 2024.09.01
  • python-miio: I think python-miio==0.5.12 (based on home ssistant manifest

Filed a related bug: home-assistant/core#128172

Device information:
If the issue is specific to a device [Use miiocli device --ip <ip address> --token <token> info]:

  • Model: zhimi.humidifier.ca1
  • Hardware version:
  • Firmware version:

To Reproduce
Steps to reproduce the behavior:

  1. Upgrade from 2024.06 to 2024.09.01 Home assistant.target_humidity is part of properties of hte humidifier

Expected behavior
A clear and concise description of what you expected to happen.

Console output

Sep 30 15:13:50 cerberus docker[3883124]: 2024-09-30 16:13:49.995 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Unexpected error fetching Smartmi Evaporative Humidifier Bedroom  data
Sep 30 15:13:50 cerberus docker[3883124]: Traceback (most recent call last):
Sep 30 15:13:50 cerberus docker[3883124]:   File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
Sep 30 15:13:50 cerberus docker[3883124]:     self.data = await self._async_update_data()
Sep 30 15:13:50 cerberus docker[3883124]:                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:13:50 cerberus docker[3883124]:   File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 271, in _async_update_data
Sep 30 15:13:50 cerberus docker[3883124]:     return await self.update_method()
Sep 30 15:13:50 cerberus docker[3883124]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:13:50 cerberus docker[3883124]:   File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/__init__.py", line 185, in update
Sep 30 15:13:50 cerberus docker[3883124]:     return await _async_fetch_data()
Sep 30 15:13:50 cerberus docker[3883124]:            ^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:13:50 cerberus docker[3883124]:   File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/__init__.py", line 180, in _async_fetch_data
Sep 30 15:13:50 cerberus docker[3883124]:     state = await hass.async_add_executor_job(device.status)
Sep 30 15:13:50 cerberus docker[3883124]:             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:13:50 cerberus docker[3883124]:   File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
Sep 30 15:13:50 cerberus docker[3883124]:     result = self.fn(*self.args, **self.kwargs)
Sep 30 15:13:50 cerberus docker[3883124]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:13:50 cerberus docker[3883124]:   File "/usr/local/lib/python3.12/site-packages/miio/click_common.py", line 184, in _wrap
Sep 30 15:13:50 cerberus docker[3883124]:     return func(self, *args, **kwargs)
Sep 30 15:13:50 cerberus docker[3883124]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:13:50 cerberus docker[3883124]:   File "/usr/local/lib/python3.12/site-packages/miio/integrations/humidifier/zhimi/airhumidifier.py", line 302, in status
Sep 30 15:13:50 cerberus docker[3883124]:     values = self.get_properties(properties, max_properties=_props_per_request)
Sep 30 15:13:50 cerberus docker[3883124]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:13:50 cerberus docker[3883124]:   File "/usr/local/lib/python3.12/site-packages/miio/device.py", line 240, in get_properties
Sep 30 15:13:50 cerberus docker[3883124]:     values.extend(self.send(property_getter, _props[:max_properties]))
Sep 30 15:13:50 cerberus docker[3883124]:                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:13:50 cerberus docker[3883124]:   File "/usr/local/lib/python3.12/site-packages/miio/device.py", line 107, in send
Sep 30 15:13:50 cerberus docker[3883124]:     return self._protocol.send(
Sep 30 15:13:50 cerberus docker[3883124]:            ^^^^^^^^^^^^^^^^^^^^
Sep 30 15:13:50 cerberus docker[3883124]:   File "/usr/local/lib/python3.12/site-packages/miio/miioprotocol.py", line 202, in send
Sep 30 15:13:50 cerberus docker[3883124]:     self.__id = payload["id"]
Sep 30 15:13:50 cerberus docker[3883124]:                 ~~~~~~~^^^^^^
Sep 30 15:13:50 cerberus docker[3883124]: TypeError: byte indices must be integers or slices, not str
@mwitkow mwitkow added the bug label Oct 11, 2024
@mwitkow
Copy link
Author

mwitkow commented Oct 11, 2024

This was a red herring. Seems to be a change in home assistant. home-assistant/core#128172

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

No branches or pull requests

1 participant