I’m strugling with a rule, I can’t figure out what’s wrong im my logic.
What I want to achieve is, that if my marquise is open and it’s past a certain time it should trigger a notification. The notification should only be sent if the value IS NOT 0.
Right now the notification is sent every time, whether the value is 0 or not.
rule "Marquise Open Notification" when //rule triggers at 22.00 Time cron "0 00 22 1/1 * ? *" then //notifies only if the marquise level is other than 0 if(HM_Marquise_Level.state != 0) logInfo("hm_marquise.rules", "sending notification") sendNotification("xxxx", "Marquise is open!") end