โ† All skills
Tencent SkillHub ยท Developer Tools

Ha Integration Patterns

Home Assistant custom integration patterns and architectural decisions. Use when building HACS integrations, custom components, or API bridges for Home Assistant. Covers service response data, HTTP views, storage APIs, and integration architecture.

skill openclawclawhub Free
0 Downloads
0 Stars
0 Installs
0 Score
High Signal

Home Assistant custom integration patterns and architectural decisions. Use when building HACS integrations, custom components, or API bridges for Home Assistant. Covers service response data, HTTP views, storage APIs, and integration architecture.

โฌ‡ 0 downloads โ˜… 0 stars Unverified but indexed

Install for OpenClaw

Quick setup
  1. Download the package from Yavira.
  2. Extract the archive and review SKILL.md first.
  3. Import or place the package into your OpenClaw setup.

Requirements

Target platform
OpenClaw
Install method
Manual import
Extraction
Extract archive
Prerequisites
OpenClaw
Primary doc
SKILL.md

Package facts

Download mode
Yavira redirect
Package format
ZIP package
Source platform
Tencent SkillHub
What's included
SKILL.md

Validation

  • Use the Yavira download entry.
  • Review SKILL.md after the package is downloaded.
  • Confirm the extracted package contains the expected setup assets.

Install with your agent

Agent handoff

Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.

  1. Download the package from Yavira.
  2. Extract it into a folder your agent can access.
  3. Paste one of the prompts below and point your agent at the extracted folder.
New install

I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.

Upgrade existing

I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.

Trust & source

Release facts

Source
Tencent SkillHub
Verification
Indexed source record
Version
1.0.0

Documentation

ClawHub primary doc Primary doc: SKILL.md 14 sections Open source page

The Problem

By default, HA services are "fire-and-forget" and return empty arrays [].

The Solution (HA 2023.7+)

Register service with supports_response: from homeassistant.helpers.service import SupportsResponse hass.services.async_register( domain, "get_full_config", handle_get_full_config, schema=GET_CONFIG_SCHEMA, supports_response=SupportsResponse.ONLY, # โ† KEY PARAMETER ) Call with ?return_response flag: curl -X POST "$HA_URL/api/services/your_domain/get_full_config?return_response"

Response Handler

async def handle_get_full_config(hass: HomeAssistant, call: ServiceCall): """Handle the service call and return data.""" # ... your logic ... return {"entities": entity_data, "automations": automation_data}

HTTP View vs Service: When to Use Each

Use CaseUseDon't UseReturn complex dataHTTP ViewService (without response support)Fire-and-forget actionsServiceHTTP ViewTrigger automationsServiceHTTP ViewQuery state/configHTTP ViewInternal storage APIs

HTTP View Pattern

For data retrieval APIs: from homeassistant.components.http import HomeAssistantView class OpenClawConfigView(HomeAssistantView): """HTTP view for retrieving config.""" url = "/api/openclaw/config" name = "api:openclaw:config" requires_auth = True async def get(self, request): hass = request.app["hass"] config = await get_config_data(hass) return json_response(config) # Register in async_setup: hass.http.register_view(OpenClawConfigView())

Critical: Avoid Internal APIs

Never use underscore-prefixed APIs โ€” they're private and change between versions. โŒ Wrong: storage_collection = hass.data["_storage_collection"] โœ… Right: # Use public APIs only from homeassistant.helpers.storage import Store store = Store(hass, STORAGE_VERSION, STORAGE_KEY)

For Small Data (Settings, Cache)

from homeassistant.helpers.storage import Store STORAGE_KEY = "your_domain.storage" STORAGE_VERSION = 1 store = Store(hass, STORAGE_VERSION, STORAGE_KEY) # Save data = {"entities": modified_entities} await store.async_save(data) # Load data = await store.async_load()

For Large Data (History, Logs)

Use external database or file storage, not HA storage helpers.

Breaking Changes to Watch

ChangeVersionMigrationConversation agents2025.x+Use async_process directlyService response data2023.7+Add supports_response paramConfig entry migration2022.x+Use async_migrate_entry Always check: https://www.home-assistant.io/blog/ for your target version range.

HACS Integration Structure

custom_components/your_domain/ โ”œโ”€โ”€ __init__.py # async_setup_entry โ”œโ”€โ”€ config_flow.py # UI configuration โ”œโ”€โ”€ manifest.json # Dependencies, version โ”œโ”€โ”€ services.yaml # Service definitions โ””โ”€โ”€ storage_services.py # Your storage logic

Minimal manifest.json

{ "domain": "your_domain", "name": "Your Integration", "codeowners": ["@yourusername"], "config_flow": true, "dependencies": [], "requirements": [], "version": "1.0.0" }

Testing Checklist

Service calls return expected data (with ?return_response) HTTP views accessible with auth token No underscore-prefixed API usage Storage persists across restarts Config flow creates config entry Error handling returns meaningful messages

Documentation Resources

Integration basics: developers.home-assistant.io/docs/creating_integration_index Service calls: developers.home-assistant.io/docs/dev_101_services HTTP views: developers.home-assistant.io/docs/api/webserver Breaking changes: home-assistant.io/blog/ (filter by version) HACS guidelines: hacs.xyz/docs/publish/start

Lesson Learned

From HA-OpenClaw Bridge attempt: "80% of our issues were discoverable with 30-60 minutes of upfront docs reading. We jumped straight to coding based on assumptions rather than reading how HA actually works." Use skills/pre-coding-research/ methodology before starting.

Category context

Code helpers, APIs, CLIs, browser automation, testing, and developer operations.

Source: Tencent SkillHub

Largest current source with strong distribution and engagement signals.

Package contents

Included in package
1 Docs
  • SKILL.md Primary doc