I have 2 rules in Rule Machine, one that turns my lights red when one of the doors stays open for 30 secs and one to switch them back when all doors are closed again. I use global variables to save light colors and levels before I switch them to red in the first rule so I know what to switch them back to in the second rule. Problem is, for some strange reason the first rule runs fine, but it deletes the global variables for color, so once the second rule runs, I get a Null pointer exception because the variable doesn't exist anymore. Both rules seem to keep running, but the second one obv doesn't work because the color variables do not exist anymore.
Any idea as to why this is happening?
Edit: all variables are Number btw and I use the device attribute light.color