home-assistant-api

Route Home Assistant REST API requests to modular resource files.

22|2|Updated Nov 22, 2025
One-click install
npx skills add https://github.com/markpitt/claude-skills --skill home-assistant-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: home-assistant-api
Source: https://github.com/markpitt/claude-skills/tree/main/skills/home-assistant-api
Command: npx skills add https://github.com/markpitt/claude-skills --skill home-assistant-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill orchestrates access to the Home Assistant REST API, routing requests to specialized resource files by task type (authentication, state management, service calls, entity types, templates, and system config). It provides smart guidance and examples to automate devices and manage Home Assistant instances programmatically.

Core Features & Use Cases

  • Task-driven resource routing based on domain: core concepts, state management, service references, entity types, templates, system config, and examples.
  • Intelligent endpoint selection via a decision tree to guide API usage for common automation tasks.
  • Practical, code-oriented examples across Python, Node.js, Bash, and curl to accelerate integrations.
  • Pattern-driven guidance for authentication, error handling, and common HA workflows.

Quick Start

Start with authentication basics, then query a few entity states, and optionally trigger a device service to see end-to-end control.

Frequently Asked Questions about home-assistant-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I authenticate with the Home Assistant REST API?

Home Assistant REST API authentication requires a valid long-lived access token. Pass the token in the Authorization header as `Bearer <token>` with all requests to verify identity and enable secure programmatic access to your instance.

Can I control devices through the Home Assistant API?

Yes, you can trigger device actions by calling Home Assistant service endpoints via REST API. Route requests to the services endpoint with the correct entity ID, domain, and service name to execute automations and device control remotely.

How do I query entity states from Home Assistant?

Query entity state management endpoints to retrieve current device and sensor states as JSON. The API returns full state objects including attributes, last updates, and entity metadata for automation decision-making.

What HTTP methods and error handling do I need for Home Assistant API calls?

Home Assistant REST API uses standard HTTP methods: GET for queries, POST for service calls, and PUT for state updates. Enforce token validation, proper base URL formatting, and handle error responses including authentication failures and invalid endpoints.

Does Home Assistant support template logic in API workflows?

Home Assistant templates enable conditional logic and data transformation within automation workflows. Use template syntax in service call parameters to dynamically process entity states and trigger complex multi-step integrations via the REST API.