So I am trying set up some global variables. Basically I am setting a global variable the holds the lights in in the bedroom.
If I put in a if statement that says if @bedroomLights do whatever, then the piston will never fire. Yet if I make a loval variable and use that instead of the global then the piston will fire.
The global variable will work farther down in the piston just not for the trigger. Am I missing something?
Sorry about that. This is one for my garage door that has the same issue. The code is using the global variable for the if trigger. You will notice I have also set a local variable. If I switch to that the code runs fine.
Global device variables do not subscribe to events by design - this is because a later update of said global variable would NOT cause all pistons to resubscribe to the newly contained devices, whereas a local variable would require the user to save the piston, hence resubscribing.