Install
openclaw skills install ha-skillControl Home Assistant entities via REST API. Use when the user asks to control lights, climate, switches, or other HA entities. Supports climate (thermostat), light, switch, and sensor queries.
openclaw skills install ha-skillControl your Home Assistant instance via REST API. Supports climate control, lights, switches, and sensor queries.
This skill provides read and write access to your Home Assistant entities:
Credentials are stored in ~/.openclaw/credentials/homeassistant.json:
{
"url": "http://192.168.2.82:8123",
"token": "LONG_LIVED_ACCESS_TOKEN"
}
To generate a long-lived access token:
All commands use the HA REST API. Output is human-readable by default, add json for raw output.
Set thermostat temperature and mode:
# Set temperature (auto-selects cool/heat based on setpoint vs current)
bash scripts/climate.sh set <entity_id> <temperature>
# Set specific mode (cool, heat, auto, off)
bash scripts/climate.sh mode <entity_id> <mode>
# Get current climate state
bash scripts/climate.sh status <entity_id>
bash scripts/climate.sh status <entity_id> json
Examples:
# Set to 73°F cooling
bash scripts/climate.sh set climate.living_room 73 cool
# Turn off thermostat
bash scripts/climate.sh mode climate.living_room off
# Check current temperature
bash scripts/climate.sh status climate.living_room
Find entity IDs for climate, lights, switches:
# List all climate entities
bash scripts/entities.sh climate
# List all light entities
bash scripts/entities.sh light
# List all switch entities
bash scripts/entities.sh switch
# List all entities of a domain
bash scripts/entities.sh all
# Turn on
bash scripts/light.sh on light.living_room
# Turn off
bash scripts/light.sh off light.living_room
# Set brightness (0-255)
bash scripts/light.sh brightness light.living_room 128
# Set color (RGB)
bash scripts/light.sh color light.living_room 255 0 0
# Get state
bash scripts/light.sh status light.living_room
# Toggle switch
bash scripts/switch.sh toggle switch.bedroom_fan
# Turn on/off
bash scripts/switch.sh on switch.bedroom_fan
bash scripts/switch.sh off switch.bedroom_fan
# Get sensor value
bash scripts/sensor.sh get sensor.temperature_outside
bash scripts/sensor.sh get sensor.humidity_living_room json
Direct service call for advanced use:
# Generic service call
bash scripts/service.sh call <domain> <service> <entity_id> '[{"key": "value"}]'
# Example: Set temperature via climate.set_temperature
bash scripts/service.sh call climate set_temperature climate.living_room '{"temperature": 73}'
If you don't know the entity ID:
# Find all climate entities
bash scripts/entities.sh climate
# Find entities by name (fuzzy search)
bash scripts/entities.sh search thermostat
bash scripts/entities.sh search temperature
If the command fails:
curl -s http://192.168.2.82:8123bash scripts/entities.sh climatehttp://192.168.2.82:8123 (from MEMORY.md)cool, heat, auto, off, heat_cool