forked from home-assistant/core
Fix Xiaomi-miio humidifier write the state back when turning on or off (#53771)
This commit is contained in:
committed by
Paulus Schoutsen
parent
0aee659ee9
commit
958df580a9
@@ -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."""
|
||||
|
Reference in New Issue
Block a user