I seem to have a situation where double trigger of a rule is occurring for no reason that is obvious to me.
I have multiple devices that I want to use to trigger a rule:-
-
Front door MAG sensor (Yale Sync Alarm) -> Alexa -> Hubitat Skill -> Virtual Switch (VS) FRONT DOOR OPEN - this sets Global Variable (GV) hall-motion-detected to TRUE.
-
Motion Sensor 1 (Smart Life) -> IFTTT -> Hubitat -> VS HALL MOTION SWITCH ON - this sets GV hall-motion-detected to TRUE
-
Aeotec MultiSensor 6 Motion Sensor Active (Zwave Hubitat) - this sets GV hall-motion-detected to TRUE
I then have the following rule:-
Now in the LOG I see this:-
app:1112020-02-18 09:59:05.776 am infoAction: Set hall-motion-detected to false
app:1112020-02-18 09:59:05.768 am infoAction: IF (Variable hall-motion-detected(true) = true(T) [FALSE]) THEN
dev:752020-02-18 09:59:05.717 am infohall-motion-detected variable is false
app:1112020-02-18 09:59:05.644 am infoAction: Set hall-motion-detected to false
app:1112020-02-18 09:59:05.640 am infoAction: IF (Variable hall-motion-detected(true) = true(T) [TRUE]) THEN
app:1112020-02-18 09:59:05.436 am infoHall Motion Detected Triggered
app:1112020-02-18 09:59:05.359 am infoHall Motion Detected: variable hall-motion-detected set to true by Rule Machine
app:1112020-02-18 09:59:05.306 am infoHall Motion Detected Triggered
app:1112020-02-18 09:59:05.226 am infoHall Motion Detected: variable hall-motion-detected set to true by Hall Motion Switch is ON
dev:752020-02-18 09:59:05.118 am infohall-motion-detected variable is true
app:1092020-02-18 09:59:05.041 am infoAction: Set hall-motion-detected to true
dev:362020-02-18 09:59:05.031 am infoHall Motion Switch was turned off
app:1092020-02-18 09:59:05.020 am infoAction: Off: Hall Motion Switch
app:1092020-02-18 09:59:04.996 am infoHall Motion Switch is ON Triggered
app:1092020-02-18 09:59:04.984 am infoHall Motion Switch is ON: Hall Motion Switch switch on
dev:362020-02-18 09:59:04.842 am infoHall Motion Switch was turned on
app:32020-02-18 09:59:04.831 am debugHall Motion Switch: Executing on()
So, we see variable hall-motion-detected set to true by Hall Motion Switch is ON which is expected, but we see almost immediately afterwards variable hall-motion-detected set to true by Rule Machine
Then we see, interlaced in the LOG, two simultaneous executions of the Hall Motion Detected rule being triggered.
So my question is: why do we see this variable being set twice (once by the Rule Hall Motion Switch is ON then again by Rule Machine?