Compare commits

...

7 Commits

2 changed files with 6 additions and 11 deletions

View File

@@ -250,13 +250,12 @@ class GeoRideContext:
if tracker.tracker_id == refreshed_tracker.tracker_id:
tracker.update_all_data(refreshed_tracker)
if tracker.version > 2:
await force_refresh_trackers_beacon(tracker.tracker_id)
await self.force_refresh_trackers_beacon(tracker.tracker_id)
found = True
if not found:
self._georide_trackers.append(refreshed_tracker)
if refreshed_tracker.version > 2:
await force_refresh_trackers_beacon(tracker.tracker_id)
await self.force_refresh_trackers_beacon(refreshed_tracker.tracker_id)
if not self._thread_started:
_LOGGER.info("Start the thread")
# We refresh the tracker list each hours
@@ -301,11 +300,11 @@ class GeoRideContext:
"coordinator": coordinator
}
if tracker.version > 2:
tracker_beacon = await get_tracker_beacon_by_tracker_id(tracker.tracker_id)
tracker_beacon = await self.get_tracker_beacon_by_tracker_id(tracker.tracker_id)
beacon_coordinator = DataUpdateCoordinator[Mapping[str, Any]](
hass,
_LOGGER,
name=tracker_beacon.name
name= tracker_beacon.name
)
coordoned_beacon = {
"beacon_device": DeviceBeacon(tracker_beacon),

View File

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