From ce06f109fef34e2d42d04faea415059f08dbbaf1 Mon Sep 17 00:00:00 2001 From: Matthieu Date: Fri, 4 Mar 2022 19:07:54 +0100 Subject: [PATCH] Beacon use wrong coordinator --- custom_components/georide/__init__.py | 2 +- custom_components/georide/binary_sensor.py | 4 ++-- custom_components/georide/sensor.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/custom_components/georide/__init__.py b/custom_components/georide/__init__.py index 06cf152..849c48b 100644 --- a/custom_components/georide/__init__.py +++ b/custom_components/georide/__init__.py @@ -311,7 +311,7 @@ class GeoRideContext: ) coordoned_beacon = { "tracker_beacon": DeviceBeacon(tracker_beacon), - "coordinator": coordinator + "coordinator": beacon_coordinator } self._georide_trackers_beacon_coordoned.append(coordoned_beacon) self._georide_trackers_coordoned.append(coordoned_tracker) diff --git a/custom_components/georide/binary_sensor.py b/custom_components/georide/binary_sensor.py index b631e31..346717c 100644 --- a/custom_components/georide/binary_sensor.py +++ b/custom_components/georide/binary_sensor.py @@ -38,8 +38,8 @@ async def async_setup_entry(hass, config_entry, async_add_entities): # pylint: d coordoned_beacons = georide_context.georide_trackers_beacon_coordoned for coordoned_beacon in coordoned_beacons: - tracker_beacon = coordoned_tracker['tracker_beacon'] - coordinator = coordoned_tracker['coordinator'] + tracker_beacon = coordoned_beacon['tracker_beacon'] + coordinator = coordoned_beacon['coordinator'] entities.append(GeoRideBeaconUpdatedBinarySensorEntity(coordinator, tracker_beacon)) hass.data[GEORIDE_DOMAIN]["devices"][tracker_device.beacon.beacon_id] = coordinator diff --git a/custom_components/georide/sensor.py b/custom_components/georide/sensor.py index 9e457b3..c787639 100644 --- a/custom_components/georide/sensor.py +++ b/custom_components/georide/sensor.py @@ -38,8 +38,8 @@ async def async_setup_entry(hass, config_entry, async_add_entities): # pylint: d coordoned_beacons = georide_context.georide_trackers_beacon_coordoned for coordoned_beacon in coordoned_beacons: - tracker_beacon = coordoned_tracker['tracker_beacon'] - coordinator = coordoned_tracker['coordinator'] + tracker_beacon = coordoned_beacon['tracker_beacon'] + coordinator = coordoned_beacon['coordinator'] entities.append(GeoRideBeaconUpdatedBinarySensorEntity(coordinator, tracker_beacon)) hass.data[GEORIDE_DOMAIN]["devices"][tracker_device.beacon.beacon_id] = coordinator