Hi Everyone,
Can some help me create a Notification trigger that fires multiple commands?
So I have a gate that calls PLAY_SOUND when the gate button is pressed. Besides playing the sound I would like to show an alert and wake up the screen.
So playing the sound and wakening the screen works. But I would like to add an Alert as well. The working config is like this:
{
module: "MMM-NotificationTrigger",
config: {
triggers:[
{
trigger: "PLAY_SOUND",
fires: [
{
fire:"USER_PRESENCE",
payload: function(payload) {
return false
},
},
],
},
]
}
},
Now, if I wan’t and alert on the same event, I tried this:
{
module: "MMM-NotificationTrigger",
config: {
triggers:[
{
trigger: "PLAY_SOUND",
fires: [
{
fire:"USER_PRESENCE",
payload: function(payload) {
return false
},
{
fire:"SHOW_ALERT",
payload: function() {
return {
type:"notification",
title:"Porten",
message: "Der er nogen ved porten!"
},
},
],
},
]
}
},
But it does not work.
Any help appreciated…
Best
MilkShake