Hey Everybody, thanks to this awesome community, I have my first two automations going. However, in an effort to become more acquainted with Node Red, I am wanting to learn how to add an Input Boolean to my existing automation, so that I can have manual control of it via the front end. If I understand it correctly, I need to use the trigger: state node, but I am 90% I am doing it wrong, as I cannot figure it out. I also tried using the current state node, but again, no luck. This is my flow
Not 100% what you are asking for but if you want to control anything with your input_boolean you will need to use the event state node set to your boolean. When you flick the switch it can call what ever service you want using the call service node.
If you want your automation to work depending on whether the input_boolean is on or off would mean you using a current state node set to your boolean and placing it into your flow.
Thank you for posting the picture! It’s so easy and obvious now that you post it but I’ve been searching for this exact thing and painfully reading all the misunderstandings. This was it!
Note the state and entity locations set to “None”. That’s important to not change the original messages to true/false.
Also note the “string” check for “on” or “off” not a boolean. I got confused when debugging and manually triggering the check because it can coerce it to a true/false boolean on output, but once you keep the original output, it won’t trigger as you expect.
Do you have two input_booleans dealing with your alarm? One for armed and one for disarmed? If so, can I ask why? I think you could get away with a simple “Alarm” boolean, and when it is on, the alarm is armed and when it is off, the alarm is disarmed.
For that first Current State node, have you tried toggling the input_boolean and seeing if Node-red picks up the change? I had the issue a while ago that my input_booleans wouldn’t pick up changes. I do not know what caused it but it hasn’t happened for a while now.
Your automation looks correct though. Try restarting Node-Red and see if that fixes the problem.