Skip to content
Download

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.

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}
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.
  • 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).
  • out pulses either way, and state says what happened.

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.

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.

  • Pick the hub, then the hall light as Entity, then light.turn_on as Service.
  • Set the brightness row that appears underneath.
  • Break out state and branch on called with 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 called is how a macro notices the hub was unreachable.
  • state carries service, target, called, response and error.
  • Extra data (JSON) is merged into the call and is also available as the data port.
  • The service-specific rows are read while you configure the node, not when the macro runs.