📍 State Notifications & Actions

FAQ: How do I include the sensor name that triggered the automation in the message?

If you have many sensors (e.g., all your window sensors), you can configure the notification to indicate which sensor triggered the automation. This helps you identify what happened more easily.

1. For getting your entity ID in the message use this

{{ trigger.entity_id }}

Or in a custom action

service: notify.mobile_app_your_device_here
data:
  title: Window Open
  message: "{{ trigger.entity_id }}"

2. For getting the friendly name of your entity in the message use this

{{ states[trigger.entity_id].attributes.friendly_name }}

Or in a custom action

service: notify.mobile_app_your_device_here
data:
  title: Window Open
  message: "{{ states[trigger.entity_id].attributes.friendly_name }}"

Enjoy

Blacky :smiley:

Back to FAQ: Click Here

1 Like