Message Notification

Hello everyone,

I’m new to Home Assistant and I have a question.

I would like to receive a push notification on my phone informing me of a change in the status of the window sensors.

I’ve set up the automation, and I’m being notified.

This is what my configuration looks like:

action: notify.notify
metadata: {}
data:
  title: Test Sensor
  message: "Fenster {{ states('binary_sensor.arbeitszimmer_fenster') }}"

Now I want the sensor name to be displayed and I want to rename the on/off status. How do I do this?

Any help?

1 Like

That helped me a bit. Now the names are displayed. How can I rename the on and off states using “open” and “close”?

Here is my Configuration:

alias: Statusänderung Fenster / Türen
description: ""
triggers:
  - trigger: state
    entity_id:
      - binary_sensor.arbeitszimmer_fenster
    from: "off"
    to: "on"
  - trigger: state
    entity_id:
      - binary_sensor.arbeitszimmer_fenster
    from: "on"
    to: "off"
conditions: []
actions:
  - action: notify.notify
    metadata: {}
    data:
      title: Test 1
      message: "{{ trigger.to_state.name }} {{ trigger.to_state.state }}"
mode: single