Automation Trigger ID

Does anyone know a way to identify the name of a sensor that may have triggered an automation? I am sure this can be done but if someone knows, it would save me having to figure it out. I have a notification automation that is used to tell me if a window has been left open, i would like the notification to identify which window triggered the automation. So I am not left checking each window to see which was left open.

1 Like

Depends on how your automation is triggered.
But feel free to read the docs on the topic

Except from my alarm automation to tell me what door/window caused it to trigger in the notification I send to myself:

data:
  message: The {{ trigger.from_state.attributes.friendly_name }} has been triggered!
1 Like

This looks good, I realized I currently have a group triggering this automation, I think I will break it out into individual windows do I get the granularity I want.