Skip to content

Home Assistant

The home-assistant command (aliased ha) calls Home Assistant services over the WebSocket API. It connects using the URL and token from your configuration, calls the service, and exits.

Control commands take the entity name without its domain prefix. The domain comes from the command you run, so:

Terminal window
go-automate ha light turn-on bedroom_lamp

acts on the entity light.bedroom_lamp.

Turn a light on, off, or toggle it:

Terminal window
go-automate ha light turn-on bedroom_lamp
go-automate ha light turn-off bedroom_lamp
go-automate ha light toggle bedroom_lamp

Aliases keep it short for keyboard shortcuts — ha l on, ha l off, and ha l t:

Terminal window
go-automate ha l t bedroom_lamp

Switches work the same way under the switch command (alias s):

Terminal window
go-automate ha switch turn-on desk_fan
go-automate ha switch toggle desk_fan

Flip helper booleans that drive your automations with the input_boolean command (alias ib):

Terminal window
go-automate ha input_boolean turn-on guest_mode
go-automate ha input_boolean toggle guest_mode

Announce a message to an area through an assist satellite with assist_satellite announce (alias as a). Pass the area ID first, then the message:

Terminal window
go-automate ha assist_satellite announce living_room "Dinner is ready"
CommandAliasServiceTarget
ha light turn-on / turn-off / toggleha l on / off / tlight.turn_on / turn_off / togglelight.<name>
ha switch turn-on / turn-off / toggleha s on / off / tswitch.turn_on / turn_off / toggleswitch.<name>
ha input_boolean turn-on / turn-off / toggleha ib on / off / tinput_boolean.turn_on / turn_off / toggleinput_boolean.<name>
ha assist_satellite announceha as aassist_satellite.announcearea_id