romedtino / simple-wyze-vac

Home Assistant Custom Component for Wyze Vacuum
48 stars 8 forks source link

Error setting up entry Simple Wyze Vac #33

Closed brianhanifin closed 2 years ago

brianhanifin commented 2 years ago

The integration appears to login properly now. However, I am getting a new error. I get the same error whether I login with my primary or secondary Wyze account.

This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/simple_wyze_vac/__init__.py:69
Integration: Simple Wyze Vac (documentation)
First occurred: 1:00:00 PM (1 occurrences)
Last logged: 1:00:00 PM

Error setting up entry Simple Wyze Vac for simple_wyze_vac
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 339, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/simple_wyze_vac/__init__.py", line 69, in async_setup_entry
    if vac_info.current_map.rooms is not None:
  File "/usr/local/lib/python3.9/site-packages/wyze_sdk/models/devices/vacuums.py", line 380, in rooms
    return [VacuumMapRoom(**room) for room in map_data['12']]
  File "/usr/local/lib/python3.9/site-packages/wyze_sdk/models/devices/vacuums.py", line 380, in <listcomp>
    return [VacuumMapRoom(**room) for room in map_data['12']]
TypeError: wyze_sdk.models.devices.vacuums.VacuumMapRoom() argument after ** must be a mapping, not str

Wyze vacuums

  1. Family room vacuum
  2. Play room vacuum

Family room vacuum has been divided into 2 rooms:

  1. Family room
  2. Kitchen

Play room vacuum only has 1 room:

  1. Play room

    Home Assistant install

I have Simple Wyze Vac 1.7 installed.

id value
Version core-2022.6.2
Installation Type Home Assistant OS
Development false
Supervisor true
Docker true
User root
Virtual Environment false
Python Version 3.9.12
Operating System Family Linux
Operating System Version 5.15.41
CPU Architecture x86_64
Timezone America/Los_Angeles
romedtino commented 2 years ago

Is your vacuum using a firmware higher than 1.6.113 ? The custom component currently doesn't support any firmware higher than this. You can track support for this on the wyze-sdk issues page for it - https://github.com/shauntarves/wyze-sdk/issues/63

Granted, the custom component shouldn't crash when this happens. I should be able to roll out a fix for this in the coming days (hours if things look good).

brianhanifin commented 2 years ago

The new version appears to be working perfectly! I just started a clean cycle in the play room! Thank you!

I am running Wyze app 2.32.0 b7. That appears to give me access to newer firmware 1.6.202. The app gives me access to storing a second map (so one vacuum can clean a different floor). ... I can't wait to test that feature in my motorhome during me upcoming vacation. :)