From c229ca4b6e8d18e2a3dbac7ea3e7cff74596d3f2 Mon Sep 17 00:00:00 2001 From: Matthieu Date: Sun, 11 Apr 2021 17:59:16 +0200 Subject: [PATCH] Fix lock change --- custom_components/georide/manifest.json | 2 +- custom_components/georide/switch.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/georide/manifest.json b/custom_components/georide/manifest.json index 0ab5500..b4dff5d 100644 --- a/custom_components/georide/manifest.json +++ b/custom_components/georide/manifest.json @@ -9,5 +9,5 @@ ], "dependencies": [], "codeowners": ["ptimatth"], - "version": "0.6.0" + "version": "0.6.1" } \ No newline at end of file diff --git a/custom_components/georide/switch.py b/custom_components/georide/switch.py index 71c3f11..79f0a0b 100644 --- a/custom_components/georide/switch.py +++ b/custom_components/georide/switch.py @@ -58,7 +58,7 @@ class GeoRideLockSwitchEntity(CoordinatorEntity, SwitchEntity): success = await self._hass.async_add_executor_job(GeoRideApi.lock_tracker, token, self._tracker_device.tracker.tracker_id) if success: - self._tracker.is_locked = True + self._tracker_device.tracker.is_locked = True async def async_turn_off(self, **kwargs): """ unlock the GeoRide tracker """ @@ -68,7 +68,7 @@ class GeoRideLockSwitchEntity(CoordinatorEntity, SwitchEntity): success = await self._hass.async_add_executor_job(GeoRideApi.unlock_tracker, token, self._tracker_device.tracker.tracker_id) if success: - self._tracker.is_locked = False + self._tracker_device.tracker.is_locked = False async def async_toggle(self, **kwargs): """ toggle lock the georide tracker """ @@ -77,7 +77,7 @@ class GeoRideLockSwitchEntity(CoordinatorEntity, SwitchEntity): token = await georide_context.get_token() result = await self._hass.async_add_executor_job(GeoRideApi.toogle_lock_tracker, token, self._tracker_device.tracker.tracker_id) - self._tracker.is_locked = result + self._tracker_device.tracker.is_locked = result @property def unique_id(self):