Control and read Home Assistant from the shell, scripts and status bars with the ha-bridge CLI. Use for calling actions, reading or watching state and events, --bar-json output, templates, searching entities, automation and script configs, labels, categories and areas, listing and checking updates, reading Home Assistant's logs to diagnose or confirm a fix, or connecting an app to a bridge. Not for changing ha-bridge itself.
Ships in timmo-ha-bridge-cli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
ha-bridge keeps one Home Assistant connection per machine and serves it on a Unix socket. Every command except serve and setup is a small client of that socket. When the agent has an ha-bridge Code Mode namespace, prefer its tools for the operations it covers (reading state, search, templates, history, logs, configs, labels and categories, calling actions); the rules below still apply.
~/.config/ha-bridge/config.yml, to do something a command or the bridge protocol already does.light, media_player, alarm_control_panel), each with action subcommands.cover.close_cover is cover close, light.turn_on is light turn-on and media_player.volume_set is media_player volume-set. Check ha-bridge <domain> --help for the list.cover increase-position --step 5 or climate decrease-temperature, rather than reading the value and setting a new one. They stay in the entity's range and add up quick steps; see /actions#stepping-a-value.ha-bridge setup for the user. It prompts for a token; ask them to run it.system_log clear or changing log levels with logger. Clearing throws away the evidence a diagnosis needs, and debug levels flood the log.update install on anything the user didn't name. update list, update get and update check only read or refresh, so use them freely; update check can take up to two minutes with a Supervisor.home-assistant skill alongside this one.ha-bridge search <words> finds entities, devices, areas and matching ha-bridge commands from the bridge's cache. Use it to turn a name into an entity ID.ha-bridge <command> --help, and --help on each subcommand, is the reference for the installed version.docs-ha-bridge MCP server when it's available (search_docs, then get_page), or https://ha-bridge.timmo.dev.| Task | Docs route |
|---|---|
| Targets, exit codes and the domain list for actions | /actions |
| One domain's actions | /actions/<domain>, such as /actions/lights |
| Automation and script configs | /actions/automations, /actions/scripts |
| Every command, argument and flag | /commands, /commands/<command> |
Read or watch state, targets, --json and --field | /using/reading |
| Status bar or script output | /using/bar-json |
| Templates | /using/templates |
| Events, triggers and conditions | /using/events |
| History and logbook | /using/history |
| Logs, Core's errors and log search | /using/logs |
| Updates: list, check, release notes, install | /actions/updates |
| Searching | /using/search |
| Labels, categories and areas | /using/registries |
| Connecting an app or another language | /libraries, /using/protocol |
| Socket path, config and the user service | /configuration, /running |
ha-bridge light turn-on desk), or --entity, --device, --area, --floor and --label with an ID or name.get, watch and homeassistant turn-on/turn-off/toggle take full entity IDs, since they cover every domain.get or watch. Use --json, --field <path>, or --bar-json.--field paths start from the state object: attributes.current_position, not state.attributes.current_position. A path that finds nothing prints an empty line, with a warning on stderr.--bar-json prints one JSON object per line (text, tooltip, class, name) for one entity, and fails when the target matches more than one. It can't be combined with --json or --field.Restart=on-failure.template watch --bar-json.Home Assistant renders templates on its main thread. While one runs, nothing else in Home Assistant does, and a long enough stall makes the Supervisor's watchdog restart it.
states, such as device_id, integration_entities, area_name or labels called once per entity. Answer those questions with search (it reads the bridge's cache, not Home Assistant) or registry get instead.--timeout (or the tool's timeout) asks for more, and never more than 30. Home Assistant refuses one that runs over with "Exceeded maximum execution time". Treat that as "narrow the template", not "raise the timeout".get of one entity) first.ha-bridge automation config and ha-bridge script config read and write them as Home Assistant's editors do, and need an admin token.
automation config get <automation>. It prints the exact triggers, offsets, conditions and actions as YAML, so you don't have to infer them from the logbook or history. --json adds its id and whether it's editable.create -f <file> and update <automation> -f <file> take YAML or JSON, or -f - for stdin. Home Assistant validates the config and refuses mistakes, saying why. update replaces the whole config, so start from config get and keep its id and alias.validate -f <file>. Saving only catches what Home Assistant's schema rejects; validate also lists the entities, actions, devices, areas, floors and labels the config names that don't exist, which Spook would otherwise flag after saving. It exits 1 on any problem, and doesn't need an admin token.trigger watch '<trigger>' and condition test '<condition>'.home-assistant skill covers which ones exist.create succeeds: give it its labels, category and area too (see Labels, categories and areas below).automations.yaml and scripts in scripts.yaml can be changed. Others exit 1 saying so; edit them where they're defined.ha-bridge label, category, device and registry organise Home Assistant through its registries, without Spook. Changes need an admin token.
registry get --entity <entity_id> --device <device> --area <area> --json shows what an item has: its labels, area, and an entity's device and categories, with names.label add <label...> and label remove <label...> take --entity, --device and --area, repeated, and keep every other label the items have. Don't build the full list yourself.category set <category> <entity_id...> and category clear <entity_id...> work out the scope from automations, scripts and scenes; helpers need --scope helpers.device set-area <area> <device...> and device clear-area <device...> move devices; their entities without their own area follow.entity set-area <area> <entity_id...> gives entities, automations, scripts and helpers an area of their own; entity clear-area <entity_id...> takes it away, so a device entity follows its device again.label list, category list <scope> and search.home-assistant skill describes. automation config create prints the config's ID, not the entity ID, so find the entity with search <a distinctive word from its alias> --domain automation, then run label add <label...> --entity automation.<object_id>, category set <category> automation.<object_id> and entity set-area <area> automation.<object_id>. Scripts work the same way.search --kind entity --device-class power --json (and --device-class energy) against search --kind entity --label energy --json. A label search also matches labels an entity gets from its device, so anything only in the first list has the label neither way. --exclude-label needs a target to exclude from, so it can't do this alone.ha-bridge logs reads Home Assistant's logs through the bridge. Areas and aliases follow the Home Assistant CLI: core (ha), supervisor (su), host (ho), apps (addons), audio, cli, dns, multicast and observer, each with get and watch. Check ha-bridge logs <area> <command> --help for the flags.
To diagnose:
logs core errors get --json. It's Core's own deduplicated list, the one Settings > System > Logs shows: logger, source file and line, messages, traceback, count, first_occurred and timestamp. The logger names the integration, as homeassistant.components.<domain> or custom_components.<domain>.logs search <words> --json, which ranks matches across Core's errors and Core's log; add --source for the Supervisor, the host or an app's slug. Every word has to match, so search for one distinctive term first, then narrow.logs core get -n 200 --json, or logs core get --integration <domain> for one integration and its libraries (Home Assistant 2026.11 or newer). Core's records keep their tracebacks, and -n counts records, not lines.logs host boots, then logs host get --boot -1 or logs core get --boot -1. logs apps list gives the slugs for app logs.To confirm a fix, note the error's count and timestamp before, then logs core errors watch --json --search <term>. It prints each new error and each repeat, so silence after the change is the evidence. logs <area> watch follows a log the same way.
--json, never the plain text. get prints one JSON list of records; watch prints each record as a JSON string per line.logs core watch before 2026.11. Treat that as "this log isn't available" and carry on with the others; retrying won't change it.You're inside a Home Assistant app when SUPERVISOR_TOKEN is set. The bridge then connects through the Supervisor with the app's token, so there's no config file and nothing to set up.
ha-bridge serve itself. Don't run serve or setup.hassio_api is missing means the app doesn't have it; only the app can change that, so carry on with the logs you can read.ha-bridge.service user unit's status (the systemd Code Mode namespace, or systemctl --user status ha-bridge.service), or the app's log inside an app; don't start a second serve alongside it.systemd namespace's logs, or journalctl --user -u ha-bridge.service), or the app's log inside an app.--socket, then $HA_BRIDGE_SOCK, then $XDG_RUNTIME_DIR/ha-bridge/ha-bridge.sock. Set HA_BRIDGE_SOCK only to target a different bridge, such as a development one.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
2 plugins in one repository ship this exact skill · first indexed Nov 27, 2026
/timmo-ha-bridge-cli:ha-bridge-clifrom timmo-ha-bridge-cli
timmo-ha-bridge-cli@timmo001-skills is listed by timmo001/skills — review the source before installing
npx claudepluginhub timmo001/skills --plugin timmo-ha-bridge-cli