how to trigger a rule only during day

6 views
Skip to first unread message

orc trial

unread,
Oct 10, 2019, 11:11:47 PM10/10/19
to OpenRemote
Hi 

i have a zwave bulb that i currently have setup a rule that turns in on when a zwave motion sensor detects motion ("MS2statussensor", value == "off")
this rule works fine

what i want to do is turn the bulb off ONLY during the hours of 7 am and 7 pm when the motion sensor turns off (motion is not detected any more) ie Event ( source == "MS2statussensor", value == "off")

i have attempted to write the rule as follows below but i am not sure what cron sytax to use so the rule only gets triggered between 7 am and 7 pm as soon as  Event ( source == "MS2statussensor", value == "off") occurs. 

rule "turn bulb off during day"
timer (cron: xxxxx)
when
   Event ( source == "MS2statussensor", value == "off")
then
  execute.command("GoControlBulbOFF");
end
Reply all
Reply to author
Forward
0 new messages