Control all smart devices at home through Home Assistant: lights, air conditioners, curtains, door locks, sensors, scenes, automations, etc. Supports 2600+ brands, control the whole house with a single sentence.
Use Cases
- User says "dim the living room lights a bit" or "turn off all the lights"
- User says "set the air conditioner to 24 degrees" or "turn on cooling mode"
- User says "what's the temperature at home right now?" or "what's the humidity?"
- User says "I'm going to sleep" → triggers the "Good Night" scene (turn off lights, lock doors, lower temperature)
- User says "help me set up an automation: open the curtains at 7 AM every day"
- Combined with
pomodoro: brighten the lights when the Pomodoro timer ends to remind you to take a break - Combined with a daily briefing-type Skill (if enabled): automatically adjust the indoor environment during the morning briefing
Prerequisites
- Run a Home Assistant instance (https://www.home-assistant.io/)
- Generate a Long-Lived Access Token in Home Assistant
- Set environment variables:
export HOMEASSISTANT_TOKEN="your-token" - Set environment variables:
export HOMEASSISTANT_URL="http://homeassistant.local:8123"
Home Assistant 2025.4.4+ has built-in MCP Server support and can communicate directly via the MCP protocol.
Execution Methods
Via MCP tool calls (recommended)
Home Assistant provides an MCP Server integration, allowing direct operation via the MCP protocol:
Control devices
工具: call_service
参数:
domain: "light"
service: "turn_on"
target:
entity_id: "light.living_room"
data:
brightness_pct: 50
color_temp_kelvin: 3000
Query status
工具: get_state
参数:
entity_id: "sensor.living_room_temperature"
Trigger scenes
工具: call_service
参数:
domain: "scene"
service: "turn_on"
target:
entity_id: "scene.good_night"
Via REST API calls (alternative)
# 获取所有设备状态
curl -s "$HOMEASSISTANT_URL/api/states" \
-H "Authorization: Bearer $HOMEASSISTANT_TOKEN"
# 控制灯光
curl -s -X POST "$HOMEASSISTANT_URL/api/services/light/turn_on" \
-H "Authorization: Bearer $HOMEASSISTANT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"entity_id": "light.living_room", "brightness_pct": 80}'
# 设置空调温度
curl -s -X POST "$HOMEASSISTANT_URL/api/services/climate/set_temperature" \
-H "Authorization: Bearer $HOMEASSISTANT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"entity_id": "climate.bedroom", "temperature": 24}'
# 查询传感器
curl -s "$HOMEASSISTANT_URL/api/states/sensor.outdoor_temperature" \
-H "Authorization: Bearer $HOMEASSISTANT_TOKEN"
Common Device Control Templates
Lights:
开灯/关灯: light.turn_on / light.turn_off
调亮度: brightness_pct (0-100)
调色温: color_temp_kelvin (2700暖光-6500冷光)
调颜色: rgb_color [R, G, B]
Air Conditioner/HVAC:
设温度: climate.set_temperature → temperature
设模式: climate.set_hvac_mode → hvac_mode (heat/cool/auto/off)
设风速: climate.set_fan_mode → fan_mode (low/medium/high/auto)
Curtains:
开/关: cover.open_cover / cover.close_cover
设位置: cover.set_cover_position → position (0关-100全开)
Door Locks:
锁门: lock.lock
开锁: lock.unlock (需确认!调用 hitl 工具确认)
Scenes:
触发: scene.turn_on → entity_id: scene.xxx
Safety Guidelines
- Door lock operations: Before unlocking, user confirmation must be obtained through the
hitltool - Security-related: Confirmation is required before disabling the security system
- Batch operations: When controlling more than 5 devices at once, first inform the user of the specific operation list
- Do not proactively recommend devices or features the user does not have
Collaboration with Other Skills
| Combination | Effect |
|---|---|
| home-assistant + pomodoro | Pomodoro starts → dim the lights to create a focused environment; ends → brighten to remind you to take a break |
| home-assistant + daily briefing-type Skill (if enabled) | During the morning briefing, automatically turn on lights, adjust the temperature, and announce the weather |
| home-assistant + reminder | Flash the lights as an auxiliary reminder when a reminder is triggered |
| home-assistant + scheduled-tasks | Scheduled automation: turn off lights and lock doors at 11 PM every night |
Output Specifications
- After executing a device operation, confirm concisely: "✅ Living room light adjusted to 50% brightness"
- When querying status, use a table to present data from multiple sensors
- For batch operations, provide a summary of the operation list
- When a device is unreachable, provide troubleshooting suggestions (check the network, restart the device)