marotoweb / home-assistant-vacuum-viomise

Hacky Home assistant support for Viomi SE (V-RVCLM21A)
21 stars 3 forks source link

Dont Work with core-2022.3.3 #16

Closed jovanotti25 closed 2 years ago

jovanotti25 commented 2 years ago

Turn vacuum unavailable

kamwill commented 2 years ago

I have the same issue, with following error Platform error vacuum.viomise - cannot import name 'Vacuum' from 'miio' (/usr/local/lib/python3.9/site-packages/miio/init.py)

AybimYazilim commented 2 years ago

Change 6. line in vacuum.py file from

from miio import DeviceException, Vacuum # pylint: disable=import-error to from miio import ViomiVacuum, DeviceException # pylint: disable=import-error

and change 165. line from

vacuum = Vacuum(host, token) to vacuum = ViomiVacuum(host, token)

then restart to home assistant. it will work.

Raddii commented 2 years ago

On line 165, it's not:

vacuum = Vacuum(host, token)

only is:

for vacuum in target_vacuums:
  update_coro = vacuum.async_update_ha_state(True)
  update_tasks.append(update_coro)
le-vive commented 2 years ago

Still get the issue: core-2022.4.2

configuration validation's error:

Platform error vacuum.viomise - cannot import name 'Vacuum' from 'miio' (/usr/local/lib/python3.9/site-packages/miio/init.py)

I did no change from the configuration.yaml, only update the core (so the config should be still good).

jovanotti25 commented 2 years ago

Still get the issue: core-2022.4.2

configuration validation's error:

Platform error vacuum.viomise - cannot import name 'Vacuum' from 'miio' (/usr/local/lib/python3.9/site-packages/miio/init.py)

I did no change from the configuration.yaml, only update the core (so the config should be still good).

try to make

Change 6. line in vacuum.py file from

from miio import DeviceException, Vacuum # pylint: disable=import-error to from miio import ViomiVacuum, DeviceException # pylint: disable=import-error

and change 165. line from

vacuum = Vacuum(host, token) to vacuum = ViomiVacuum(host, token)

then restart to home assistant. it will work.

moshriq commented 2 years ago

@AybimYazilim Thanks for suggested solution, is there any a way to make it work with an offline vacuum? it only work if i'ts connected to internet