I am considering using Alert for my smoke detectors and water sensors. I have the impression that Alerts in HA are not getting any attention from the HA-team, since Alerts don’t have its own setup page in the GUI, still using code in file.
Any thoughts on what to use, alert or notification?
You may well be right about Alerts not getting a great deal of attention - but, personally I find them handy especially for repeating notifications or announcements which I need to keep going until something is done in response e.g a reminder to deal with the recycling, or that a window needs closing. It means not having to faff around with repeats, loops and delays in scripts or automations.
I usually have to create an associated template binary sensor to deal with the more complex combination of timings and conditions though, with the alert running when the binary sensor turns on.
One thing keeping me from using Alerts is that you have to make an alert for every sensor. You cant have an alert for more of the same sensors (as you can for notification) like:
# This wont work
smoke_detected:
name: Smoke alarm
entity_id:
- sensor.smoke1_detected
- sensor.smoke2_detected
- sensor.smoke3_detected
- sensor.smoke4_detected
state: "on"
repeat:
- 1
can_acknowledge: true
title: "HA - ALARM!"
message: Fire in {{ area_name(trigger.entity_id) }}!
data:
push:
sound: mixkit-classic-alarm-995-classic.wav
critical: 1
volume: 1
notifiers:
- me
Yeah, that’s a case where you’d have to make a separate trigger based template binary sensor to control the alert based on the state of your 4 smoke sensors.
And even then I’m not entirely sure how you would turn the binary sensor off unless you coukd also change the state of your smoke sensors once the alert was dealt with.