通过 moltbot-ha CLI 控制 Home Assistant 智能家居设备、灯光、场景和自动化,并提供可配置的安全确认。
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install moltbot-ha或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install moltbot-ha⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/moltbot-ha/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: moltbot-ha description: Control Home Assistant smart home devices, lights, scenes, and automations via moltbot-ha CLI with configurable safety confirmations. homepage: https://github.com/iamvaleriofantozzi/moltbot-ha metadata: {"moltbot":{"emoji":"🏠","requires":{"bins":["moltbot-ha"],"env":["HA_TOKEN"]},"primaryEnv":"HA_TOKEN","install":[{"id":"uv","kind":"uv","package":"moltbot-ha","bins":["moltbot-ha"],"label":"Install moltbot-ha (uv tool)"}]}} ---
Control your smart home via Home Assistant API using the moltbot-ha CLI tool.
uv tool install moltbot-ha
moltbot-ha config init
The setup will interactively ask for:
http://192.168.1.100:8123)Set your Home Assistant long-lived access token:
export HA_TOKEN="your_token_here"
To create a token:
HA_TOKEN environment variablemoltbot-ha test
moltbot-ha list
moltbot-ha list light
moltbot-ha list switch
moltbot-ha list cover
moltbot-ha state light.kitchen
moltbot-ha state sensor.temperature_living_room
# Turn on
moltbot-ha on light.living_room
moltbot-ha on switch.coffee_maker
# Turn off
moltbot-ha off light.bedroom
moltbot-ha off switch.fan
# Toggle
moltbot-ha toggle light.hallway
# Set brightness (percentage)
moltbot-ha set light.bedroom brightness_pct=50
# Set color temperature
moltbot-ha set light.office color_temp=300
# Multiple attributes
moltbot-ha set light.kitchen brightness_pct=80 color_temp=350
# Activate a scene
moltbot-ha call scene.turn_on entity_id=scene.movie_time
# Set thermostat temperature
moltbot-ha call climate.set_temperature entity_id=climate.living_room temperature=21
# Close cover (blinds, garage)
moltbot-ha call cover.close_cover entity_id=cover.garage
# With parameters
moltbot-ha call automation.trigger entity_id=automation.morning_routine
# With JSON data
moltbot-ha call script.turn_on --json '{"entity_id": "script.bedtime", "variables": {"brightness": 10}}'
moltbot-ha implements a 3-level safety system to prevent accidental actions:
Critical operations require explicit confirmation:
moltbot-ha on cover.garage
⚠️ CRITICAL ACTION REQUIRES CONFIRMATION
Action: turn_on on cover.garage
This is a critical operation that requires explicit user approval.
Ask the user to confirm, then retry with --force flag.
Example: moltbot-ha on cover.garage --force
> "Opening the garage door is a critical action. Do you want to proceed?"
> "Yes, open it"
moltbot-ha on cover.garage --force
⚠️ CRITICAL RULE FOR AGENTS:
--force flag without explicit user confirmation--forceSome entities can be permanently blocked in configuration:
[safety]
blocked_entities = ["switch.main_breaker", "lock.front_door"]
These cannot be controlled even with --force.
Edit ~/.config/moltbot-ha/config.toml:
[safety]
level = 3 # 0=disabled, 1=log-only, 2=confirm all writes, 3=confirm critical
critical_domains = ["lock", "alarm_control_panel", "cover"]
blocked_entities = [] # Add entities that should never be automated
allowed_entities = [] # If set, ONLY these entities are accessible (supports wildcards)
moltbot-ha on light.bedroom brightness_pct=30
moltbot-ha call cover.open_cover entity_id=cover.bedroom_blinds
moltbot-ha call climate.set_temperature entity_id=climate.bedroom temperature=21
moltbot-ha off light.* # Requires wildcard support in future
moltbot-ha call scene.turn_on entity_id=scene.goodnight
moltbot-ha call cover.close_cover entity_id=cover.all_blinds
moltbot-ha state sensor.temperature_living_room
moltbot-ha state sensor.humidity_bathroom
moltbot-ha state binary_sensor.motion_hallway
HA_URL in config matches your Home Assistant URLHA_TOKEN is set correctlymoltbot-ha list to discover correct entity IDsdomain.entity_name (e.g., light.kitchen, not Light.Kitchen)If running in Docker and can't reach Home Assistant on homeassistant.local:
http://192.168.1.100:8123Full config file (~/.config/moltbot-ha/config.toml):
[server]
url = "http://homeassistant.local:8123"
# token = "optional_here_prefer_env_var"
[safety]
level = 3
critical_domains = ["lock", "alarm_control_panel", "cover"]
blocked_entities = []
allowed_entities = []
[logging]
enabled = true
path = "~/.config/moltbot-ha/actions.log"
level = "INFO"
User: "What lights do I have?"
Agent: moltbot-ha list light
Agent: "You have these lights: light.living_room, light.kitchen, light.bedroom"
User: "Turn on the living room light"
Agent: moltbot-ha on light.living_room
Agent: "Living room light is now on"
User: "Open the garage"
Agent: moltbot-ha on cover.garage
<receives CriticalActionError>
Agent: "⚠️ Opening the garage door is a critical action. Do you want to proceed?"
User: "Yes, open it"
Agent: moltbot-ha on cover.garage --force
Agent: "Garage door is opening"
~/.config/moltbot-ha/actions.log by default*) are supported in allowed_entities and blocked_entities--json flag for programmatic parsing安装 Moltbot 家庭助理 后,可以对 AI 说这些话来触发它
Help me get started with Moltbot Home Assistant
Explains what Moltbot Home Assistant does, walks through the setup, and runs a quick demo based on your current project
Use Moltbot Home Assistant to control Home Assistant smart home devices, lights, scenes, and auto...
Invokes Moltbot Home Assistant with the right parameters and returns the result directly in the conversation
What can I do with Moltbot Home Assistant in my ai agent & automation workflow?
Lists the top use cases for Moltbot Home Assistant, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/moltbot-ha/ 目录(个人级,所有项目可用),或 .claude/skills/moltbot-ha/(项目级)。重启 AI 客户端后,用 /moltbot-ha 主动调用,或让 AI 根据上下文自动发现并使用。
Moltbot 家庭助理 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Moltbot 家庭助理 可免费安装使用。请查阅仓库了解许可证信息。
通过 moltbot-ha CLI 控制 Home Assistant 智能家居设备、灯光、场景和自动化,并提供可配置的安全确认。
Moltbot 家庭助理 属于「AI Agent & Automation」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my ai agent & automation tasks using Moltbot Home Assistant
Identifies repetitive steps in your workflow and sets up Moltbot Home Assistant to handle them automatically