Skip to content

Commit

Permalink
fix: fix polling switch enable api call
Browse files Browse the repository at this point in the history
Fix changes to function signature which broke the polling switch.

closes #142
  • Loading branch information
alandtse committed Mar 25, 2022
1 parent 1e18823 commit 42f01d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/tesla_custom/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ def unique_id(self) -> str:
async def async_turn_on(self, **kwargs):
"""Send the on command."""
_LOGGER.debug("Enable polling: %s %s", self.name, self.tesla_device.id())
self.controller.set_updates(self.tesla_device.id(), True)
self.controller.set_updates(car_id=self.tesla_device.id(), value=True)
self.async_write_ha_state()

async def async_turn_off(self, **kwargs):
"""Send the off command."""
_LOGGER.debug("Disable polling: %s %s", self.name, self.tesla_device.id())
self.controller.set_updates(self.tesla_device.id(), False)
self.controller.set_updates(car_id=self.tesla_device.id(), value=False)
self.async_write_ha_state()

@property
Expand Down

0 comments on commit 42f01d4

Please sign in to comment.