homeassistant
Control Home Assistant - smart plugs, lights, scenes, automations.
When & Why to Use This Skill
This Claude skill enables direct interaction with Home Assistant, allowing users to control smart home ecosystems through natural language. It simplifies IoT management by providing a unified interface to trigger scenes, toggle smart plugs, adjust lighting, and monitor sensors, effectively turning Claude into a powerful smart home controller.
Use Cases
- Smart Lighting & Atmosphere: Effortlessly adjust brightness, change colors, or activate pre-set scenes like 'Movie Night' or 'Work Mode' across various light brands.
- Energy Efficiency & Appliance Control: Manage smart plugs and high-energy appliances remotely to optimize power consumption and automate daily routines.
- Climate & Environment Monitoring: Retrieve real-time data from temperature, humidity, or air quality sensors and adjust thermostats or blinds accordingly.
- Home Security & Access: Monitor the status of doors, windows, and locks, and trigger security-related automations or 'Away' modes through simple commands.
- Complex Automation Triggering: Execute sophisticated Home Assistant scripts and automations that involve multiple devices and logic gates with a single prompt.
| name | homeassistant |
|---|---|
| description | Control Home Assistant - smart plugs, lights, scenes, automations. |
| homepage | https://www.home-assistant.io/ |
| metadata | {"clawdis":{"emoji":"🏠","requires":{"bins":["curl"],"env":["HA_TOKEN"]},"primaryEnv":"HA_TOKEN"}} |
Home Assistant
Control smart home devices via Home Assistant API.
Setup
Set environment variables:
HA_URL: Your Home Assistant URL (e.g.,http://192.168.1.100:8123)HA_TOKEN: Long-lived access token (create in HA → Profile → Long-Lived Access Tokens)
Quick Commands
List entities by domain
curl -s "$HA_URL/api/states" -H "Authorization: Bearer $HA_TOKEN" | \
jq -r '.[] | select(.entity_id | startswith("switch.")) | .entity_id'
Turn on/off
# Turn on
curl -s -X POST "$HA_URL/api/services/switch/turn_on" \
-H "Authorization: Bearer $HA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"entity_id": "switch.office_lamp"}'
# Turn off
curl -s -X POST "$HA_URL/api/services/switch/turn_off" \
-H "Authorization: Bearer $HA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"entity_id": "switch.office_lamp"}'
Control lights
# Turn on with brightness
curl -s -X POST "$HA_URL/api/services/light/turn_on" \
-H "Authorization: Bearer $HA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"entity_id": "light.living_room", "brightness_pct": 80}'
Trigger scene
curl -s -X POST "$HA_URL/api/services/scene/turn_on" \
-H "Authorization: Bearer $HA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"entity_id": "scene.movie_time"}'
Call any service
curl -s -X POST "$HA_URL/api/services/{domain}/{service}" \
-H "Authorization: Bearer $HA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"entity_id": "...", ...}'
Get entity state
curl -s "$HA_URL/api/states/{entity_id}" -H "Authorization: Bearer $HA_TOKEN"
Entity Domains
switch.*— Smart plugs, generic switcheslight.*— Lights (Hue, LIFX, etc.)scene.*— Pre-configured scenesautomation.*— Automationsclimate.*— Thermostatscover.*— Blinds, garage doorsmedia_player.*— TVs, speakerssensor.*— Temperature, humidity, etc.
Notes
- API returns JSON by default
- Long-lived tokens don't expire — store securely
- Test entity IDs with the list command first