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
|
@ -45,16 +45,16 @@ async def async_attach_trigger(
|
|||
automation_info: dict,
|
||||
) -> CALLBACK_TYPE | None:
|
||||
"""Attach a trigger."""
|
||||
trigger_id = automation_info.get("trigger_id") if automation_info else None
|
||||
trigger_data = automation_info.get("trigger_data", {}) if automation_info else {}
|
||||
registry: DeviceRegistry = await async_get_registry(hass)
|
||||
if config[CONF_TYPE] == TRIGGER_TYPE_TURN_ON:
|
||||
variables = {
|
||||
"trigger": {
|
||||
**trigger_data,
|
||||
"platform": "device",
|
||||
"domain": DOMAIN,
|
||||
"device_id": config[CONF_DEVICE_ID],
|
||||
"description": f"philips_js '{config[CONF_TYPE]}' event",
|
||||
"id": trigger_id,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue