Teach state trigger about entity registry ids (#60271)
* Teach state trigger about entity registry ids * Tweak * Add tests * Tweak tests * Fix tests * Resolve entity ids during config validation * Update device_triggers * Fix mistake * Tweak trigger validator to ensure we don't modify the original config * Add index from entry id to entry * Update scaffold * Pre-compile UUID regex * Address review comment * Tweak mock_registry * Tweak * Apply suggestion from code review
This commit is contained in:
parent
c0fb1bffce
commit
c85bb27d0d
20 changed files with 324 additions and 74 deletions
|
@ -164,7 +164,7 @@ async def async_attach_trigger(
|
|||
if CONF_FOR in config:
|
||||
state_config[CONF_FOR] = config[CONF_FOR]
|
||||
|
||||
state_config = state_trigger.TRIGGER_SCHEMA(state_config)
|
||||
state_config = await state_trigger.async_validate_trigger_config(hass, state_config)
|
||||
return await state_trigger.async_attach_trigger(
|
||||
hass, state_config, action, automation_info, platform_type="device"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue