I am seeing something odd here with what I thought was a fairly straight forward block of code. I have an HAI Scene Switch in which Scene A is set to do a link toggle on one set of lights and scene B was set to do a link toggle on another set. I was running into the problem where the lights would be controlled manually sometimes so the toggle wasn't always working as expected. So I figured the following block of code would fix part of the problem:
Essentially, I have written what I think is the following:
If either of two lights goes to off, check and see if both lights are off. If they are off then set the UPB link corresponding to scene B to off.
Now this part works great. If I turn off both lights manually, the HAI panel notices that and sends the link off command which makes the scene switch update..
Now, the odd part.
When I toggle Scene A to ff, which is controlling a completely different set of lights, the HAI panel executes that block of code above even thought neither of those when blocks should have fired and neither of those if statement should be true. Any ideas?
Code:
101. WHEN Stairs Light OFF
WHEN Upstairs Hallway Light OFF
AND IF Stairs Light OFF
AND IF Upstairs Hallway Light OFF
THEN Upstairs OFF
Essentially, I have written what I think is the following:
If either of two lights goes to off, check and see if both lights are off. If they are off then set the UPB link corresponding to scene B to off.
Now this part works great. If I turn off both lights manually, the HAI panel notices that and sends the link off command which makes the scene switch update..
Now, the odd part.
When I toggle Scene A to ff, which is controlling a completely different set of lights, the HAI panel executes that block of code above even thought neither of those when blocks should have fired and neither of those if statement should be true. Any ideas?