modelscope.cn

homeassistant

Control Home Assistant - smart plugs, lights, scenes, automations.

Installation

$ npx skills add https://modelscope.cn

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from modelscope.cn · top by installs.

npx skills add https://modelscope.cn

Browse all from modelscope.cn

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,401 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

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 switches
  • light.* — Lights (Hue, LIFX, etc.)
  • scene.* — Pre-configured scenes
  • automation.* — Automations
  • climate.* — Thermostats
  • cover.* — Blinds, garage doors
  • media_player.* — TVs, speakers
  • sensor.* — 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