Fix fan is_on status in xiaomi_miio (#146592)

This commit is contained in:
epenet 2025-06-12 12:18:23 +02:00 committed by GitHub
parent 9d1e60cf7e
commit 64e503bc27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -330,6 +330,12 @@ class XiaomiGenericDevice(
"""Return the percentage based speed of the fan."""
return None
@property
def is_on(self) -> bool | None:
"""Return true if device is on."""
# Base FanEntity uses percentage to determine if the device is on.
return self._attr_is_on
async def async_turn_on(
self,
percentage: int | None = None,