Add suport for new device beacon, siren control, eco_mode control, better device event
This commit is contained in:
@@ -20,14 +20,14 @@ _LOGGER = logging.getLogger(__name__)
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities): # pylint: disable=W0613
|
||||
"""Set up Georide tracker based off an entry."""
|
||||
georide_context = hass.data[GEORIDE_DOMAIN]["context"]
|
||||
coordoned_trackers = georide_context.get_coordoned_trackers()
|
||||
coordoned_trackers = georide_context.georide_trackers_coordoned
|
||||
|
||||
entities = []
|
||||
for coordoned_tracker in coordoned_trackers:
|
||||
tracker_device = coordoned_tracker['tracker_device']
|
||||
coordinator = coordoned_tracker['coordinator']
|
||||
entity = GeoRideTrackerEntity(coordinator, tracker_device, hass)
|
||||
hass.data[GEORIDE_DOMAIN]["devices"][tracker_device.tracker.tracker_id] = coordinator
|
||||
hass.data[GEORIDE_DOMAIN]["devices"][tracker_device.unique_id] = coordinator
|
||||
entities.append(entity)
|
||||
|
||||
async_add_entities(entities)
|
||||
|
||||
Reference in New Issue
Block a user