Command Palette

Search for a command to run...

Назад к скиллам
скилл № 83536

home-assistant

Home Assistant is an open-source home automation server that controls lights, sensors, thermostats and other smart devices locally, without a cloud account…

БесплатноБез исполняемых скриптов
TerminalSkillsот TerminalSkills★ 221 звезда на GitHub

Установить home-assistant в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Home Assistant — Local smart home control from the terminal

Overview

Home Assistant runs on a machine in the home and talks to devices directly, so automations keep working when the internet is down. Everything an agent needs is reachable from a shell: YAML files in the configuration directory, a configuration checker, a REST API, a WebSocket API, and (on Home Assistant OS) the ha command.

Instructions

Installation

Two installation types are supported. Pick one before doing anything else, because the commands differ.

Type What it is Terminal access
Home Assistant OS Appliance image for a Raspberry Pi 4/5, x86-64 box or VM. Includes apps (formerly add-ons), backups and one-click updates. Recommended by the project. ha CLI through the Terminal & SSH app
Home Assistant Container One Docker container on a Linux host you manage. No apps, manual updates. docker commands on the host

The Core (Python virtualenv) and Supervised methods were deprecated in 2025.6 and have been unsupported since 2025.12. Do not create new installs with them.

For Container, write compose.yaml on the host:

services:
  homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - /opt/homeassistant/config:/config
      - /etc/localtime:/etc/localtime:ro
      - /run/dbus:/run/dbus:ro        # only needed for the Bluetooth integration
    restart: unless-stopped
    stop_grace_period: 60s            # lets the database close cleanly
    privileged: true
    network_mode: host
    environment:
      TZ: Europe/Amsterdam
docker compose up -d
docker compose logs --tail 50 homeassistant
# update later
docker compose pull homeassistant && docker compose up -d

Docker Desktop is not supported; use Docker Engine. The web UI and API listen on port 8123 for Container. On Home Assistant OS the default port is 80 since 2026.8 (8123 is used when 80 is taken). The user finishes onboarding in the browser.

Create a long-lived access token

The user creates the token in the web UI: User profile → Security tab → Long-lived access tokens → Create token. It is shown once and is valid for 10 years. The user exports it in the shell the agent runs in; the agent only ever refers to $HASS_TOKEN.

export HASS_URL="http://192.168.1.40:8123"
read -rs HASS_TOKEN && export HASS_TOKEN     # typed by the user: paste the token, it is not echoed
curl -s -H "Authorization: Bearer $HASS_TOKEN" "$HASS_URL/api/"

A working token returns {"message":"API running."}. The trailing slash in /api/ is required.

Edit configuration and automations

The configuration directory is /config on Home Assistant OS and the mounted host folder (/opt/homeassistant/config above) for Container. automations.yaml belongs to the UI editor, so keep hand-written automations in a separate labeled block:

# configuration.yaml — add below the existing lines
automation: !include automations.yaml              # written by the UI editor
automation manual: !include automations_manual.yaml
# automations_manual.yaml — always a list
- id: hallway_motion_light
  alias: "Hallway light on motion when dark"
  mode: restart
  triggers:
    - trigger: state
      entity_id: binary_sensor.hallway_motion
      to: "on"
  conditions:
    - condition: sun
      after: sunset
      before: sunrise
  actions:
    - action: light.turn_on
      target:
        entity_id: light.hallway
      data:
        brightness_pct: 60
    - delay: "00:03:00"
    - action: light.turn_off
      target:
        entity_id: light.hallway

Current syntax uses the plural keys triggers, conditions, actions, with trigger: and action: inside each item. Give every YAML automation an id, otherwise its traces are not available. Modes are single (default), restart, queued and parallel.

Keep passwords and API keys out of the configuration: write password: !secret meter_password and define meter_password in secrets.yaml in the same directory.

Validate, then reload or restart

Always check the configuration before applying it.

# Container
docker exec homeassistant python -m homeassistant --script check_config --config /config

# Home Assistant OS (Terminal & SSH app)
ha core check

# Any install, over the API
curl -s -X POST -H "Authorization: Bearer $HASS_TOKEN" "$HASS_URL/api/config/core/check_config"

The API answers {"errors": null, "result": "valid"} or "result": "invalid" with the error text. Apply changes without a restart where possible:

curl -s -X POST -H "Authorization: Bearer $HASS_TOKEN" "$HASS_URL/api/services/automation/reload"         # automations only
curl -s -X POST -H "Authorization: Bearer $HASS_TOKEN" "$HASS_URL/api/services/homeassistant/reload_all"   # everything reloadable
docker restart homeassistant      # full restart, Container
ha core restart
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • _scores.json

FAQ

Что делает скилл home-assistant?

Home Assistant is an open-source home automation server that controls lights, sensors, thermostats and other smart devices locally, without a cloud account. Use when a user asks to install Home Assistant with Docker, edit configuration.yaml, write or debug a YAML automation, check the configuration before a restart, call the Home Assistant REST API or WebSocket API with a long-lived access token, read sensor history, or run `ha` commands on Home Assistant OS.

Как установить скилл home-assistant?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл home-assistant запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить home-assistant с