hass-axi
Skill1 starsChanged 59 days agoMITView on GitHub
Operate a Home Assistant installation through the hass-axi CLI - read and update the entity, area and device registries that only the WebSocket API exposes, and call services with a capability pre-check and an explained refusal. It also finds sensors by what they measure and where they are, and summarises state history, the logbook and recorder statistics - an energy total, an average with min and max - with their data-quality caveats. Use whenever a task touches home automation: renaming an entity or the device behind it, moving things between areas, checking what a device is doing or did, reading how much energy was used, or turning something on.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- dmealing/hass-axiword for word, first seen Nov 16, 2026
Other versions1 project uses a version of this.
Word for word · 1
- dmealing/hass-axi★ 1100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 11 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Create the token on the Home Assistant profile page, under Security.
- Very specific: line 21
Run hass-axi doctor to confirm both transports work.
- Very specific: line 33
Every write is then refused before it is sent, over REST and over the WebSocket alike, with code: READ_ONLY and exit 2.
- Distinctive: line 56
Read entity states from the Home Assistant REST API.
- Very specific: line 83
run hass-axi statistics get <entity_id> for a total or an average over a window
- Distinctive: line 87
Read entity state timelines from the recorder, with time in each state.
- Very specific: line 97
run hass-axi statistics get <entity_id> for long-term totals and averages.
- Distinctive: line 101
Read the logbook: what changed, when, and what caused it.
- Distinctive: line 114
Read recorder statistics: a total for meters, an average with min and max otherwise.
- Distinctive: line 163
Read and update the entity registry over the WebSocket API.
- Very specific: line 178
update shows what it would change and sends nothing until --write is given
- Distinctive: line 182
Read and update the area registry over the WebSocket API.
- Very specific: line 195
create and update show what they would do and send nothing until --write is given
- Distinctive: line 201
Read the floor registry over the WebSocket API.
- Distinctive: line 212
Read the label registry over the WebSocket API.
- Distinctive: line 222
Read and update the device registry over the WebSocket API.
- Distinctive: line 276
Check Home Assistant answers and accepts the token, and how fast.
- Very specific: line 283
run hass-axi doctor to check the WebSocket API and the environment as well
- Distinctive: line 287
Check the environment, the REST API and the WebSocket API.
- Very specific: line 333
Every command supports --help, which is the authoritative reference for its flags.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
hass-axi
Agent CLI for Home Assistant. Reads and writes the registries REST cannot reach and explains a service call Home Assistant refuses. Prefer this over raw curl for Home Assistant operations.
Configuration
Both values come from the environment. There is no --token flag and no credential
file: a token on a command line leaks into shell history and the process table.
export HA_URL=https://homeassistant.example.com # or HASS_SERVER
export HA_TOKEN=<long-lived access token> # or HASS_TOKENCreate the token on the Home Assistant profile page, under Security.
Run hass-axi doctor to confirm both transports work; it exits non-zero when they do not.
Read-only sessions
A third variable makes the session incapable of changing anything. HASS_AXI_READ_ONLY is a
switch rather than a boolean: any non-empty value enables it, 0 and false included,
and unsetting it is how writes are allowed again.
export HASS_AXI_READ_ONLY=1Every write is then refused before it is sent, over REST and over the WebSocket alike,
with code: READ_ONLY and exit 2. The commands stay visible in --help and in the
command table, so a plan that needs one can be recognised as impossible rather than
mysterious. hass-axi doctor reports the mode, and the no-argument view shows
read_only: on when it is set.
Running without a global install
uvx hass-axi state list --domain light
pipx run hass-axi area listOutput
Commands print TOON on stdout and exit non-zero on failure. Add --human for a
readable table, or --json for raw JSON. Errors are structured on stdout too, and
carry the command that fixes them.
Commands
hass-axi state
Read entity states from the Home Assistant REST API.
hass-axi state list --domain light
hass-axi state list --area 'Example Room' --domain light
hass-axi state list --search lamp --limit 20
hass-axi state list --domain sensor --state unavailable
hass-axi state list --stale 24h --fields entity_id,name,age
hass-axi state get light.example_lamp
hass-axi state get media_player.example_speaker --full- state is the runtime view; run
hass-axi entity listfor registry names and areas - --area reads the WebSocket registry, where areas live; it costs one extra round-trip
hass-axi sensor
Find sensors by device class, unit, area or name, with value, unit, area and age.
hass-axi sensor list --device-class power
hass-axi sensor list --area 'Example Room' --unit kWh
hass-axi sensor list --search temperature --fields entity_id,name,value,unit,age- age is the time since the integration last reported a value; a sensor on an idle circuit can be old and healthy, so it is a fact about recency and not a fault
- an area is inherited from the sensor's device unless the entity sets its own
- run
hass-axi statistics get <entity_id>for a total or an average over a window
hass-axi history
Read entity state timelines from the recorder, with time in each state.
hass-axi history get light.example_lamp
hass-axi history get binary_sensor.example_doorway --start 7d
hass-axi history get sensor.example_temperature --start 2026-01-01T00:00:00Z --end 6h- the first row is the state the entity was already in when the window opened
- a bound with no offset is read as UTC
- run
hass-axi statistics get <entity_id>for long-term totals and averages; the recorder purges this timeline after its retention period, statistics it keeps
hass-axi logbook
Read the logbook: what changed, when, and what caused it.
hass-axi logbook get --start 2h
hass-axi logbook get --entity light.example_lamp --start 7d
hass-axi logbook get --search automation --limit 20- entries are oldest first; --limit keeps the most recent
- cause is the automation, script, service or entity Home Assistant recorded as the context of the entry, when it recorded one
hass-axi statistics
Read recorder statistics: a total for meters, an average with min and max otherwise.
hass-axi statistics list --kind sum
hass-axi statistics get sensor.example_legacy_meter --start 7d
hass-axi statistics get sensor.example_temperature --start 24h- a sum statistic (an energy or water meter) reports its total over the window; a mean statistic (power, temperature) reports its average with min and max
- an entity's statistic_id is its entity_id; Home Assistant keeps statistics only for sensors that declare a state_class
- the default period is hourly up to 3 days, daily up to 60, monthly beyond; the recorder keeps 5-minute buckets for about 10 days
- the total, mean, min and max cover the window asked for whatever the period: they are read from the hourly rows inside it, because a daily, weekly or monthly bucket starts before --start
- caveats state what the buckets show -- missing buckets, a meter that went backwards or resets, one bucket that dwarfs the rest -- and the number is never adjusted for them
hass-axi service
List Home Assistant services, read one's fields, and call them.
hass-axi service list
hass-axi service list --domain light
hass-axi service get light.turn_on
hass-axi service call light.turn_on --target-entity light.example_lamp
hass-axi service call light.turn_on --target-entity light.example_lamp --write
hass-axi service call light.turn_on --target-area example_room --data brightness=180 --write
hass-axi service call light.turn_off --target-label example_label --write
hass-axi service call climate.set_temperature --target-entity climate.example_thermostat --data-json '{"temperature": 21}' --writeservice callsends nothing without --write: it checks the call against the published service, resolves the target, runs the capability pre-check and shows the request -- and fails, as the call would, for a service that does not exist or a target that reaches nothing- --data-json takes a whole JSON object; --data takes repeated key=value pairs
- a refused call is explained from
/api/services, which a sent call reads on failure only - --target-area, --target-device, --target-floor and --target-label pre-check the published capability, because Home Assistant drops an entity that lacks it without saying so;
hass-axi floor listandhass-axi label listshow the ids
hass-axi template
Render a Home Assistant Jinja template server-side.
hass-axi template render --template '{{ states("light.example_lamp") }}'
hass-axi template render --template '{{ states.light | count }}'
hass-axi template render --template-file report.j2
echo '{{ now() }}' | hass-axi template render --template-file -- templates run on the Home Assistant instance, so they see every entity it knows about
hass-axi entity
Read and update the entity registry over the WebSocket API.
hass-axi entity list --area 'Example Room'
hass-axi entity list --domain light --fields entity_id,name,area,platform
hass-axi entity list --area none --limit 500
hass-axi entity list --device <device_id>
hass-axi entity get light.example_lamp
hass-axi entity update light.example_lamp --name 'Reading Lamp' --area example_room
hass-axi entity update light.example_lamp --name 'Reading Lamp' --write- an entity's area is inherited from its device until it is set here explicitly
- name is the name Home Assistant displays: its device's, plus original_name, unless one is set here
- entity_ids are not stable identity: filter by --area or --search, not by guessing ids
- update shows what it would change and sends nothing until --write is given
hass-axi area
Read and update the area registry over the WebSocket API.
hass-axi area list
hass-axi area list --fields area_id,name,floor_id
hass-axi area get example_room
hass-axi area create --name 'Example Room'
hass-axi area create --name 'Example Room' --write
hass-axi area update example_room --name 'Example Study'
hass-axi area update 'Example Room' --icon mdi:sofa --write- areas accept an area_id or a name anywhere <id|name> appears
- create and update show what they would do and send nothing until --write is given
- --floor has to name a floor that exists; run
hass-axi floor listto see them - deleting an area is deliberately not exposed here; use
hass-axi ws area.deleteif you mean it
hass-axi floor
Read the floor registry over the WebSocket API.
hass-axi floor list- a floor holds areas and an area holds entities, so
--target-flooronservice callreaches every entity in every area on the floor - areas are placed on a floor with
hass-axi area update <id|name> --floor <id|name>
hass-axi label
Read the label registry over the WebSocket API.
hass-axi label list- a label can sit on an entity, a device or an area, and
--target-labelonservice callreaches everything that carries it, so a label on a device reaches the device's entities althoughlabel listcounts it under devices
hass-axi device
Read and update the device registry over the WebSocket API.
hass-axi device list
hass-axi device list --area 'Example Room'
hass-axi device list --search example --fields device_id,name,model
hass-axi device get <device_id>
hass-axi device update 'Example Ceiling' --name 'Hall Ceiling'
hass-axi device update <device_id> --area 'Example Room' --clear-name --write- an entity with no area of its own inherits the area of its device
- an entity with no name of its own is named after its device
- --name writes name_by_user:
nameis the integration's own and Home Assistant does not let anything change it - devices accept a device_id or the displayed name anywhere <id|name> appears
- update shows what it would change and sends nothing until --write is given
- disabling or deleting a device is deliberately not exposed here; use
hass-axi ws device.updateif you mean it
hass-axi ws
Send a command over the Home Assistant WebSocket API.
hass-axi ws --list
hass-axi ws entity.list
hass-axi ws area.update --param area_id=example_room --param name='Example Study'
hass-axi ws area.update --param area_id=example_room --param name='Example Study' --write
hass-axi ws --raw config/floor_registry/list --write- declared names are stable; --raw passes any type straight through to the API
- --params-json takes a whole JSON object; --param takes repeated key=value pairs
- a command that writes is previewed and not sent until --write is passed;
ws --listsays which do, and a --raw type no declaration names counts as one - a long result is shortened -- lists to their first items and strings to a preview -- with the full size reported; --full prints all of it
hass-axi api
Make an authenticated request to any Home Assistant REST path.
hass-axi api /config
hass-axi api /states/light.example_lamp
hass-axi api POST /services/light/turn_on --field entity_id=light.example_lamp
hass-axi api POST /services/light/turn_on --field entity_id=light.example_lamp --write
hass-axi api POST /template --body '{"template": "{{ now() }}"}' --write- methods: GET, POST, PUT, PATCH, DELETE, HEAD; GET is used when no method is given
- the registries are not reachable over REST -- use
hass-axi wsfor those - anything but GET and HEAD is previewed and not sent until --write is passed
- a long response is shortened -- lists to their first items and strings to a preview -- with the full size reported; --full prints all of it
hass-axi ping
Check Home Assistant answers and accepts the token, and how fast.
hass-axi ping- one authenticated REST round-trip, timed; exits non-zero when it fails, so it works as a liveness gate
- run
hass-axi doctorto check the WebSocket API and the environment as well
hass-axi doctor
Check the environment, the REST API and the WebSocket API.
hass-axi doctor- exits non-zero when any check fails, so it works as a CI or hook gate
hass-axi setup
Install, check or remove the agent integrations for hass-axi.
hass-axi setup hooks
hass-axi setup hooks status
hass-axi setup hooks remove
hass-axi setup skill
hass-axi setup skill --check- hooks give ambient context every session; the skill loads on demand instead -- install either
- hook installation is idempotent and repairs the path after a reinstall or a move
setup hooks statusreports each hook as installed, stale or missing and writes nothingsetup hooks removetakes out only the entries this tool wrote, and leaves Codex's[features] hooks = trueon because other tools' Codex hooks depend on it- a session-end hook,
hass-axi context end, records which hass-axi commands a session ran -- names and counts, never arguments -- so the next session's context in that directory can say so; OpenCode has no session-end event, so its plugin records when a session goes idle
hass-axi context
Print the ambient context a session hook puts in front of an agent.
hass-axi context- this is the document
hass-axi setup hooksinstalls a SessionStart hook to print - it reads the environment, the command table and the local session record only: no connection, no token, no installation address, and it exits 0 whether or not this machine has Home Assistant
- for live state -- how many entities there are and what is unavailable -- run
hass-axiwith no arguments instead context endis the session-end hook: it reads the hook's JSON payload on stdin, counts the hass-axi commands the session ran -- command names only, never arguments -- andcontextthen reports the last session in the same directory
Rules of thumb
entity_idis not stable identity. Find entities by area or by search, and read the registry (hass-axi entity list) rather than assuming an id means what it says.- States come from REST; names, areas and platforms come from the WebSocket registry.
hass-axi stateandhass-axi entityare different views of the same installation. - An entity with no area of its own inherits its device's area.
- Every command supports
--help, which is the authoritative reference for its flags.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

