I see a lot of people who use Node-RED as their automation engine looking for a way to trigger a flow from the Home Assistant UI. Here’s how I do it.
First I created an empty
script: good_morning: sequence:
And a button in Lovelace.
- type: entity-button entity: script.good_morning name: "Good Morning" icon: mdi:coffee tap_action: action: call-service service: script.turn_on service_data: entity_id: script.good_morning
Then in Node-RED.
events: all node checks only events of type
switch node checks which
script was called.
call-service node turns on my bedroom ceiling lights in a 30 seconds transition.
When I press the button (below) in the UI or say “Hey Google, good morning” 1 the flow is triggered and the lights turn on.
I prefer this approach because I do not like the idea of using
input_boolean for this. It would be like using a light switch to activate a doorbell.