Hi,
I’m using Node-RED to do some complex automation, but the nature of my setup means that I sometimes have to disable parts of flows temporarily - particularly events that trigger on certain schedules. I’ve solved this by inserting a switch node just before the key action that checks a local boolean value. If true, do the thing, if false, don’t.
The value of boolean is set by two injection nodes, labelled ON and OFF, which effectively act as a way to enable or disable parts of flows. It works great.
Here’s an example of why this is useful. I’ve got an automation that controls access on a farm gate. It works on a schedule, so that packhouse trucks can get in during the day, but the gate will close after hours and over the weekends. But because some people have remote clickers, the automation also checks the gate state periodically and ensures that the gate is doing what it’s supposed to. That way, it’s never accidentally left open, nor can a truck be locked out when it needs to get in.
But, sometimes there’s a need to work over the weekend. In that case, I need the gate to stay open, but I’d rather not have to re-do the schedule just for this one event. Deleting the link to the closing flow obviously works, but is crude. Simply clicking the OFF button on that flow disables it until I click the ON button again.
The problem I’m now facing is that I don’t know what the current value of the boolean is. Is there some node that will visually display the value of a boolean, either as a text label, or as a visual on/off thingy?
Thank you.