Skip to content

Commit

Permalink
fix: dict key error
Browse files Browse the repository at this point in the history
  • Loading branch information
cdnninja committed Apr 15, 2024
1 parent 6f0f17f commit a478e37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions custom_components/yoto/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ async def async_setup_entry(
"""Set up binary_sensor platform."""
coordinator = hass.data[DOMAIN][config_entry.unique_id]
entities: list[YotoBinarySensor] = []
for vehicle_id in coordinator.vehicle_manager.vehicles.keys():
player: YotoPlayer = coordinator.yoto_manger.players[vehicle_id]
for player_id in coordinator.yoto_manager.players.keys():
player: YotoPlayer = coordinator.yoto_manager.players[player_id]
for description in SENSOR_DESCRIPTIONS:
if getattr(player, description.key, None) is not None:
entities.append(YotoBinarySensor(coordinator, description, player))
Expand Down
2 changes: 1 addition & 1 deletion custom_components/yoto/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"integration_type": "hub",
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/cdnninja/yoto_ha/issues",
"requirements": ["yoto-api==1.0.11"],
"requirements": ["yoto-api==1.0.13"],
"version": "1.0.0"
}

0 comments on commit a478e37

Please sign in to comment.