Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xiaomi Miio Vacuum not working since 0.112 #37610

Closed
rb-26 opened this issue Jul 7, 2020 · 6 comments · Fixed by #38300
Closed

Xiaomi Miio Vacuum not working since 0.112 #37610

rb-26 opened this issue Jul 7, 2020 · 6 comments · Fixed by #38300
Assignees
Labels
integration: xiaomi_miio waiting-for-upstream We're waiting for a change upstream

Comments

@rb-26
Copy link

rb-26 commented Jul 7, 2020

The problem

Vacuum cleaner is failing to be recognised since 0.112

Environment

  • Home Assistant Core release with the issue: 0.112 and onwards
  • Last working Home Assistant Core release (if known): All versions prior to 0.112
  • Operating environment (OS/Container/Supervised/Core): OS
  • Integration causing this issue: Xiaomi Miio
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/vacuum.xiaomi_miio

Problem-relevant configuration.yaml

vacuum:
  - platform: xiaomi_miio
    host: 192.168.1.33
    token: token_is_here

Traceback/Error logs

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 186, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 451, in _async_add_entity
    entity.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 290, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 317, in _async_write_ha_state
    attr.update(self.device_state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/vacuum.py", line 333, in device_state_attributes
    if self.timers:
  File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/vacuum.py", line 284, in timers
    for timer in self._timers
  File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/vacuum.py", line 284, in <listcomp>
    for timer in self._timers
  File "/usr/local/lib/python3.7/site-packages/miio/vacuumcontainers.py", line 444, in next_schedule
    local_tz = timezone(self.timezone)
  File "/usr/local/lib/python3.7/site-packages/pytz/__init__.py", line 163, in timezone
    if zone.upper() == 'UTC':
AttributeError: 'dict' object has no attribute 'upper'

Additional information

@probot-home-assistant
Copy link

Hey there @rytilahti, @syssi, mind taking a look at this issue as its been labeled with an integration (xiaomi_miio) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@Writech
Copy link

Writech commented Jul 7, 2020

I have the same issue - Xiaomi Vacuum stopped working since couple of HA versions ago.

I'm using Home Assistant 0.112.3 on Raspberry Pi 4.

Looking at the logs I'm getting 2020-07-07 16:29:48 WARNING (SyncWorker_10) [homeassistant.components.xiaomi_miio.vacuum] Got exception while fetching the state: Got checksum error which indicates use of an invalid token. Please check your token! which indicates I have invalid token. I went through the token retrieval process on iOS again and got the new token but this didn't fix the issue. I'm still getting the before mentioned error even with freshly retrieved token.

@xMariusz
Copy link

xMariusz commented Jul 8, 2020

Any solution? Miio light stop working too

light 1:
  - platform: xiaomi_miio
    name: light
    host: 192.168.1.64
    token: 0883e673e5e78a8c13ebed630***********
    model: philips.light.sread1

@beliy1985
Copy link

I have the same issue - Xiaomi Vacuum stopped working(xiaomi e220)

@Kanishkaz
Copy link

Similar issue. Xiaomi zimi.powerstrip.v2 has stopped working and is unavailable.

switch: 
- platform: xiaomi_miio
    name: Original Xiaomi Power Strip
    host: 192.168.1.170
    token: ff66eb65376b629d03a6***********
    model: zimi.powerstrip.v2

@rytilahti
Copy link
Member

rytilahti commented Jul 14, 2020

Original issue fixed in upstream: rytilahti/python-miio#760

The problems @Writech, @xMariusz and @Kanishkaz reported are not related to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration: xiaomi_miio waiting-for-upstream We're waiting for a change upstream
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants