Fix tracker retrivial

This commit is contained in:
2021-04-10 12:25:47 +02:00
parent b4871b9374
commit af1df1cd84
4 changed files with 4 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities): # pylint: d
if token is None: if token is None:
return False return False
trackers = await GeoRideApi.get_trackers(token) trackers = await hass.async_add_executor_job(GeoRideApi.get_trackers,token)
binary_sensor_entities = [] binary_sensor_entities = []
for tracker in trackers: for tracker in trackers:

View File

@@ -23,7 +23,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities): # pylint: d
_LOGGER.debug('Current GeoRide token: %s', token) _LOGGER.debug('Current GeoRide token: %s', token)
trackers = await GeoRideApi.get_trackers(token) trackers = await hass.async_add_executor_job(GeoRideApi.get_trackers, token)
tracker_entities = [] tracker_entities = []

View File

@@ -21,7 +21,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities): # pylint: d
if token is None: if token is None:
return False return False
trackers = await GeoRideApi.get_trackers(token) trackers = await hass.async_add_executor_job(GeoRideApi.get_trackers,token)
odometer_switch_entities = [] odometer_switch_entities = []
for tracker in trackers: for tracker in trackers:

View File

@@ -23,7 +23,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities): # pylint: d
_LOGGER.info('Current georide token: %s', token) _LOGGER.info('Current georide token: %s', token)
trackers = await GeoRideApi.get_trackers(token) trackers = await hass.async_add_executor_job(GeoRideApi.get_trackers, token)
lock_switch_entities = [] lock_switch_entities = []
for tracker in trackers: for tracker in trackers: