ha-states
Read entity state. Prerequisite: read ../ha-shared/SKILL.md for connection/auth.
Commands
hass-cli state list # every entity
hass-cli state list -o json | jq '.[] | select(.entity_id|startswith("light."))'
hass-cli state get sensor.kitchen_temperature
hass-cli state get light.kitchen -o yaml # full attributes
Shape tables. state list already defaults to
ENTITY=entity_id,STATE=state,NAME=attributes.friendly_name in table mode;
pass --columns to override:
hass-cli state list --columns ENTITY=entity_id,STATE=state --sort-by entity_id
History and logbook
hass-cli system history --start 2026-01-01T00:00:00+00:00 --entities light.kitchen,sensor.temp
hass-cli system logbook --entity automation.demo
Notes
state setoverwrites the state object in the state machine; it does NOT drive a device. To actually change a device, useservice call(see../ha-services/SKILL.md).- Filtering/aggregation is client-side: pipe
-o jsontojq.