I am trying to get a scene to run only when a virtual switch (device id 34) is set to on and when a dimmer (device id 14) is currently off. I am using the following code but it is saying that there is an error - can anyone see what I have done wrong?
Ive experienced in the past where a variable value is “0” lua considers the variable undeclared because of its null value. I understand that setting a variable’s value to null is the same as un-declaring its existance. It might therefore render the statement inoperable as its referencing a non existent variable.
Can anyone confirm this or clarify, please?
If a variable has not been initialised it will return nil. This is not the same as “0” or 0. This is not necessarily an error - it depends what you are trying to do with it.
Best Home Automation shopping experience. Shop at Ezlo!