Ok, So I’m new to this. I’ve created about a dozen rules and they all work great (in my eyes). I have lot of people in the forum to thank for this and its amazing how much you can learn from other peoples issues.
I’m trying to get my last rule sorted out for an alarm I’m trying to put together.
Here is what I want it to do and what I tried to make work. Like I said I’m new to this so I have probably made loads of school boy errors
When front door is open check alarm is on
If alarm is on then play a sound and start a timer
When timer finishes check if alarm is still on
If alarm is still on then trigger the siren and send a pushover message
run siren for 10 minutes and then turn off
So it all works (kind of) it just doesn’t do any of the waiting and triggers the notification and siren straight away.
rule "Alarm Away trigger Conditions - Front Door"
when
Item front_door_sensor changed to ON
then
if (burgler_alarm_away.state == ON) {
playSound("webaudio","alarmtone.mp3")
createTimer(now.plusSeconds(10), [ |
(burgler_alarm_away.state == ON)
house_siren.sendCommand (ON)
sendBroadcastNotification("Alarm has been triggered")
sendPushoverMessage(pushoverBuilder("House Alarm has been triggered").withEmergencyPriority())
createTimer(now.plusMinutes(10), [ |
house_siren.sendCommand (OFF)
])
])
}
end