New alert feature - adding notifiers

Hi!

I am trying to setup the new alert feature and I dont understand the notifiers-option.
In automation, I add notifiers by adding it as an action, for example:
action:
service: notify.facebook
data:
message: ‘Good Evening’
target:
- +919784516314

If I add notifiers according to the alert example:

Example configuration.yaml entry

alert:
garage_door:
name: Garage is open
entity_id: input_boolean.garage_door
state: ‘on’ # Optional, ‘on’ is the default value
repeat:
- 60
notifiers:
- notify.facebook

How can I add target data for example? And payload (message)?

As I understand it the ‘name’ field is the message that is sent. It is literally an alert that a condition is met (and continues to be met for the repeating interval).

Anything more complicated requires a script.

I’m sure somebody will correct me if I’m wrong.

Ah, thank you!
But what about target[s]?

I don’t use the Facebook notification, but is the target not defined in the notify entry in configuration.yaml?

Like I use pushbullet, and the target is my pushbullet on my phone which is defined in configuration as

Notify:

  • platform: pushbullet
    Name: pushbullet_marc
    [my config for my phone]

Then if I wanted to notify you I would add an entry below that:

  • platform: pushbullet
    Name: pushbullet_bohz
    [config for your phone]

Then in my Alert if I wanted to notify me I would put

Notifiers:

  • notify.pushbullet_marc

If I wanted to notify you

  • notify.pushbullet_bohz

(sorry for syntax and spacing being off, replying from my phone)

So for anyone else who runs into this thread looking for the answer to this, check out notifier groups. You can create a notifier group with a single entry where parameters other than message can also be specified (such as target). You can then use this in an alert.

1 Like