跳到正文
TakoAPI
返回技能列表

ha-integration-patterns

由 usimic 提供

Coding Agents & IDEs
826下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Home Assistant custom integration patterns and architectural decisions.

描述

该技能的功能

Reference patterns for building Home Assistant custom integrations and HACS components. Covers service response data, HTTP views, storage APIs, and integration architecture for HA 2023.7+.

Consolidates the specific API patterns and version-aware gotchas that aren't obvious from HA's scattered documentation, reducing trial-and-error when building integrations.

何时使用

  • Building a HACS custom integration from scratch
  • Adding service response data to an existing HA integration
  • Creating HTTP views to expose config data through the HA REST API
  • Migrating storage from internal underscore-prefixed APIs to public helpers
  • Setting up a config flow for a new custom component

示例工作流

输入

User asks: how do I register a service that returns data in Home Assistant?

智能体
  1. 1

    Identifies the HA version requirement (2023.7+) for service response support

  2. 2

    Shows the SupportsResponse.ONLY parameter in async_register call

  3. 3

    Provides the response handler function signature returning a dict

  4. 4

    Demonstrates the curl command with ?return_response flag to test it

输出

A working service registration pattern with response data support and a test command

安装

clawhub install usimic/ha-integration-patterns

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接