Trying to run an air pump off an outlet during the night.
Start at 22:30 after lights out.
Stop at 09:30 in the morning before lights on.
Simple code I thought would work and does start the air Pump no problem but does not stop at the desired time.
*Note this is repeatable at any time, not just when start/end are on different days. You could put in 09:30 to 09:31 and it will not stop.
If Time 23:30 to 09:30 Then ON
Then I tried to break out the commands to this.
If Time 23:30 Then On
If Time 09:30 Then Off
But with this second code set it throws errors when uploading to my Apex. It seems that the time statement must have a To and a end time entered.
So I think I have it working now with this but its not clean code since the duration doesn't work. maybe just my OCD :P
If Time 23:30 to 09:30 Then ON
If Time 09:31 to 23:29 Then OFF
My question is why is the one liner not working?
Bookmarks