-
-
Notifications
You must be signed in to change notification settings - Fork 32k
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 does not support Xiaomi Air Purifier Compact correctly (added in 2024.8) #123010
Comments
Hey there @rytilahti, @syssi, @starkillerOG, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) xiaomi_miio documentation |
FWIW: Same error on 2024.8 release, but with different key: 2024-08-09 11:13:55.395 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: zhimi.airp.cpa4
2024-08-09 11:14:03.432 ERROR (MainThread) [homeassistant.components.fan] Error while setting up xiaomi_miio platform for fan
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
await asyncio.shield(awaitable)
File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/fan.py", line 215, in async_setup_entry
coordinator = hass.data[DOMAIN][config_entry.entry_id][KEY_COORDINATOR]
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01J46M650QAJYX0HC4ENN81RW2'
2024-08-09 11:14:03.438 ERROR (MainThread) [homeassistant.components.number] Error while setting up xiaomi_miio platform for number
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
await asyncio.shield(awaitable)
File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/number.py", line 294, in async_setup_entry
device = hass.data[DOMAIN][config_entry.entry_id][KEY_DEVICE]
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01J46M650QAJYX0HC4ENN81RW2'
2024-08-09 11:14:03.442 ERROR (MainThread) [homeassistant.components.select] Error while setting up xiaomi_miio platform for select
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
await asyncio.shield(awaitable)
File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/select.py", line 223, in async_setup_entry
device = hass.data[DOMAIN][config_entry.entry_id][KEY_DEVICE]
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01J46M650QAJYX0HC4ENN81RW2'
2024-08-09 11:14:03.445 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up xiaomi_miio platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
await asyncio.shield(awaitable)
File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/sensor.py", line 820, in async_setup_entry
device = hass.data[DOMAIN][config_entry.entry_id][KEY_DEVICE]
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01J46M650QAJYX0HC4ENN81RW2'
2024-08-09 11:14:03.465 ERROR (MainThread) [homeassistant.components.switch] Error while setting up xiaomi_miio platform for switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
await asyncio.shield(awaitable)
File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/switch.py", line 346, in async_setup_entry
await async_setup_coordinated_entry(hass, config_entry, async_add_entities)
File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/switch.py", line 355, in async_setup_coordinated_entry
device = hass.data[DOMAIN][config_entry.entry_id][KEY_DEVICE]
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01J46M650QAJYX0HC4ENN81RW2' Again, this is with patching the running container to use Without that, nothing even happens besides the first error: 2024-08-09 11:13:55.395 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: zhimi.airp.cpa4 /cc @tanchu who added support for this model in #117791 edit: In {
"created_at": "2024-08-01T09:26:25.559694+00:00",
"data": {
"config_flow_device": "device",
"host": "192.168.1.27",
"token": "331a3ec6<snip redacted>91b",
"model": "zhimi.airp.cpa4",
"mac": "dc:ed:83:47:3b:ce",
"cloud_username": "<snip redacted>",
"cloud_password": "<snip redacted>",
"cloud_country": "de"
},
"disabled_by": null,
"domain": "xiaomi_miio",
"entry_id": "01J46M650QAJYX0HC4ENN81RW2",
"minor_version": 1,
"modified_at": "2024-08-01T09:26:25.559733+00:00",
"options": {},
"pref_disable_new_entities": false,
"pref_disable_polling": false,
"source": "user",
"title": "Xiaomi Smart Air Purifier 4 Compact",
"unique_id": "dc:ed:83:47:3b:ce",
"version": 1
} in the |
I'm still puzzled on how this made it into core, if the PR was incorrect (wrong model) and simply not working. |
The problem
2024.8.0b0 supposedly added support for the Xiaomi Air Purifier Compact through #117791, but it does not load correctly on my system and throws a bunch of errors.
The PR adds support for the device identifier
xiaomi.airp.cpa4
but the devices reports itself aszhimi.airp.cpa4
. Patching this in my running container does not make a difference.What version of Home Assistant Core has the issue?
core-2024.8.0b0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Xiaomi Miio
Link to integration documentation on our website
https://www.home-assistant.io/integrations/xiaomi_miio/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: