I was looking for a way to run a command when home assistant is restarted. Based on the changelog it looked like the way to do this was to use the “Events all” node and specifying the home_assistant_client
event type when it’s msg.payload
is connected
. However on restart nothing is ever triggered even though the text underneath the node changes from ‘disconnected’ to ‘connected’. Any idea what I"m missing?
[
{
"id": "42c22cba.2751fc",
"type": "api-call-service",
"z": "842f595d.496c68",
"name": "Install chromedriver",
"server": "b454cc2c.3067b",
"service_domain": "shell_command",
"service": "install_chromedriver",
"data": "",
"mergecontext": "",
"output_location": "",
"output_location_type": "none",
"x": 560,
"y": 240,
"wires": [
[]
]
},
{
"id": "b1446f65.e73bc",
"type": "switch",
"z": "842f595d.496c68",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "connected",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 370,
"y": 240,
"wires": [
[
"42c22cba.2751fc"
]
]
},
{
"id": "7b430d40.702f84",
"type": "server-events",
"z": "842f595d.496c68",
"name": "home_assistant_client",
"server": "b454cc2c.3067b",
"event_type": "home_assistant_client",
"x": 160,
"y": 240,
"wires": [
[
"b1446f65.e73bc"
]
]
},
{
"id": "b454cc2c.3067b",
"type": "server",
"z": "",
"name": "Home Assistant",
"legacy": false,
"hassio": false,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true
}
]