Motion Based Light EXCEPT when Manually turned On



Doesn’t change much…state is now true but the light still closes after a minute when I’ve walked in the room after switching on manually the lutron


I tried to turn aroung the logic but it did again the same thing

it’s like it’s not taking into account the first condition lutron switch must be off


My earlier logic:

1   IF Sensor's motion changes to active  <-- Trigger
2   Then
3       IF LutronCaseta is off            <-- Condition
4       Then
5           Turn on lights
6       END IF
7   END IF

…only works if the device(s) on line 3 are different from the device(s) on line 5

(Ideally, line 3 should be a SimSwitch, but you can use a real light there IF it is not mentioned on line 5)

If you go this route, the turn off portion should be similar:

IF Sensor's motion stays inactive for X minutes  <-- Trigger
    IF LutronCaseta is off                       <-- Condition
        Turn off lights
    END IF

This way, the motion sensor won’t do anything if that SimSwitch is on.


Does anyone have a handler for switches for which physical and programmatic conditions work as expected?


I am trying to learn how this works so I can apply it to my current lighting program. I have a smart dimmer switch and a motion sensor.

I have the motion sensor set to turn the light on at specific dim level at specific times.

I would like to be able to override the code with manually hitting the switch on a 120mintue timer. So of I turn the smart switch off, then the lights turn off for 120 mins then the motion turns back on. Same for if I manually turn the smart switch on then I would like the light to set the level to 100% for 120minutes and then restart the motion program.


No one has an answer to this?


Biggest issue is normally it senses motion for you can manually press button (My scenario), and the secondary issue is that not all switches/DTH differentiate manual press of button so pressing button after it has been turned on would not do anything. Please provide exact scenarios and any possible logs.


Hey little help on this piston. I want the light to turn off immediately after motion stops not 30 seconds and I want the light to stay on until manually turned off IF I toggle the light to 100%.

How would I do this as I’m so confused. Thanks!


Looks great! If i wanted to use the same logic for all of the lights and motion sensors in the house, how would i modify the code to do so, or would I have to keep duplicating the piston for each light and motion sensor combo in the house?