Fix Hyperion light not updating state (#115389)

This commit is contained in:
avee87 2024-04-19 17:21:21 +01:00 committed by GitHub
parent cc2e0fd921
commit 18d6581523
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -191,13 +191,13 @@ class HyperionVisiblePrioritySensor(HyperionSensor):
if priority[KEY_COMPONENTID] == "COLOR":
state_value = priority[KEY_VALUE][KEY_RGB]
else:
state_value = priority[KEY_OWNER]
state_value = priority.get(KEY_OWNER)
attrs = {
"component_id": priority[KEY_COMPONENTID],
"origin": priority[KEY_ORIGIN],
"priority": priority[KEY_PRIORITY],
"owner": priority[KEY_OWNER],
"owner": priority.get(KEY_OWNER),
}
if priority[KEY_COMPONENTID] == "COLOR":

View File

@ -159,7 +159,6 @@ async def test_visible_effect_state_changes(hass: HomeAssistant) -> None:
KEY_ACTIVE: True,
KEY_COMPONENTID: "COLOR",
KEY_ORIGIN: "System",
KEY_OWNER: "System",
KEY_PRIORITY: 250,
KEY_VALUE: {KEY_RGB: [0, 0, 0]},
KEY_VISIBLE: True,