Fix force_refresh_trackers_beacon

develop 0.9.0-snapshot8
Matthieu DUVAL 3 years ago
parent e92ac1825d
commit 4dc091525e

@ -250,12 +250,12 @@ class GeoRideContext:
if tracker.tracker_id == refreshed_tracker.tracker_id: if tracker.tracker_id == refreshed_tracker.tracker_id:
tracker.update_all_data(refreshed_tracker) tracker.update_all_data(refreshed_tracker)
if tracker.version > 2: if tracker.version > 2:
await force_refresh_trackers_beacon(tracker.tracker_id) await self.force_refresh_trackers_beacon(tracker.tracker_id)
found = True found = True
if not found: if not found:
self._georide_trackers.append(refreshed_tracker) self._georide_trackers.append(refreshed_tracker)
if refreshed_tracker.version > 2: if refreshed_tracker.version > 2:
await force_refresh_trackers_beacon(tracker.tracker_id) await self.force_refresh_trackers_beacon(tracker.tracker_id)
if not self._thread_started: if not self._thread_started:
_LOGGER.info("Start the thread") _LOGGER.info("Start the thread")
@ -320,7 +320,7 @@ class GeoRideContext:
"""Return coordoned trackers""" """Return coordoned trackers"""
return self._georide_trackers_coordoned return self._georide_trackers_coordoned
@property @property
def georide_trackers_beacon_coordoned(self): def georide_trackers_beacon_coordoned(self):
"""Return coordoned trackers""" """Return coordoned trackers"""

@ -111,11 +111,7 @@ class GeoRideOdometerKmSensorEntity(CoordinatorEntity, SensorEntity):
self._state = 0 self._state = 0
self._hass = hass self._hass = hass
@property
def entity_category(self):
return EntityCategory.DIAGNOSTIC
@property @property
def unique_id(self): def unique_id(self):
"""Return the unique ID.""" """Return the unique ID."""

Loading…
Cancel
Save