Hi,
I am trying to get a message showing when there is a change of state from off to on, meaning the window is open. I want to get a notification with the name of the window. I have searched through this forum, and have tried different lines, still does not work. Automation shows as triggered, but I do not any kind of notification. Other automations with simple messages work fine. I tried the way it is below, I tried {{ trigger.name }} and {{ trigger.entity_id }}.
- id: '1596119039079'
alias: TEST window is open
description: ''
trigger:
- entity_id: binary_sensor.living_room_window_sensor
from: 'off'
platform: state
to: 'on'
- entity_id: binary_sensor.bedroom_window_sensor
from: 'off'
platform: state
to: 'on'
condition: []
action:
- data:
message: Window {{ trigger.to_state.attributes.friendly_name }} is open
service: notify.notify
mode: single
Thank you.
14 posts - 4 participants