romedtino / simple-wyze-vac

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

Added an offline vac, removed it, and cannot add the new one #31

Closed L13V closed 1 year ago

L13V commented 2 years ago

I just moved into my new house. I used to only have one Wyze vac, but now I have a new one for the bottom floor.

The old vac is not active yet, but it was still registered to my house. I accidentally added it to home assistant with your integration, and then promptly removed it.

I set up the new vac and removed the old one from my account. And I cannot add it back to home assistant.

I'm getting this error. It said something about mapping, and I did a small mapping of my house. Not a full one, to try and fix the issue.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, 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

What does this error mean?

romedtino commented 2 years ago

Do you mind sharing your Wyze Vacuum Firmware information? It could be the newer vacuum has a different firmware than what we've seen before.

If you can share the info you get from:

Wyze App -> Your Vacuum -> Cog Wheel, top right -> Device Info

Ideally, the firmware version and the plugin version.

If it is not 1.6.113, then you might have the newer multi-level firmware which we haven't seen yet.

L13V commented 2 years ago

I am running 1.6.202 currently. I will try remapping the downstairs when I get home, to see if that works

imhotep commented 1 year ago

@romedtino I have the same issue and I am running 1.6.113. Any idea what could cause the error?

romedtino commented 1 year ago

I think HACS had rate limit issues on GitHub today and affected custom components, mind restarting your Home Assistant and see if it reloads? Reloading the integration might be enough but restaring the whole HA might be better.

pjuhl2313 commented 1 year ago

I'm having the same issue and restarting HA doesn't fix it.

imhotep commented 1 year ago

@romedtino This PR fixed it. It's not failing anymore for me! Thanks!

pjuhl2313 commented 1 year ago

@imhotep What did you do to fix it?

Edit: nevermind, new update worked. Thanks!!

imhotep commented 1 year ago

@pjuhl2313 Just updated to the latest version (via HACS) that includes some code changes. It looks like it crashes if there are no room maps so the latest version submitted by @romedtino fixes it.

romedtino commented 1 year ago

Seems like the workaround is working for people so I'm going to close this issue.