Hassio restart with trigger

I should start an automation based on the hassio start. I followed some guides but it seems wrong.
Someone help me?
thank you.

https://pastebin.com/0ezDqaHC

shell_command:
  ha_start: 'curl https://192.168.1.173:1880/endpoint/hastart'
# 'curl http://localhost:1880/hastart'
# http://localhost:1880/endpoint/hastart if you're using the Node-RED Community Hass.io Add-on.

automation:

  • alias: homeassistant_start
    trigger:
    • platform: homeassistant
      event: start
      action:
    • service: shell_command.ha_start

Try the method I described here (the one with the status node).

I can’t understand which status node should be checked.

In the status node, select one of the home assistant nodes you’re using in your flows. I’d suggest selecting an events: all, an events: state, or a trigger: state node.

EDIT: Added image because the status node looks a little different in the latest versions of Node-RED compared to the one showed in my blog post.

37 PM

but if I put this state, does the flow not start whenever the entity’s state changes?

The flow will start when the status of the selected node (in the status node) changes to “connected”.

I can not understand which node could give cme been connected between the nodes that I posted

1 Like

The node you will select doesn’t need necessarily to be part of that same flow, they only have to be using the same Home Assistant server. Any events: all, events: state, or trigger: state node will do.