Home Assistant CLI
Advanced Home Assistant control using the official hass-cli tool. Features auto-completion, event monitoring, history queries, and rich output formatting. Alternative to the curl-based homeassistant s
Advanced Home Assistant control using the official hass-cli tool. Features auto-completion, event monitoring, history queries, and rich output formatting. Alternative to the curl-based homeassistant s
Real data. Real impact.
Emerging
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
Control your Home Assistant smart home devices using the official hass-cli tool — a feature-rich command-line interface with auto-completion, event monitoring, and flexible output formatting.
homeassistant (curl-based)?Choose
if you want:homeassistant-cli
hass-cli event watch)hass-cli state history)Choose
(curl) if you want:homeassistant
Both work great — this skill is for users who interact frequently with Home Assistant and want a richer CLI experience.
Before using hass-cli, configure authentication:
Generate a long-lived access token in Home Assistant:
https://your-homeassistant:8123/profileSet environment variables (add to shell config for persistence):
export HASS_SERVER=https://homeassistant.local:8123 export HASS_TOKEN=<your-token>
Test connection:
hass-cli info
# List all entities hass-cli state listFilter by domain
hass-cli state list light hass-cli state list switch hass-cli state list sensor
Get specific entity state
hass-cli state get light.living_room
# Turn on/off lights hass-cli service call light.turn_on --arguments entity_id=light.living_room hass-cli service call light.turn_off --arguments entity_id=light.living_roomSet brightness (0-255)
hass-cli service call light.turn_on --arguments entity_id=light.bedroom,brightness=128
Turn on/off switches
hass-cli service call switch.turn_on --arguments entity_id=switch.fan hass-cli service call switch.turn_off --arguments entity_id=switch.fan
Toggle any device
hass-cli service call homeassistant.toggle --arguments entity_id=light.kitchen
# List all services hass-cli service listFilter services
hass-cli service list light hass-cli service list 'home.*toggle'
Get service details (YAML output)
hass-cli -o yaml service list homeassistant.toggle
# List scenes hass-cli state list sceneActivate a scene
hass-cli service call scene.turn_on --arguments entity_id=scene.movie_time
# Watch all events hass-cli event watchWatch specific event type
hass-cli event watch state_changed hass-cli event watch automation_triggered
# Get state history (last 50 minutes) hass-cli state history --since 50m light.living_roomMultiple entities
hass-cli state history --since 1h light.living_room switch.fan
Control output with
-o or --output:
# Table (default) hass-cli state listYAML
hass-cli -o yaml state get light.living_room
JSON
hass-cli -o json state list light
No headers (for scripting)
hass-cli --no-headers state list
hass-cli state list to find entity IDshass-cli service list to find available servicesSee references/examples.md for common automation patterns and use cases.
No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.