Fix Xiaomi-miio humidifier write the state back when turning on or off (#53771)
This commit is contained in:
parent
6ffe0f6405
commit
a5824c3259
1 changed files with 2 additions and 0 deletions
|
@ -139,6 +139,7 @@ class XiaomiGenericHumidifier(XiaomiCoordinatedMiioEntity, HumidifierEntity):
|
|||
)
|
||||
if result:
|
||||
self._state = True
|
||||
self.async_write_ha_state()
|
||||
|
||||
async def async_turn_off(self, **kwargs) -> None:
|
||||
"""Turn the device off."""
|
||||
|
@ -148,6 +149,7 @@ class XiaomiGenericHumidifier(XiaomiCoordinatedMiioEntity, HumidifierEntity):
|
|||
|
||||
if result:
|
||||
self._state = False
|
||||
self.async_write_ha_state()
|
||||
|
||||
def translate_humidity(self, humidity):
|
||||
"""Translate the target humidity to the first valid step."""
|
||||
|
|
Loading…
Add table
Reference in a new issue