mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Fix passing correct location id to streamlabs water (#107291)
This commit is contained in:
parent
3086d33261
commit
a03ac3ddcd
@ -107,9 +107,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
def set_away_mode(service: ServiceCall) -> None:
|
def set_away_mode(service: ServiceCall) -> None:
|
||||||
"""Set the StreamLabsWater Away Mode."""
|
"""Set the StreamLabsWater Away Mode."""
|
||||||
away_mode = service.data.get(ATTR_AWAY_MODE)
|
away_mode = service.data.get(ATTR_AWAY_MODE)
|
||||||
location_id = (
|
location_id = service.data.get(CONF_LOCATION_ID) or list(coordinator.data)[0]
|
||||||
service.data.get(CONF_LOCATION_ID) or list(coordinator.data.values())[0]
|
|
||||||
)
|
|
||||||
client.update_location(location_id, away_mode)
|
client.update_location(location_id, away_mode)
|
||||||
|
|
||||||
hass.services.async_register(
|
hass.services.async_register(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user