Call Home Assistant Service
Runs any Home Assistant service — a thermostat, a media player, a lock, a vacuum, a script.
An action in the Smart Home group.
Its type is action.ha_service.
Declared ports
Section titled “Declared ports”| Port | Label | Flow | Type |
|---|---|---|---|
in |
in | execution in | — |
out |
out | execution out | — |
data |
Extra data | data in | String |
state |
state | data out | Object{service: String, target: String, called: Boolean, response: String, error: String} |
Configuration
Section titled “Configuration”| Field | Key | Default | Notes |
|---|---|---|---|
| Home Assistant | hub |
— | chosen from HA_HUB |
| Entity | target |
— | chosen from HA_ENTITY |
| Service | service |
— | chosen from HA_SERVICE |
| Extra data | data |
— | JSON |
Call Home Assistant Service runs any service the hub exposes: a thermostat, a media player, a lock, a vacuum, one of your own scripts.
- The form is built from the hub, so it differs for every service.
- A failed call is reported on
state. It does not halt the macro.
Working of the Node
Section titled “Working of the Node”- Pick a hub, an entity and a service.
- The hub is asked what that service accepts, and the matching rows appear underneath.
- On run, the service is called with those rows plus anything in Extra data (JSON).
outpulses either way, andstatesays what happened.
The Form Is Built From the Hub
Section titled “The Form Is Built From the Hub”Choose light.turn_on and you get brightness and colour. Choose
climate.set_temperature and you get a temperature. Two consequences:
- The Configuration table above lists only the fields the node declares, so the service-specific rows are missing from it.
- With the hub unreachable, the choosers are empty and no extra rows appear.
Why Hub, Entity and Service Are Pickers
Section titled “Why Hub, Entity and Service Are Pickers”A hub publishes a complete list of its entities and services, so the chooser covers every possible answer and a typed id could reach nothing extra. Event types in the other Home Assistant nodes are typed, because Home Assistant publishes no way to list them.
Example: dim the hall light
Section titled “Example: dim the hall light”- Pick the hub, then the hall light as Entity, then
light.turn_onas Service. - Set the brightness row that appears underneath.
- Break out
stateand branch oncalledwith an If.
Explanation:
- The brightness row is not declared by the node. It came from the hub’s description of
light.turn_on. - Branching on
calledis how a macro notices the hub was unreachable.
Points to Remember
Section titled “Points to Remember”statecarriesservice,target,called,responseanderror.- Extra data (JSON) is merged into the call and is also available as the
dataport. - The service-specific rows are read while you configure the node, not when the macro runs.