It would be really nice if we could have Node Red integration in HA, so it gives us custom switches as entities which can be linked to a node red flow. For instance, when an entity ex switch A is triggered on the front end in HA it triggers a flow in Node Red. I now something like this would be possible through writing a script. But Remember point of Node Red is to do away with as much as coding as possible
Huh?
You don’t need to write any scripts at all. You can use mqtt switches or input booleans, or even input selects…you can use literally any entity you have in HA in node red using the current methods.
There is no reason to add a special component to do so.
Can I create MQTT switches and sensors? Here is what I want to achieve, I want to have a toggle switch on the front which when upon pressing it activates a flow in Node Red, which in turn call a http webhook. I tried to fiddle around with templating but has a learning curve.
My second goal is to be able to read sensor status from alarm.com integration (they are shown as one single attribute: "active sensors: sensor1, sensor2 and convert them to HA sensors.
Is there a way to do this without templating?
OK. Create an MQTT switch or input boolean in HA.
In Node Red, drop one of these on a flow: There is your trigger to start a flow.
Do you have a sample?
Thank you so much for the input. So I have tried to add it as MQTT light which talks to node-red and works perfectly fine. But I am wondering if there is a way to make it shows as one button toggle switch or sliders like my other switches on the Lovelace?
Instead of a light make it a switch
Didn’t work
Works for me.