This object is in archive! 

Rule & Time what to use

Pablo shared this question 2 years ago
Need Answer

Hello,


I want a device to switch ON and after some time (hours maybe) OFF every day twice, at certain time. For this I have a virtual switch that enables or disables this automatic functionality.

I find two option on the rules:


OPTION 1 - USING SCHEDULE

For this I create 2 rules: 1 for switching ON during at the start time of both periods, the other one for switching off at the end of both periods. The WHEN condition is the schedule 1 OR schedule 2 and on the next IF I check if the automatic trigger is set. This is how it looks like:


7a3055837525ec33ca8aed2527bbd0f1


OPTION 2 - USING TIME BETEEN

ForthisI need only one rule where I define the period while it should be switch ON. On the WHEN condition, I check if the automatic trigger is ON. And afterwards I have an IF with the TIME BETWEEN condition. This is how it could look like:


8c232ded25a3cab61fd6b3c895c8deda


My question is: are they both correct? I've been not able yet to test them completly.


Thanks all!

Comments (1)

photo
1

Rule 2 will never work. It will trigger when you switch on the automatic trigger but not later 9only at switch state change to ON.

Rule 1 can work, however we always recommend using only 1 scheduler in the when and not 2. So you should have 2 rules, 1 for On and 1 for OFF.

photo
1

Thank you Attila!! For the moment looks like the 2 SCHEDULES withe OR are working for me! And the TIME BETWEEN not, as you explain. Thanks!

photo