Skip to content
Home Assistant BridgeHome Assistant Bridge
Esc
↑↓navigate↵open⌘Jpreview
On this page

Actions

Control Home Assistant entities from the command line, one action per command.

Action commands send one Home Assistant action through the bridge and exit. They exit with status 1 and print the error when the bridge isn’t running, the options are invalid, or Home Assistant rejects the action.

Targets

Action commands act on a target, like actions in Home Assistant. Entity IDs go last, with or without the domain, since the command already says which domain it acts on. Repeat them for more:

# Acts on light.bedroom_lamp and light.hall
ha-bridge light turn-on bedroom_lamp hall

Flags pick entities by what they belong to. Each takes an ID or a name, and can be repeated:

ha-bridge light turn-off --area Kitchen --area "Living room"
ha-bridge cover close --floor Upstairs
ha-bridge switch turn-on --label Christmas
ha-bridge light toggle --device "Desk lamp"
ha-bridge light turn-on --entity "Bedroom lamp"

--entity takes an entity ID, an ID without the domain, or the entity’s display name in that domain. A name has to match exactly one item, ignoring case, or the command fails and lists the matches. Home Assistant then decides which entities the target contains, so an area includes entities on devices in it.

Commands that need one entity, such as script run, camera snapshot and assist_satellite ask-question, take the same target and fail unless it matches exactly one. Fixed arguments, such as the position in cover position 50 office_blind, come before the entity IDs.

get and watch take full entity IDs, since they read entities in any domain.

Domains

Domain Command Alias What it does
Lights light l On, off and toggle, with brightness, colour and effects
Switches switch s On, off and toggle
Input booleans input_boolean ib On, off, toggle and reload
Input numbers input_number in Set, step up or down, and reload
Covers cover c Open, close, stop, position and tilt
Climate climate cl HVAC mode, temperature, humidity and other modes
Assist satellites assist_satellite as Announce, start a conversation or ask a question
Cameras camera None Snapshots, recording, streams and motion detection
Buttons button, input_button None Press, and reload input buttons
Locks lock None Lock, unlock and open
Valves valve None Open, close, stop and position
Sirens siren None On, off and toggle, with tone and volume
Remotes remote None On, off, and send, learn or delete commands
Selects select, input_select None Pick or step through options
Numbers, text, dates and times number, text, date, time, datetime, input_text, input_datetime None Set a value
Counters counter None Step, reset or set the count
Scripts script None Start, stop or run and wait for a response
Automations automation None On, off, trigger and reload
Scenes scene None Activate, apply states, create and delete
Timers and schedules timer, schedule None Start, pause and change timers, read schedules
Groups group None Create, change and remove groups
Fans fan None On, off, speed, preset, oscillation and direction
Humidifiers and water heaters humidifier, water_heater None On, off, modes, humidity and temperature
Media players media_player mp Playback, volume, sources, grouping and browsing
Vacuums and lawn mowers vacuum, lawn_mower None Start, pause, dock and clean areas
Alarm panels alarm_control_panel alarm Arm, disarm and trigger
Updates update None Install, skip and clear skipped
Notifications and speech notify, persistent_notification, tts pn Send notifications and speak messages
To-do lists todo None Read, add, change and remove items
Calendars and weather calendar, weather None Read and add events, read forecasts
Conversation and AI tasks conversation, ai_task None Talk to agents, generate data and images
Images and device trackers image, image_processing, device_tracker None Save images, scan and report locations
Alerts and utility meters alert, utility_meter None Acknowledge alerts, reset and calibrate meters
System logbook, system_log, logger, recorder, frontend, lovelace, backup, wake_on_lan, cloud, ffmpeg, google_assistant wol Logs, log levels, history, themes, backups, wake on LAN, cloud, FFmpeg and Google Assistant
Shell, REST and Python commands shell_command, rest_command, python_script None Run configured commands and scripts, with their results
Supervisor hassio None Apps, backups, restores, host and mounts
Home Assistant homeassistant, template, zone and other YAML integrations None Any entity, restart, reload and location

Commands lists every argument and flag. Any other action can be called from your own app with CallAction.

Last updated on