Dummy Switch (on-off) for Node Red?

Hello all!

I’m starting to transition my automation work into Node Red, mostly because I can do some more powerful stuff there and have perfected my own presence detection there. For all but one room I’m still using HA, but am interested in moving the automation to flows in NR, but need a way for the wife to disable/enable them. In my mind it’s just a switch in HA, that she can access, that allows her to turn off (for example) the Living Room automations.

I didn’t come up with anything, but can I create a dummy switch that she can toggle in the HA UI?

1 Like

I call those “mode” input booleans. :wink: I have one called input_boolean.guest_mode which disables evening dimming and things like that.

You can create these switches and create an if statement that only continues with the flow if the switch is enabled.

You can acomplish that with an input_boolean in front of the triggers nodes. Or you can expose the tigger node if posible to home assistant as a switch.

I use MQTT switches in HA. Then in NR, I use the TRAFFIC node and set the allow/stop parameters to be my MQTT switch states. Then it doesn’t matter if a trigger happens before that traffic node, it stops the flow from happening, which means I can still log that an event happened, but nothing occurred because it was “disabled”.

1 Like

Thanks everyone!

I assume this is what you’re all pointing me to; https://www.home-assistant.io/integrations/input_boolean/

Thanks, I’ll take a look.