name: HAEntities description: Query Home Assistant entity states, areas, domains, scripts, and automations. ALWAYS use this skill instead of calling the HA REST or WebSocket API directly, reading .storage files, or asking the user for entity IDs. Use before writing any automation, script, or dashboard that references entities.
HAEntities
Use ha-entities to query Home Assistant entity states, areas, domains, scripts, and automations over the WebSocket API.
Commands
ha-entities list [--domain DOMAIN] [--area AREA] [--state STATE] [--limit N]
ha-entities get <entity_id> [<entity_id> ...]
ha-entities domains
ha-entities areas
ha-entities scripts
ha-entities automations
Examples
# List all domains and their entity counts
ha-entities domains
# List all areas and their entity counts
ha-entities areas
# List all light entities
ha-entities list --domain light
# List entities in a specific area
ha-entities list --area "Office"
# List entities that are currently "on"
ha-entities list --domain light --state on
# Get first 10 entities (any domain)
ha-entities list --limit 10
# Get full details for specific entities
ha-entities get light.office_ceiling sensor.netatmo_temperature
# Combine filters
ha-entities list --domain sensor --area "Living Room" --limit 5
# List all scripts with their aliases
ha-entities scripts
# List all automations with their aliases
ha-entities automations
Output Format
list — Token-efficient summary
Returns count, filtered_count, applied filters, and an array of entities with:
entity_id,name,area,state,key_attr(domain-specific important attributes)
get — Full entity details
Returns all attributes, last_changed, last_updated, domain, area, name.
domains — Domain summary
Returns array of {domain, count} sorted by count descending.
areas — Area summary
Returns array of {area_id, name, entity_count} sorted by count descending.
scripts — Script listing
Returns array of {entity_id, alias, state, mode, last_triggered} sorted by alias alphabetically. State is on (running) or off (idle).
automations — Automation listing
Returns array of {entity_id, alias, state, mode, last_triggered} sorted by alias alphabetically. State is on (enabled) or off (disabled).
When to Use
- Before writing automations: find entity IDs, check current states, discover available entities
- Before writing dashboards: find entities to display, check what areas exist
- Debugging: check entity states, verify entity existence
- Discovery: explore what domains/areas/entities are available
- Finding scripts: use
scriptsto list all scripts with their entity_id and alias (useful for scripts with numeric IDs) - Finding automations: use
automationsto list all automations with their entity_id, alias, and state (enabled/disabled)
Tips
- Use
domainsfirst to see what's available - Use
areasto find area names (case-insensitive matching for--areafilter) - Use
list --domain Xto find entities in a specific domain - Use
getfor full attribute details when you need to know exact attribute names - The
key_attrinlistoutput shows the most important attribute per domain (e.g. brightness for lights, current_temperature for climate)