Hello,
I want to receive a message when one of my devices (switch, sensor, ESPHome device,…) is unavailable, as well as when it is available again. However, I only want this when my device has been unavailable for at least 30 seconds.
Unavailable for at least 30 seconds is easy:
trigger:
- platform: state
entity_id:
- sensor.wifi_signal_bed_occupancy
to: unavailable
for:
hours: 0
minutes: 0
seconds: 30
variables:
trigger_message: ESPHome - Bed-occupancy
Back available :
- platform: state
entity_id:
- sensor.wifi_signal_bed_occupancy
from: unavailable
variables:
trigger_message: ESPHome - Bed-occupancy
But how can I avoid to get a message for a device which only went 10 seconds offline ?