I have an illuminance sensor that gives a number depending on how bright is it. I want to use this as a switch to allow or deny lights to turn on but I can not figure out how to do it. Yes, I’m a complete noob with Node-red so I’m trying to learn as much as I can…
I think I can get it working by creating a substring that gives a true or a false value based on the number and then uses that as a switch but it seems a bit cumbersome?
Edit: Or maybe it is best to do it as a global variable that i can use in other places too…
Yes i want to get a state of the lux and then based on that have a true or false, i solved it by doing a global variable that i can use might not be the smartest but it works…
It gives a true or false based on a set value in the switch