mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix Xiaomi-miio humidifier write the state back when turning on or off (#53771)
This commit is contained in:
parent
6ffe0f6405
commit
a5824c3259
@ -139,6 +139,7 @@ class XiaomiGenericHumidifier(XiaomiCoordinatedMiioEntity, HumidifierEntity):
|
|||||||
)
|
)
|
||||||
if result:
|
if result:
|
||||||
self._state = True
|
self._state = True
|
||||||
|
self.async_write_ha_state()
|
||||||
|
|
||||||
async def async_turn_off(self, **kwargs) -> None:
|
async def async_turn_off(self, **kwargs) -> None:
|
||||||
"""Turn the device off."""
|
"""Turn the device off."""
|
||||||
@ -148,6 +149,7 @@ class XiaomiGenericHumidifier(XiaomiCoordinatedMiioEntity, HumidifierEntity):
|
|||||||
|
|
||||||
if result:
|
if result:
|
||||||
self._state = False
|
self._state = False
|
||||||
|
self.async_write_ha_state()
|
||||||
|
|
||||||
def translate_humidity(self, humidity):
|
def translate_humidity(self, humidity):
|
||||||
"""Translate the target humidity to the first valid step."""
|
"""Translate the target humidity to the first valid step."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user