Skip to content

Commit

Permalink
Merge pull request #30 from vincentwolsink/fix_setarr
Browse files Browse the repository at this point in the history
Fix error in async setattr syntax
  • Loading branch information
vincentwolsink authored Aug 28, 2023
2 parents e75ab46 + 5db6f0a commit f24eb36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/aguaiot/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async def async_turn_off(self):
"""Turn device off."""
try:
await self.hass.async_add_executor_job(
setattr(self._device, self.entity_description.key, False)
setattr, self._device, self.entity_description.key, False
)
await self.coordinator.async_request_refresh()
except AguaIOTError as err:
Expand All @@ -73,7 +73,7 @@ async def async_turn_on(self):
"""Turn device on."""
try:
await self.hass.async_add_executor_job(
setattr(self._device, self.entity_description.key, True)
setattr, self._device, self.entity_description.key, True
)
await self.coordinator.async_request_refresh()
except AguaIOTError as err:
Expand Down

0 comments on commit f24eb36

Please sign in to comment.