Correct trace path for trigger with custom id (#51847)
This commit is contained in:
parent
a989677bef
commit
4c9f12b9c5
20 changed files with 46 additions and 42 deletions
|
@ -26,7 +26,7 @@ TRIGGER_SCHEMA = cv.TRIGGER_BASE_SCHEMA.extend(
|
|||
|
||||
async def async_attach_trigger(hass, config, action, automation_info):
|
||||
"""Listen for events based on configuration."""
|
||||
trigger_id = automation_info.get("trigger_id") if automation_info else None
|
||||
trigger_data = automation_info.get("trigger_data", {}) if automation_info else {}
|
||||
event = config.get(CONF_EVENT)
|
||||
offset = config.get(CONF_OFFSET)
|
||||
description = event
|
||||
|
@ -41,11 +41,11 @@ async def async_attach_trigger(hass, config, action, automation_info):
|
|||
job,
|
||||
{
|
||||
"trigger": {
|
||||
**trigger_data,
|
||||
"platform": "sun",
|
||||
"event": event,
|
||||
"offset": offset,
|
||||
"description": description,
|
||||
"id": trigger_id,
|
||||
}
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue