Skip to content

Commit

Permalink
Merge pull request #134 from make-all/lights
Browse files Browse the repository at this point in the history
Light: changes required to work in current HA
  • Loading branch information
litinoveweedle committed Sep 22, 2024
2 parents 60cc183 + 6da1af3 commit 9636076
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/smartir/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit 9636076

Please sign in to comment.