Skip to content
ha-operations logo

Home Assistant Operations

ha-operations

Interacts with Home Assistant via REST API for health checks, notifications, and service calls. Provides guidance for API access with long-lived tokens, sending notifications, calling services, and troubleshooting common issues. Use when checking HA health, sending HA notifications, calling HA se...

SKILL.md

Full skill instructions

Home Assistant Operations

Quick Start

Check if Home Assistant is healthy:

# ✅ CORRECT: Use GET request
curl -s https://ha.temet.ai/ | grep "Home Assistant"

# ❌ WRONG: HEAD returns 405 (but this is expected behavior, not an error!)
curl -I https://ha.temet.ai/
# Returns: HTTP/​2 405 Method Not Allowed - THIS IS NORMAL

Send a notification:

source /​Users/​dawiddutoit/​projects/​play/​network-infrastructure/​.env

curl -X POST "${HA_BASE_URL}/​api/​services/​notify/​${HA_NOTIFY_SERVICE#*.}" \
  -H "Authorization: Bearer ${HA_ACCESS_TOKEN}" \
  -H "Content-Type: application/​json" \
  -d '{
    "message": "Test from infrastructure monitoring",
    "title": "Infrastructure Alert"
  }'

When to Use

Triggers:

  • "Interact with Home Assistant"
  • "Call HA service"
  • "Send HA notification"
  • "Check HA health"
  • "Home Assistant returns 405"
  • "HA health check failing"

Key Concepts

The 405 Situation

Home Assistant does NOT support HEAD requests. It returns HTTP 405 Method Not Allowed for HEAD, which is EXPECTED and NORMAL behavior.

Correct Health Check:

# ✅ Use GET and check content
curl -s https://ha.temet.ai/ --max-time 5 | grep "Home Assistant"

Operations

API Access

Create long-lived token in HA UI → Profile → Long-Lived Access Tokens

Store in .env:

HA_ACCESS_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
HA_BASE_URL=http://192.168.68.123:8123
HA_NOTIFY_SERVICE=notify.mobile_app_your_phone

Send Notifications

curl -X POST "${HA_BASE_URL}/​api/​services/​notify/​${HA_NOTIFY_SERVICE#*.}" \
  -H "Authorization: Bearer ${HA_ACCESS_TOKEN}" \
  -H "Content-Type: application/​json" \
  -d '{"message": "Alert text", "title": "Title"}'

Call Services

# General pattern
curl -X POST "${HA_BASE_URL}/​api/​services/<domain>/<service>" \
  -H "Authorization: Bearer ${HA_ACCESS_TOKEN}" \
  -H "Content-Type: application/​json" \
  -d '{"entity_id": "entity.name"}'

# Trigger automation
curl -X POST "${HA_BASE_URL}/​api/​services/​automation/​trigger" \
  -H "Authorization: Bearer ${HA_ACCESS_TOKEN}" \
  -H "Content-Type: application/​json" \
  -d '{"entity_id": "automation.infrastructure_alert_handler"}'

Read Entity States

# Specific entity
curl -s "${HA_BASE_URL}/​api/​states/​sensor.temperature" \
  -H "Authorization: Bearer ${HA_ACCESS_TOKEN}" | jq .

# All entities
curl -s "${HA_BASE_URL}/​api/​states" \
  -H "Authorization: Bearer ${HA_ACCESS_TOKEN}" | jq .

Supporting Files

FilePurpose
references/​api-endpoints.mdComplete HA REST API endpoint reference

Requirements

  • Home Assistant running at 192.168.68.123:8123
  • Long-lived access token
  • Environment variables: HA_BASE_URL, HA_ACCESS_TOKEN, HA_NOTIFY_SERVICE
  • Tools: curl, jq (optional)

Red Flags

  • Do not use HEAD requests (always returns 405)
  • Do not assume 405 means HA is broken
  • Do not expose access tokens in logs
  • Do not hardcode tokens in scripts (use .env)
  • Do not skip token creation

Common Issues

SymptomCauseFix
HTTP 405Used HEAD instead of GETUse GET
401 UnauthorizedInvalid tokenVerify token, recreate
404 Not FoundWrong entity_idCheck entity exists
Connection refusedHA not runningCheck HA server
No notificationWrong service nameVerify HA_NOTIFY_SERVICE

More DevOps & CI/CD skills

Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.

6K 472.6K
View

Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.

6K 472.6K
View

Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.

1.5K 454.3K
View
azure-kubernetes logo
DevOps & CI/CD

azure-kubernetes

Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.

1.5K 447.1K
View

Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.

92.7K 354.9K
View
just-scrape logo
DevOps & CI/CD

just-scrape

Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.

69 245K
View

Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.

462 159.7K
View

Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.

462 159.1K
View
deploy-to-vercel logo
DevOps & CI/CD

deploy-to-vercel

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

31.9K 146.6K
View
programmatic-seo logo
DevOps & CI/CD

programmatic-seo

Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.

53.3K 140.1K
View

Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.

63 123.5K
View

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

31.9K 116.1K
View

Coding & apps AI tools

Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View
Imagica logo
Coding & apps

Imagica

Build a no-code AI app in minutes.

Freemium
View
E
Coding & apps

Emergent.sh

An IDE for code migration from legacy to modern frameworks through coding agents.

Freemium
View
Wonder Dynamics logo
Coding & apps

Wonder Dynamics

Automate CGI animation in live-action scenes

Paid
View
M
Coding & apps

Mixo

Launch a website in seconds with AI.

Paid
View
AI Code Convert logo
Coding & apps

AI Code Convert

Streamline Your Coding Experience with AI Code Helper

Free
View