Triggering of pistons question


#1

1) Give a description of the problem
I’m trying to create a generic piston that can turn on a group of lights based on a group of motion sensors.

2) What is the expected behavior?
I’d like to use a single array of motion detectors, but currently I have to repeat that list to avoid getting an error that my piston has no triggers. Specifically wI’d like to get rid of the outermost “if” statement and just have the two nested foreach loops.


#2

I’ve been using this for a while with no issues.

I’m confident it would work with multiple sensors. The “motion Activated” allows me to turn the lights on with my Echo and they will stay on. But if they turn on with motion they turn off with no motion.

Switch 26 is an override switch. I use this when I have guests over for a while and they get get confused.


#3

Hmm, thanks for posting, but the “on events from” won’t let me select my device variable, it will just let me pick from a list of physical devices. :frowning:


#4

Good call. I prefer to use device variables for a lot of my pistons as well. How many motion sensors are you talking about in this case though? You could just forgo the device variable, and select your motion sensors for the on events from