Skip to content

Commit

Permalink
Fix passing correct location id to streamlabs water (#107291)
Browse files Browse the repository at this point in the history
  • Loading branch information
joostlek committed Jan 6, 2024
1 parent 3086d33 commit a03ac3d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions homeassistant/components/streamlabswater/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
def set_away_mode(service: ServiceCall) -> None:
"""Set the StreamLabsWater Away Mode."""
away_mode = service.data.get(ATTR_AWAY_MODE)
location_id = (
service.data.get(CONF_LOCATION_ID) or list(coordinator.data.values())[0]
)
location_id = service.data.get(CONF_LOCATION_ID) or list(coordinator.data)[0]
client.update_location(location_id, away_mode)

hass.services.async_register(
Expand Down

0 comments on commit a03ac3d

Please sign in to comment.