Skip to content

Error while setting up xiaomi_miot platform for fan #2357

@steuerzentrale

Description

@steuerzentrale

Hi there

first of all thanks for this nice piece of software! Since the latest update the add-on on version 1.0.9 I receive the below error in the logs. Its about the device zhimi.fan.za5. all entities (like negative ion-mode or horizontal swing) are enabled and can be controlled, however for example fan.wohnzimmer_ventilator is not being provided and I cannot turn on the fan with the fan-entity. Please find attached the screenshot

Core 2025.2.2
Supervisor 2025.02.0
Operating System 14.2
Frontend 20250210.0

Logger: homeassistant.components.fan
Quelle: helpers/entity_platform.py:366
Integration: Ventilator (Dokumentation, Probleme)
Erstmals aufgetreten: 13:19:24 (2 Vorkommnisse)
Zuletzt protokolliert: 13:19:56

Error while setting up xiaomi_miot platform for fan: 'FanEntity' object has no attribute '_supported_features'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 366, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/xiaomi_miot/fan.py", line 46, in async_setup_entry
HassEntry.init(hass, config_entry).new_adder(ENTITY_DOMAIN, async_add_entities)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/xiaomi_miot/core/hass_entry.py", line 107, in new_adder
device.add_entities(domain)
~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/config/custom_components/xiaomi_miot/core/device.py", line 608, in add_entities
entity = cls(self, conv)
File "/config/custom_components/xiaomi_miot/core/hass_entity.py", line 144, in init
self.on_init()
~~~~~~~~~~~~^^
File "/config/custom_components/xiaomi_miot/fan.py", line 123, in on_init
self._supported_features &= ~FanEntityFeature.PRESET_MODE
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'FanEntity' object has no attribute '_supported_features'. Did you mean: 'supported_features'?

Dieser Fehler stammt von einer benutzerdefinierten Integration

Logger: custom_components.xiaomi_miot.core.xiaomi_cloud
Quelle: custom_components/xiaomi_miot/core/xiaomi_cloud.py:804
Integration: Xiaomi Miot Auto (Dokumentation, Probleme)
Erstmals aufgetreten: 13:42:49 (11 Vorkommnisse)
Zuletzt protokolliert: 18:26:56

Error while executing request to https://api.io.mi.com/app/miotspec/prop/get:
Error while executing request to https://api.io.mi.com/app/scene/history:

Dieser Fehler stammt von einer benutzerdefinierten Integration

Logger: custom_components.xiaomi_miot.core.xiaomi_cloud
Quelle: custom_components/xiaomi_miot/core/xiaomi_cloud.py:249
Integration: Xiaomi Miot Auto (Dokumentation, Probleme)
Erstmals aufgetreten: 13:42:49 (11 Vorkommnisse)
Zuletzt protokolliert: 18:26:56

Request xiaomi api: miotspec/prop/get {'params': [{'did': '1092091339', 'siid': 9, 'piid': 1}, {'did': '1092091339', 'siid': 9, 'piid': 2}, {'did': '1092091339', 'siid': 9, 'piid': 3}, {'did': '1092091339', 'siid': 5, 'piid': 1}, {'did': '1092091339', 'siid': 5, 'piid': 2}, {'did': '1092091339', 'siid': 3, 'piid': 1}, {'did': '1092091339', 'siid': 4, 'piid': 1}, {'did': '1092091339', 'siid': 2, 'piid': 1}, {'did': '1092091339', 'siid': 2, 'piid': 2}]} failed, response: None
Request xiaomi api: miotspec/prop/get {'params': [{'did': '1092073507', 'siid': 9, 'piid': 1}, {'did': '1092073507', 'siid': 9, 'piid': 2}, {'did': '1092073507', 'siid': 9, 'piid': 3}, {'did': '1092073507', 'siid': 5, 'piid': 1}, {'did': '1092073507', 'siid': 5, 'piid': 2}, {'did': '1092073507', 'siid': 3, 'piid': 1}, {'did': '1092073507', 'siid': 4, 'piid': 1}, {'did': '1092073507', 'siid': 2, 'piid': 1}, {'did': '1092073507', 'siid': 2, 'piid': 2}]} failed, response: None
Request xiaomi api: miotspec/prop/get {'params': [{'did': '1049527488', 'siid': 9, 'piid': 1}, {'did': '1049527488', 'siid': 9, 'piid': 2}, {'did': '1049527488', 'siid': 9, 'piid': 3}, {'did': '1049527488', 'siid': 5, 'piid': 1}, {'did': '1049527488', 'siid': 5, 'piid': 2}, {'did': '1049527488', 'siid': 3, 'piid': 1}, {'did': '1049527488', 'siid': 4, 'piid': 1}, {'did': '1049527488', 'siid': 2, 'piid': 1}, {'did': '1049527488', 'siid': 2, 'piid': 2}]} failed, response: None
Request xiaomi api: scene/history {'home_id': 589001421464, 'uid': 6588300180, 'owner_uid': 6588300180, 'command': 'history', 'limit': 15} failed, response: None
Request xiaomi api: miotspec/prop/get {'params': [{'did': '551156574', 'siid': 7, 'piid': 1}, {'did': '551156574', 'siid': 6, 'piid': 1}, {'did': '551156574', 'siid': 6, 'piid': 2}, {'did': '551156574', 'siid': 6, 'piid': 3}, {'did': '551156574', 'siid': 2, 'piid': 1}, {'did': '551156574', 'siid': 2, 'piid': 2}, {'did': '551156574', 'siid': 2, 'piid': 3}, {'did': '551156574', 'siid': 2, 'piid': 5}]} failed, response: None

Image Image

Would be awesome if you could have a look into it.

Best,
Andrew

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions