This object is in archive! 
What's wrong with my rule?
Need Answer
The purpose of this rule
Turn on the aquarium light at 8 o'clock and off 6:00 p.m. Leaving the light on 10 hours daily.
Files:
Regra aquário c...
No connection
Real-time notifications may not work
Try the TIME - BETWEEN - AND puzzle in the IF condition, please take a look at the attached screenshot.
Try the TIME - BETWEEN - AND puzzle in the IF condition, please take a look at the attached screenshot.
I don't think your scheduler will work correctly, you have it so it repeats every 10 hours (since day is 24 hours) it will start defasing over the pass of the days. There are two approaches for this purpuse, for both you need two rules, choosing which would depend on how many different rules or events you want to trigger in the future.
1. First rule uses a scheduler that repeats daily at 8 am, this will be used to turn ON the light. Second rule with a different scheduler which also repeats daily at 6 pm and will be used to turn OFF the light. This way your light will always turn ON/OFF at those hours. Downside it is "hardcoded" and if for some reason you reboot or turn OFF your device at any of these two hours, these rules won't be triggered.
2. You can create an "hourly flasher" with a virtual switch or sensor. In the first rule you will use a scheduler that repeats every hour and it will turn ON the flasher, wait for a few seconds, then turn it back OFF. Second rule will be very much alike the one you created but instead of using the scheduler in the WHEN puzzle you will use
WHEN FLASHER ON
IF TIME OF NOW IS BETWEEN 8:00 AND 18:00 THEN
IF LIGHT IS OFF THEN TURN ON
ELSE
IF LIGHT IS ON TURN OFF
Hope this helps.
I don't think your scheduler will work correctly, you have it so it repeats every 10 hours (since day is 24 hours) it will start defasing over the pass of the days. There are two approaches for this purpuse, for both you need two rules, choosing which would depend on how many different rules or events you want to trigger in the future.
1. First rule uses a scheduler that repeats daily at 8 am, this will be used to turn ON the light. Second rule with a different scheduler which also repeats daily at 6 pm and will be used to turn OFF the light. This way your light will always turn ON/OFF at those hours. Downside it is "hardcoded" and if for some reason you reboot or turn OFF your device at any of these two hours, these rules won't be triggered.
2. You can create an "hourly flasher" with a virtual switch or sensor. In the first rule you will use a scheduler that repeats every hour and it will turn ON the flasher, wait for a few seconds, then turn it back OFF. Second rule will be very much alike the one you created but instead of using the scheduler in the WHEN puzzle you will use
WHEN FLASHER ON
IF TIME OF NOW IS BETWEEN 8:00 AND 18:00 THEN
IF LIGHT IS OFF THEN TURN ON
ELSE
IF LIGHT IS ON TURN OFF
Hope this helps.
Replies have been locked on this page!