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.
Entity naming
Section titled “Entity naming”Control commands take the entity name without its domain prefix. The domain comes from the command you run, so:
go-automate ha light turn-on bedroom_lampacts on the entity light.bedroom_lamp.
Lights
Section titled “Lights”Turn a light on, off, or toggle it:
go-automate ha light turn-on bedroom_lampgo-automate ha light turn-off bedroom_lampgo-automate ha light toggle bedroom_lampAliases keep it short for keyboard shortcuts — ha l on, ha l off, and ha l t:
go-automate ha l t bedroom_lampSwitches
Section titled “Switches”Switches work the same way under the switch command (alias s):
go-automate ha switch turn-on desk_fango-automate ha switch toggle desk_fanInput booleans
Section titled “Input booleans”Flip helper booleans that drive your automations with the input_boolean command
(alias ib):
go-automate ha input_boolean turn-on guest_modego-automate ha input_boolean toggle guest_modeAssist satellites
Section titled “Assist satellites”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:
go-automate ha assist_satellite announce living_room "Dinner is ready"Service actions at a glance
Section titled “Service actions at a glance”| Command | Alias | Service | Target |
|---|---|---|---|
ha light turn-on / turn-off / toggle | ha l on / off / t | light.turn_on / turn_off / toggle | light.<name> |
ha switch turn-on / turn-off / toggle | ha s on / off / t | switch.turn_on / turn_off / toggle | switch.<name> |
ha input_boolean turn-on / turn-off / toggle | ha ib on / off / t | input_boolean.turn_on / turn_off / toggle | input_boolean.<name> |
ha assist_satellite announce | ha as a | assist_satellite.announce | area_id |
Next steps
Section titled “Next steps”- Watch entities to react to state changes.
- See every flag in the Commands reference.