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
Line 184 refers to self.model, but I guess this should be self._model as defined in Device.py.
Additionally, since the model is considered optional, a fallback is needed (was in the constructor which is removed by your changes).
Could you please take a look at this before releasing your changes?
Console output
File "/usr/local/lib/python3.9/site-packages/miio/airdehumidifier.py", line 184, in status,
AttributeError: 'AirDehumidifier' object has no attribute 'model',
self.model, AVAILABLE_PROPERTIES[MODEL_DEHUMIDIFIER_V1],
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run,
result = self.fn(*self.args, **self.kwargs),
File "/config/custom_components/xiaomi_miio_airpurifier/climate.py", line 435, in async_update,
state = await self.hass.async_add_executor_job(self._device.status),
await task,
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 618, in async_device_update,
await entity.async_device_update(warning=False),
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity,
Traceback (most recent call last):,
2021-09-28 19:47:36 ERROR (MainThread) [homeassistant.components.climate] xiaomi_miio_airpurifier: Error on device update!
The text was updated successfully, but these errors were encountered:
The _model is an internal variable to allow model detection override, so the line in the file trying to access model is correct. Line 184 also does fallback (to use AVAILABLE_PROPERTIES[MODEL_DEHUMIDIFIER_V1]), but it's failing here due to that exception.
Thanks for your quick response! pip show python-miio tells me 0.5.8 was installed locally.
The model property does not exist for this version in device.py.
I'm seeing now that I didn't make local changes of PR #1038 which are in the 'next' branch.
I guess my bug report is not really a bug, sorry for the confusion, this issue can be closed.
Hopefully your changes can be released soon and integrated into HA and the xiaomi_airpurifier integration, cause things are a bit broken now (as described in syssi/xiaomi_airpurifier#206).
In the meantime I managed to fix things on my setup, I will not update HA until things are settled.
Describe the bug
Code error.
Related to PR #1146 and syssi/xiaomi_airpurifier#206.
I tried to apply your PR locally to fix the broken integration.
Line 184 refers to
self.model
, but I guess this should beself._model
as defined in Device.py.Additionally, since the model is considered optional, a fallback is needed (was in the constructor which is removed by your changes).
Could you please take a look at this before releasing your changes?
Console output
The text was updated successfully, but these errors were encountered: