mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 04:20:17 +00:00
Add device trigger support to sensor entities (#27133)
* Add device trigger support to sensor entities * Fix typing * Fix tests, add test helper for comparing lists
This commit is contained in:
@@ -155,8 +155,8 @@ async def async_attach_trigger(
|
||||
state.CONF_FROM: from_state,
|
||||
state.CONF_TO: to_state,
|
||||
}
|
||||
if "for" in config:
|
||||
state_config["for"] = config["for"]
|
||||
if CONF_FOR in config:
|
||||
state_config[CONF_FOR] = config[CONF_FOR]
|
||||
|
||||
return await state.async_attach_trigger(
|
||||
hass, state_config, action, automation_info, platform_type="device"
|
||||
|
||||
Reference in New Issue
Block a user