home-assistant
Control and query Home Assistant smart home devices via MCP.
Skill by zkl2333
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/zkl2333-home-assistant
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/home-assistant
What's inside
- Skill name
home-assistant- Description
- Control and query Home Assistant smart home devices via MCP. Use when: user asks about home temperature/humidity, wants to turn on/off lights, AC, fans, switches, or check device status. Triggers: '智能家居', '空调', '灯', '开关', '温度', '湿度', 'home assistant', 'HA', '家里'. NOT for: Home Assistant config/integration setup (use HA UI directly).
- License
- MIT
- Instructions
- 111 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (1)
- SKILL.md
SKILL.md (first lines)
# Home Assistant Skill
通过 Home Assistant 内置 MCP Server 控制智能家居设备。支持灯光、空调、风扇、开关、传感器查询等。
## 前置条件
Home Assistant 2025.2+ 内置 MCP Server,需先在 HA 中启用:
**设置 → 设备与服务 → 添加集成 → 搜索 "Model Context Protocol Server"**
在你的 `mcporter.json` 里加入(合并到 `mcpServers` 下):
```json
"home-assistant": {
"baseUrl": "http://<HA_IP>:8123/api/mcp",
"headers": {
"Authorization": "Bearer YOUR_HA_LONG_LIVED_TOKEN",
"Accept": "application/json, text/event-stream"
}
}
```
> Long-Lived Token:HA 用户头像 → 安全 → 长期访问令牌 → 创建令牌
## 常用工具
### 查询设备状态(REST API 直接查)
MCP 工具不支持直接列出传感器,用 REST API:
```bash
TOKEN="YOUR_TOKEN"
HA="http://HA_IP:8123"
# 查温湿度传感器
curl -sf -H "Authorization: Bearer $TOKEN" "$HA/api/states" | python3 -c "
import json,sys
for s in json.load(sys.stdin):
u=s.get('attributes',{}).get('unit_of_measurement','')
if u in ['°C','%']:
print(s['attributes'].get('friendly_name',''), s['state']+u)
"
# 查指定实体
curl -sf -H "Authorization: Bearer $TOKEN" "$HA/api/states/climate.xxx"
```
### 开关设备
```bash
# 开(推荐用 REST API 指定 entity_id)
curl -sf -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"entity_id": "climate.xxx"}' "$HA/api/services/climate/turn_on"
# 关
curl -sf -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"entity_id": "climate.xxx"}' "$HA/api/services/climate/turn_off"
```
### MCP 工具(通过 mcporter call)
```bash
# 开设备(按名称/区域)
mcporter call home-assistant.HassTurnOn name="卧室空调"
mcporter call home-assistant.HassTurnOn area="客厅" domain='["light"]'
# 关设备
mcporter call home-assistant.HassTurnOff name="卧室空调"
# 调灯光亮度/颜色
mcporter call home-assistant.HassLightSet name="客厅灯" color="warm white"
# 设置空调目标温度
mcporter call home-assistant.HassClimateSetTemperature name="卧室空调" temperature=26
# 设置风扇速度(百分比)
mcporter call home-assistant.HassFanSetSpeed name="风扇" percentage=50
```
## 常见 Domain 对照
| Domain | 设备类型 |
|--------|---------|
| `climate` | 空调、暖气 |
| `light` | 灯光 |
| `switch` | 开关、插座 |
| `fan` | 风扇 |
| `media_player` | 音响、电视 |
| `sensor` | 温湿度、传感器 |
| `humidifier` | 加湿器 |
| `water_heater` | 热水器 |
## 查找 entity_id
MCP 工具按名称匹配时,不一定精准。推荐先用 REST API 查出准确的 `entity_id`,再操作:
```bash
curl -sf -H "Authorization: Bearer $TOKEN" "$HA/api/states" | python3 -c "
import json,sys
for s in json.load(sys.stdin):
if 'climate' in s['entity_id']:
print(s['entity_id'], '|', s['attributes'].get('friendly_name',''), '|', s['state'])
"
```
## 使用建议
- **查询类**:优先用 REST API `/api/states`,数据准确
- **控制类**:MCP 工具(`HassTurnOn/Off`)按名称匹配,简单场景够用;复杂场景(多设备、精确 entity_id)用 REST API
- **心跳集成**:可在心跳中查室温/湿度,过冷/过热主动提醒From zkl2333/skills, MIT.
More from zkl2333/skills
- 0.502score
pr-precheck
zkl2333
Pre-submission due diligence for upstream PRs to public/large repositories.
SkillCFreshness: C★ 1Claude Code +9 - 0.437score
codex-cli
zkl2333
Operate OpenAI Codex CLI (terminal coding agent) to accomplish software engineering tasks.
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
commit
zkl2333
Generate conventional commit messages following git-cz style by default (emoji between type and subject).
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
bark
zkl2333
Send Bark (day.app) push notifications via HTTP.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
zread
zkl2333
Search and read GitHub repository docs via the Zhipu CodePlan MCP zread server.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
caiyun-weather
zkl2333
Get weather data via Caiyun (彩云天气) API through MCP.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
web-search-prime
zkl2333
Search the web via the Zhipu CodePlan MCP web-search-prime server.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
zai-mcp-server
zkl2333
Use Zhipu CodePlan MCP vision server for screenshot/UI understanding: OCR, error screenshot diagnosis, and UI→artifact conversion.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
web-reader
zkl2333
Read and extract readable content from a URL via the Zhipu CodePlan MCP web-reader server.
SkillDFreshness: D★ 1Claude Code +9 - 0.429score
amap-maps
zkl2333
高德地图 API(通过 MCP)。地理编码(地址↔坐标)、IP 定位、天气、POI 搜索、路线规划(骑行/步行/驾车/公交)、距离测量。Triggers: '高德', 'amap', '地理编码', 'geocoding', '经纬度', 'POI', '路线规划', '导航'.
SkillDFreshness: D★ 1Claude Code +9 - 0.426score
check-updates
zkl2333
检查 OpenClaw 版本更新。当用户说"检查更新"、"有没有新版本"、"update"、"升级"时使用。执行标准三步检查:当前版本、npm 最新版、GitHub 最新版,并给出更新内容摘要和是否建议更新的判断。
SkillDFreshness: D★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Mar 1, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/zkl2333/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from zkl2333
- 0.502score
pr-precheck
zkl2333
Pre-submission due diligence for upstream PRs to public/large repositories.
SkillCFreshness: C★ 1Claude Code +9 - 0.437score
codex-cli
zkl2333
Operate OpenAI Codex CLI (terminal coding agent) to accomplish software engineering tasks.
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
commit
zkl2333
Generate conventional commit messages following git-cz style by default (emoji between type and subject).
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
bark
zkl2333
Send Bark (day.app) push notifications via HTTP.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
zread
zkl2333
Search and read GitHub repository docs via the Zhipu CodePlan MCP zread server.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
caiyun-weather
zkl2333
Get weather data via Caiyun (彩云天气) API through MCP.
SkillDFreshness: D★ 1Claude Code +9
Cite this page
home-assistant skill. Agent Mart. https://agentmart.dev/skills/zkl2333-home-assistant (last updated 2026-10-24)