Fixed binary sensors
### Fix * Fixed issue with binary sensors not loading, caused by change to way the coordinators are stored
This commit is contained in:
@@ -102,11 +102,13 @@ async def async_setup_entry(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Set up the owlet sensors from config entry."""
|
"""Set up the owlet sensors from config entry."""
|
||||||
|
|
||||||
coordinator: OwletCoordinator = hass.data[DOMAIN][config_entry.entry_id]
|
coordinators: OwletCoordinator = hass.data[DOMAIN][config_entry.entry_id]
|
||||||
|
|
||||||
entities = [OwletBinarySensor(coordinator, sensor) for sensor in SENSORS]
|
async_add_entities(
|
||||||
|
OwletBinarySensor(coordinator, sensor)
|
||||||
async_add_entities(entities)
|
for coordinator in coordinators
|
||||||
|
for sensor in SENSORS
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class OwletBinarySensor(OwletBaseEntity, BinarySensorEntity):
|
class OwletBinarySensor(OwletBaseEntity, BinarySensorEntity):
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
"documentation": "https://www.home-assistant.io/integrations/owlet",
|
"documentation": "https://www.home-assistant.io/integrations/owlet",
|
||||||
"iot_class": "cloud_polling",
|
"iot_class": "cloud_polling",
|
||||||
"requirements": ["pyowletapi==2023.5.30"],
|
"requirements": ["pyowletapi==2023.5.30"],
|
||||||
"version":"2023.5.6"
|
"version":"2023.5.7"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user