I haven’t tried it, will start reading about Alerts, thank you!
Right, exactly what I needed.
I also believed so - but in my setup the automation was not triggered if the sensor was OFF after startup.
alias: test_x
description: ''
trigger:
- platform: state
entity_id: binary_sensor.rpi_1_integration_availability_status
to: 'off'
for: '00:03:00'
condition: []
action:
- service: notify.telegram_chat_important
data:
message: RPi-1 off for 3 min
mode: single
The test:
- Let the sensor = ON.
- Set it = OFF.
- The automation triggered after 3 minutes.
- Restart HA.
- Wait for 3 minutes after start - the automation is not triggered.
Moreover - this automation is not triggered on startup if the sensor is OFF at this moment:
alias: test_x
description: ''
trigger:
- platform: state
entity_id: binary_sensor.rpi_1_integration_availability_status
to: 'off'
condition: []
action:
- service: notify.telegram_chat_important
data:
message: RPi-1 off for 3 min
mode: single
I do not think that the FIRST setting a sensor on startup is considered as a STATE CHANGE.