Move connect_socket into the context

This commit is contained in:
2021-04-10 16:01:32 +02:00
parent 5cab811c85
commit 283a1074e1
2 changed files with 22 additions and 20 deletions

View File

@@ -86,9 +86,9 @@ class GeoRideLockSwitchEntity(SwitchEntity):
async def async_update(self):
""" update the current tracker"""
_LOGGER.info('update')
_LOGGER.info('update %s', self._tracker_id)
self._data = await self._get_tracker_callback(self._tracker_id)
_LOGGER.debug('data %s', self._data)
_LOGGER.debug('data %s', self._data.is_locked)
self._name = self._data.tracker_name
self._is_on = self._data.is_locked