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 skill - choose this if you want a more interactive CLI experience with better discovery and formatting.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install homeassistant-cli或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install homeassistant-cli⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/homeassistant-cli/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: homeassistant-cli description: 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 skill - choose this if you want a more interactive CLI experience with better discovery and formatting. homepage: https://github.com/home-assistant-ecosystem/home-assistant-cli metadata: { "openclaw": { "emoji": "🏡", "requires": { "bins": ["hass-cli"] }, "install": [ { "id": "pip", "kind": "pip", "package": "homeassistant-cli", "bins": ["hass-cli"], "label": "Install Home Assistant CLI (pip)", }, { "id": "brew", "kind": "brew", "formula": "homeassistant-cli", "bins": ["hass-cli"], "label": "Install Home Assistant CLI (brew)", }, ], }, } ---
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 homeassistant-cli if you want:
hass-cli event watch)hass-cli state history)Choose homeassistant (curl) if you want:
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:
- Navigate to your profile: https://your-homeassistant:8123/profile - Scroll to "Long-Lived Access Tokens" - Create a new token
```bash export HASS_SERVER=https://homeassistant.local:8123 export HASS_TOKEN=
```bash hass-cli info ```
# List all entities
hass-cli state list
# Filter 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_room
# Set 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 list
# Filter 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 scene
# Activate a scene
hass-cli service call scene.turn_on --arguments entity_id=scene.movie_time
# Watch all events
hass-cli event watch
# Watch 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_room
# Multiple entities
hass-cli state history --since 1h light.living_room switch.fan
Control output with -o or --output:
# Table (default)
hass-cli state list
# YAML
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.
安装 Home Assistant CLI 后,可以对 AI 说这些话来触发它
Help me get started with Home Assistant CLI
Explains what Home Assistant CLI does, walks through the setup, and runs a quick demo based on your current project
Use Home Assistant CLI to advanced Home Assistant control using the official hass-cli tool
Invokes Home Assistant CLI with the right parameters and returns the result directly in the conversation
What can I do with Home Assistant CLI in my developer & devops workflow?
Lists the top use cases for Home Assistant CLI, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/homeassistant-cli/ 目录(个人级,所有项目可用),或 .claude/skills/homeassistant-cli/(项目级)。重启 AI 客户端后,用 /homeassistant-cli 主动调用,或让 AI 根据上下文自动发现并使用。
Home Assistant CLI 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
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 skill - choose this if you want a more interactive CLI experience with better discovery and formatting.
Automate my developer & devops tasks using Home Assistant CLI
Identifies repetitive steps in your workflow and sets up Home Assistant CLI to handle them automatically
Home Assistant CLI 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。