home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
74.08k stars 31.09k forks source link

[Xiaomi Miio integration] - Failed setup, will retry: `{'code': -5001, 'message': 'stuck'}` - `deerma.humidifier.jsq2w` #125894

Closed arunshekher closed 2 months ago

arunshekher commented 2 months ago

The problem

The Xiaomi Miio integration failed to set up my Xiaomi deerma.humidifier.jsq2w model humidifier.

Error message under the Xiaomi Miio integration:

Livingroom Humidifier No devices or entities Failed setup, will retry: {'code': -5001, 'message': 'stuck'}

Screen Shot 2024-09-12 at 7 08 50 PM Screen Shot 2024-09-12 at 6 02 22 PM

I used to encounter the message ERROR (MainThread) [homeassistant.components.xiaomi_miio] Unsupported device found! Please create an issue at https://github.com/syssi/xiaomi_airpurifier/issues and provide the following data: deerma.humidifier.jsq2w until the changes in August.

Currently, the Miio integration produces a different error, which is quoted in the logs section.

What version of Home Assistant Core has the issue?

2024.9.1

What was the last working version of Home Assistant Core?

No previous version has worked since I first bought this humidifier in May 2024.

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Xiaomi Miio

Link to integration documentation on our website

https://www.home-assistant.io/integrations/xiaomi_miio](https://www.home-assistant.io/integrations/xiaomi_miio

Diagnostics information

Logger: homeassistant.helpers.entity Source: helpers/entity.py:942 First occurred: 5:52:32 PM (8 occurrences) Last logged: 5:59:31 PM

Update for humidifier.deerma_humidifier_jsq2w fails Traceback (most recent call last):

File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 942, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1300, in async_device_update
    await self.async_update()
  File "/config/custom_components/xiaomi_miio_humidifier/humidifier.py", line 316, in async_update
    if self._device_features & FEATURE_SET_POWER_MODE == 1 and state.mode:
                                                               ^^^^^^^^^^
  File "/config/custom_components/xiaomi_miio_humidifier/humidifier_miot.py", line 122, in mode
    return PowerMode_V1(self.data.get("mode")).name
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/enum.py", line 757, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/enum.py", line 1171, in __new__
    raise ve_exc

ValueError: None is not a valid PowerMode_V1

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:942
First occurred: 5:52:32 PM (8 occurrences)
Last logged: 5:59:31 PM

Update for humidifier.deerma_humidifier_jsq2w fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 942, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1300, in async_device_update
    await self.async_update()
  File "/config/custom_components/xiaomi_miio_humidifier/humidifier.py", line 316, in async_update
    if self._device_features & FEATURE_SET_POWER_MODE == 1 and state.mode:
                                                               ^^^^^^^^^^
  File "/config/custom_components/xiaomi_miio_humidifier/humidifier_miot.py", line 122, in mode
    return PowerMode_V1(self.data.get("mode")).name
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/enum.py", line 757, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/enum.py", line 1171, in __new__
    raise ve_exc
ValueError: None is not a valid PowerMode_V1

Additional information

No response

home-assistant[bot] commented 2 months ago

Hey there @rytilahti, @syssi, @starkillerog, mind taking a look at this issue as it has been labeled with an integration (xiaomi_miio) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `xiaomi_miio` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign xiaomi_miio` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


xiaomi_miio documentation xiaomi_miio source (message by IssueLinks)

omerbitas commented 2 months ago

Hi, Having the same issue with Mi Robot Vacuum. started recently.

boxofrabbits commented 2 months ago

Hi, Having the same issue with Mi Robot Vacuum. started recently.

Me too. Started a few days ago. Doesn't seem to be passing 2fa.

saschachina commented 2 months ago

Maybe #102363

frenck commented 2 months ago

closed in #126873