From 42f01d4eb8db44cc98f50179b7e59b27455872d6 Mon Sep 17 00:00:00 2001 From: "Alan D. Tse" Date: Thu, 24 Mar 2022 21:24:03 -0700 Subject: [PATCH] fix: fix polling switch enable api call Fix changes to function signature which broke the polling switch. closes #142 --- custom_components/tesla_custom/switch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/tesla_custom/switch.py b/custom_components/tesla_custom/switch.py index bf1937d6..e0ea9ac2 100644 --- a/custom_components/tesla_custom/switch.py +++ b/custom_components/tesla_custom/switch.py @@ -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