nergal / homeassistant-vacuum-viomi

Integration of a Xiaomi Viomi vacuum to a Home Assistant
MIT License
54 stars 14 forks source link

After update HA to 2021.12 xiaomi_viomi: Error on device update! #17

Closed Jimmyboy83 closed 2 years ago

Jimmyboy83 commented 2 years ago

Hi! Thank you for your integration There is an issue after HA 2021.12 update Can you help? Vacuum is V-RVCLM21B viomi.vacuum.v6

xiaomi_viomi: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 684, in async_device_update await task 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_viomi/vacuum.py", line 242, in update self._fan_speeds = state.fan_speed_presets() File "/usr/local/lib/python3.9/site-packages/miio/click_common.py", line 179, in _wrap if gco is not None and gco.output is not None: AttributeError: 'ViomiVacuumStatus' object has no attribute '_model'

fabjsousa commented 2 years ago

Hello @nergal ! Happy New Year!!

I have the same problem with my Viomi Vaccum v8.

After the HA boot I have this error:

Unable to prepare setup for platform xiaomi_viomi.vacuum: Platform not found (No module named 'miio.viomivacuum').

A few minutes later I have the same error than @Jimmyboy83:

Logger: homeassistant.components.vacuum
Source: custom_components/xiaomi_viomi/vacuum.py:242
Integration: Vacuum (documentation, issues)
First occurred: 8:02:26 PM (1 occurrences)
Last logged: 8:02:26 PM

xiaomi_viomi: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 684, in async_device_update
    await task
  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_viomi/vacuum.py", line 242, in update
    self._fan_speeds = state.fan_speed_presets()
  File "/usr/local/lib/python3.9/site-packages/miio/click_common.py", line 179, in _wrap
    if gco is not None and gco.output is not None:
AttributeError: 'ViomiVacuumStatus' object has no attribute '_model' 

Can you help us?

Thank you

marceloquito commented 2 years ago

Any update on this? Same problem here

nergal commented 2 years ago

I've made a few fixes to support the latest HA build and now it seems to be good. Tested on 2021.12.8.

Would be great if you guys can test it (v0.0.3) and put some feedback here so I can close the ticket.

fabjsousa commented 2 years ago

@nergal all good! Thank you for your attention 💪