← ClaudeAtlas

ha-entitylisted

Query Home Assistant entity states and call services. Use when asked "what's the state of X", to list/filter entities, to turn something on/off, set a value, or call a service.
LayerTM/ClaudeInHA · ★ 0 · AI & Automation · score 70
Install: claude install-skill LayerTM/ClaudeInHA
Query entity states and control Home Assistant from inside the add-on container. Two access paths — use `hass-cli` if the add-on's HA Token is set, otherwise the Supervisor-proxied Core API (always available; `$SUPERVISOR_TOKEN` is always present). ## Workflow (always) 1. **Find the exact `entity_id`** first — list/filter states, never guess. 2. **Read its current state** to confirm you have the right entity. 3. **Act** — call the service with a precise target. ## Preferred: hass-cli (only when HA Token is set) `hass-cli` works only if the add-on's Long-Lived Access Token is configured (`HASS_SERVER`/`HASS_TOKEN` set). If commands error with no server/token, fall back to the Core API below. ```bash hass-cli state list # all entities hass-cli state list | grep '^light\.' # filter by domain hass-cli state get light.kitchen # one entity hass-cli service call light.turn_on --arguments entity_id=light.kitchen,brightness_pct=60 hass-cli service call light.turn_off --arguments entity_id=light.kitchen ``` ## Core API via curl + jq (always works) Base URL `http://supervisor/core/api/`, header `Authorization: Bearer $SUPERVISOR_TOKEN`. ### List / filter states ```bash # All entity IDs curl -sf http://supervisor/core/api/states \ -H "Authorization: Bearer $SUPERVISOR_TOKEN" | jq -r '.[].entity_id' # Filter by domain or name prefix curl -sf http://supervisor/core/api/states \ -H "Authorization: Bearer $SUPERVISOR_TOKEN" \ | jq -r '.[] |