|
|
@ -2,7 +2,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
import logging
|
|
|
|
import logging
|
|
|
|
|
|
|
|
|
|
|
|
from homeassistant.components.device_tracker.const import ENTITY_ID_FORMAT, SOURCE_TYPE_GPS
|
|
|
|
from homeassistant.components.device_tracker.const import DOMAIN, SOURCE_TYPE_GPS
|
|
|
|
from homeassistant.components.device_tracker.config_entry import TrackerEntity
|
|
|
|
from homeassistant.components.device_tracker.config_entry import TrackerEntity
|
|
|
|
|
|
|
|
|
|
|
|
import georideapilib.api as GeorideApi
|
|
|
|
import georideapilib.api as GeorideApi
|
|
|
@ -50,7 +50,7 @@ class GeorideTrackerEntity(TrackerEntity):
|
|
|
|
self._get_tracker_callback = get_tracker_callback
|
|
|
|
self._get_tracker_callback = get_tracker_callback
|
|
|
|
self._name = tracker.tracker_name
|
|
|
|
self._name = tracker.tracker_name
|
|
|
|
self._data = tracker or {}
|
|
|
|
self._data = tracker or {}
|
|
|
|
self.entity_id = ENTITY_ID_FORMAT.format(tracker_id)
|
|
|
|
self.entity_id = DOMAIN + ".{}".format(tracker_id)
|
|
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
@property
|
|
|
|
def unique_id(self):
|
|
|
|
def unique_id(self):
|
|
|
@ -122,4 +122,4 @@ class GeorideTrackerEntity(TrackerEntity):
|
|
|
|
_LOGGER.info('update')
|
|
|
|
_LOGGER.info('update')
|
|
|
|
self._data = self._get_tracker_callback(self._tracker_id)
|
|
|
|
self._data = self._get_tracker_callback(self._tracker_id)
|
|
|
|
self._name = self._data.tracker_name
|
|
|
|
self._name = self._data.tracker_name
|
|
|
|
|
|
|
|
|
|
|
|