parent
be05a749c5
commit
72c1273d25
|
@ -222,7 +222,7 @@ class CommandCover(ManualTriggerEntity, CoverEntity):
|
||||||
if payload:
|
if payload:
|
||||||
self._state = int(payload)
|
self._state = int(payload)
|
||||||
self._process_manual_data(payload)
|
self._process_manual_data(payload)
|
||||||
await self.async_update_ha_state(True)
|
self.async_write_ha_state()
|
||||||
|
|
||||||
async def async_update(self) -> None:
|
async def async_update(self) -> None:
|
||||||
"""Update the entity.
|
"""Update the entity.
|
||||||
|
|
|
@ -238,7 +238,7 @@ class CommandSwitch(ManualTriggerEntity, SwitchEntity):
|
||||||
if payload or value:
|
if payload or value:
|
||||||
self._attr_is_on = (value or payload).lower() == "true"
|
self._attr_is_on = (value or payload).lower() == "true"
|
||||||
self._process_manual_data(payload)
|
self._process_manual_data(payload)
|
||||||
await self.async_update_ha_state(True)
|
self.async_write_ha_state()
|
||||||
|
|
||||||
async def async_update(self) -> None:
|
async def async_update(self) -> None:
|
||||||
"""Update the entity.
|
"""Update the entity.
|
||||||
|
|
Loading…
Reference in New Issue