Push which window has been opened

Hi there,

I’m using “Pushover” for notification like “windows left open”, “door bell” or “window has been opened” (if I’m away or sth). Works nice so far.

But I would like to have a push-notification with the information, which window has been opened. Especially, when I’m not at home.

like:
Entity “anyone-at-home” is not active and entity “kitchen-window-sensor” activated → pushover notification “Kitchen window has been opened”

Is there a solution for it?
I don’t want to create 17 automations (one for each window) with nearly the same configuration :see_no_evil:

Cheers!

This is really easy actually.

Create the automation and use the trigger.to_state.attributes.xxxx (i think) as the variable value in your pushover notification.

I have something with Join to tell me when someone leaves or comes home, here’s the excerpt

- alias: Someone Came Home
  trigger:
    - platform: state
      entity_id: group.a, group.b, group.c, group.d
      from: 'not_home'
      to: 'home'
      for:
        seconds: 5
  action:
    - service: mqtt.publish
      data_template:
        topic: "ha/tracker/{{ trigger.to_state.attributes.friendly_name | lower }}"
        payload: home
        retain: true
    - service: tts.google_say
      entity_id: media_player.livingroom_speaker
      data_template:
        message: "{{ trigger.to_state.attributes.friendly_name }} is home now"

here’s my Join notification that goes to my phone

    - service: notify.join_a
      data_template:
        title: "Home Assitant"
        message: "{{ trigger.to_state.attributes.friendly_name }} left home at {{ states('sensor.time') }}"

You should be able to cobble something that works for you from this.

mta: forgot some code