I have a scenario where I have a blind that needs to close when a virtual switch turns on and then move to the same position as the blind next to it when the switch turns off.
I got the first part no problem, the second part I'm having trouble with. I made a rule that triggers on the switch turning off, then it refreshes the blind next to it and sets a local variable to that blind's position. Then I have an action that sets the position of the original blind.
When this rule runs, the log shows an error Error: Cannot invoke method toInteger() on null object
Worse, when trying to edit the rule, the same error occurs so it is no longer editable.
Anyone have any hints as to how to do this the right way? I'm a noob here