Piston completed after hours


#1

So

I have a prison, checks for movement during the day

If no one is around, lights go out.

The only problem

The piston fires during the pre sunset hours but since I have a no TCP so it changes over motion, that wait 45 can kick in after dark

What would be the best way to handle that ?


#2

(insert witty comment here)


I would try something like this:

IF 
    Motion STAYS inactive for 45 minutes
Then 
    IF
        time is between 930am and sunset
    Then
        Turn off lights
    END IF
END IF

This way the time check is not done until after the 45 minutes of inactivity.


#3

something like this?

I had to change it so all sensors stay inactive , correct ?


#4

Yes, although you may prefer the first line to say if ALL instead of if ANY.


#5

Your reply was faster than my edit!

adjusted as you mentioned


#6

*blows the smoke from his fingertips, Clint Eastwood style*


#7

A few more pistons to test out, hopefully I will be able to figure out any logic issues myself.

Then I get my hunter fan, zigbee addon, which will then add a whole new set of pistons!


#8

We’re here if you need us