That did put on a bit of a light show! This should fix it though - I forced the piston to ‘never subscribe’ to the light switches/outlets. The problem was each time a light changed, it would make the piston run from the top.
Seems to work well now!
That did put on a bit of a light show! This should fix it though - I forced the piston to ‘never subscribe’ to the light switches/outlets. The problem was each time a light changed, it would make the piston run from the top.
Seems to work well now!
An easy way to avoid looping is via variables. Write the IF statements such that they are all dependent on the ‘true’ status of a Boolean variable. When the web request comes in, have the first component of the piston set the variable to true. Then the components run… then the last step in the piston is to set that variable to ‘false’ and then exit.
If it needs to run the whole thing twice, use numeric variables beginning at zero and then when it reaches ‘2’, it no longer runs.