I was in the process of setting up an automation to let me know when the garage door had been opened for a long time and was looking for some ideas on how to do this in the documentation when I ran across the Alert Component, which I have not seen before. Which, of course, is tailor-made for the purpose. However, I guess I am missing something because in the documentation the following example is given:
What is not clear is what, exactly, is supposed to be put as the notifier. I know it.s not literally ‘ryans_phone’ or ‘kristens_phone’, but what do you list there? Does this follow the convention of other notifications for example:
- service: notify.gmail
data:
- title: 'Garage Door Open'
- message: 'Garage door opened for 30 minutes'
The alert (text) will display what you have as the ‘name’.
My config is as follows:
alert:
garage_door:
name: Garage Door Is Open for 30 mins
entity_id: binary_sensor.garage_door
state: 'on'
repeat: 30
can_acknowledge: True
skip_first: True
notifiers:
- telegram
Okay, so I set up the garage door alert with the following configuration. It follows the documentation verbatim with the exception of the notifiers which I changed to match my named notifiers. Yet, I get no notification. The intention was to get the initial notification when the garage door is opened/closed, which I got. Then I wanted an alert every 20 minutes after if the garage door had been left open but I did not get those.
Just a follow up to see if anyone has any input as to whether or not I have my configuration for this set up correctly? So far, I have been unable to get it to work.
Nothing at all. Nothing that it didn’t, nothing that it was configured wrong, just, nothing, LOL
I guess what is confusing for me, and I don’t know that it’s confusing per se, it’s just difficult to tell if I have the notifier set up correctly. And to just be clear on that point, if elsewhere, for example, in an automation I call a notification service: notify.gmailtosms_a to get notifications, with the alert, the notifier section would just contain the name ‘gmailtosms_a’, correct?
Is there any way I could test the setup with Services under the Developer Tools?
Yes, if your notifier is notify.gmailtosms_a then the notifier in the alert is just gmailtosms_a.
You can use the Services tab to test any service, select notify as the domain, and the service you want to test with a JSON formatted data block (like { "message": "This is a test" })
Okay, thank you, Tinkerer. That was what was a little unclear to me and I kept focusing on that because it was out of the norm from other notification configurations. Now that I got that ironed out I can look at other things. I ran the test and that went through. So I am not sure what is not right, but at least I can rule out the notification configuration thanks to you, which I greatly appreciate.
So reading this thread I’m still confused. I am trying to set up the alert component to send an alert via the Twilio SMS component. But I’m very confused. In order for me to use the twilio_sms component to notify via the alert component I need to specify the target of the SMS message. Normally you would pass this along in an automation via the target parameter…
I am totally unclear however, using alert, how I can specify the target SMS number? The twilio_sms component does not accept target as a param.
Can someone please provide a working example of using alert and twilio_sms together?