Skip to content

Commit

Permalink
Fixed binary sensors
Browse files Browse the repository at this point in the history
### Fix
* Fixed issue with binary sensors not loading, caused by change to way the coordinators are stored
  • Loading branch information
ryanbdclark committed May 30, 2023
1 parent 26f81c1 commit 8d17317
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions custom_components/owlet/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,13 @@ async def async_setup_entry(
) -> None:
"""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(entities)
async_add_entities(
OwletBinarySensor(coordinator, sensor)
for coordinator in coordinators
for sensor in SENSORS
)


class OwletBinarySensor(OwletBaseEntity, BinarySensorEntity):
Expand Down
2 changes: 1 addition & 1 deletion custom_components/owlet/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/owlet",
"iot_class": "cloud_polling",
"requirements": ["pyowletapi==2023.5.30"],
"version":"2023.5.6"
"version":"2023.5.7"
}

0 comments on commit 8d17317

Please sign in to comment.