diff --git a/custom_components/smartir/light.py b/custom_components/smartir/light.py index 3aaa2484..e69e33d1 100644 --- a/custom_components/smartir/light.py +++ b/custom_components/smartir/light.py @@ -140,7 +140,6 @@ def __init__(self, hass, config, device_data): self._supported_controller, self._commands_encoding, self._controller_data, - self._delay, ) async def async_added_to_hass(self): @@ -298,11 +297,12 @@ async def async_turn_on(self, **params): self._power = STATE_ON await self.send_command(CMD_POWER_ON) - await self.async_write_ha_state() + self.async_write_ha_state() async def async_turn_off(self): self._power = STATE_OFF await self.send_command(CMD_POWER_OFF) + self.async_write_ha_state() async def async_toggle(self): await (self.async_turn_on() if not self.is_on else self.async_turn_off())