Quick Answer:
I don’t think it will constantly loop, but each event will likely loop more than once…
(you can verify by turning Logging to FULL)
Long Answer:
You have zero triggers
in this piston… so all conditions
are treated as triggers
.
(the lightning bolts in the left margin)
This means, when any of the 3 devices changes (in either direction)…
- Switch 1’s switch (on or off)
- White Bulb 2’s switch (on or off)
- White Bulb 4’s switch (on or off)
… the piston will run thru the entire code top to bottom, and execute anything not blocked by conditions
.
All of this, paired with the knowledge that Momentary Switches takes a few moments to turn itself off, and the hub takes a moment to register the change… and you can see why I avoid this type of logic…
…but again, if it works for you, great…
Personally, I would never code like this:
IF DeviceA changes
Then Change DeviceB
END IF
IF DeviceB changes
Then Change DeviceA
END IF