Lights randomly turning on and off with piston


#1

1) Give a description of the problem
Piston works for a while then randomly will turn the lights on and off ever 1 minute until i turn off the piston

2) What is the expected behavior?
Based on the brightness of the room the piston should turn on the light. If the lights are manually switched on the lights will stay on until manually turned off.

3) What is happening/not happening?
When using motion sensors to turn on the light, they will

Thanks for your help :slight_smile:


#2

Not sure, but I think you need to move the motion sensor illuminance condition to part of the IF statement, not the ONLY WHEN. In fact, you may need to move the variable check condition to IF as well and not use the ONLY WHEN. It doesn’t seem like it should matter, but I think it does.

Two things that will definitely help are to turn on full logging (please upload) and insert some PUSH notifications in each THEN block to help you trace the logic.


#3

It pretty weird, I changed the illumination to make it based on sunset and sunrise and haven’t had any issues. Im going to play around with it some more and will post the final code if i get everything working :slight_smile:

Thanks for you suggestion, ill still test it out