Entity ID in Notify Message

I would like to setup a single automation that will tell me which of my doors is open in the body of the notification message. Is there any way to do this?

For Instance if my garage door is open more than 10 minutes I want to be able to get a notification that says

The (garage door) is open. Or The (Front Door) is open. Using the same automation under triggers for all of the doors I have in my house…

Yes you can do that.

It’s best to give it a try yourself and we can help when you get stuck if you post what you have tried.

- id: '1667862723183'
  alias: Notifications
  description: ''
  trigger:
  - platform: device
    device_id: e976d87834880f353afbbf893fc3cbfd
    domain: lock
    entity_id: lock.front_door_lock
    type: unlocked
    for:
      hours: 0
      minutes: 3
      seconds: 0
  - type: opened
    platform: device
    device_id: 180b3575c189246a006588db1642c9b4
    entity_id: binary_sensor.house_garage_door
    domain: binary_sensor
    for:
      hours: 0
      minutes: 3
      seconds: 0
  - type: opened
    platform: device
    device_id: 88a19c87170706d5fe217531196f99ef
    entity_id: binary_sensor.garage_door
    domain: binary_sensor
    for:
      hours: 0
      minutes: 3
      seconds: 0
  condition: []
  action:
  - choose:
    - conditions:
      - type: is_open
        condition: device
        device_id: 180b3575c189246a006588db1642c9b4
        entity_id: binary_sensor.house_garage_door
        domain: binary_sensor
        for:
          hours: 0
          minutes: 0
          seconds: 0
      sequence:
      - service: notify.notify
        data:
          message: House Garage Door is Open
    - conditions:
      - type: is_open
        condition: device
        device_id: 88a19c87170706d5fe217531196f99ef
        entity_id: binary_sensor.garage_door
        domain: binary_sensor
        for:
          hours: 0
          minutes: 0
          seconds: 0
      sequence:
      - service: notify.notify
        data:
          message: Garage Door is Oepn
    - conditions:
      - type: is_open
        condition: device
        device_id: 67c71e4256c239940d1ce93d2dea9cba
        entity_id: binary_sensor.front_door
        domain: binary_sensor
        for:
          hours: 0
          minutes: 0
          seconds: 0
      sequence:
      - service: notify.notify
        data:
          message: Front Door is Open
    - conditions:
      - type: is_open
        condition: device
        device_id: e976d87834880f353afbbf893fc3cbfd
        entity_id: binary_sensor.front_door_lock_status
        domain: binary_sensor
        for:
          hours: 0
          minutes: 0
          seconds: 0
      sequence:
      - service: notify.notify
        data:
          message: Front Door is Unlocked
  mode: single

I recommend you go away from device triggers.

using state triggers is more compact and they are easier to maintain if the devices themselves ever need replaced.

and then you can add id’s to the triggers and the actions become more compact.

the only downside (which really isn’t) is that you need to use templates in the actions.

so…

- id: '1667862723183'
  alias: Notifications
  description: ''
  trigger:
    - platform: state
      entity_id: lock.front_door_lock
      id: lock
      to: unlocked
      for:
        minutes: 3
    - platform: state
      entity_id: 
        - binary_sensor.house_garage_door
        - binary_sensor.garage_door
      to: 'on'
      for:
        minutes: 3
  action:
    - if:
        - condition:
          id: lock
      then:
         - service: notify.notify
          data:
            message: Front Door is Unlocked
      else:
        - service: notify.notify
          data:
            message: {{ trigger.to_state.attributes.friendly_name}} is Open
  mode: single

the only thing I’m not sure about is what the state of locks are since I don’t have any. I assume it’s locked/unlocked but if not you’ll have to fix that part.