ha-async-patterns

Community

Master async patterns for HA integrations.

AuthorL3DigitalNet
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Home Assistant runs on a single-threaded asyncio event loop. All I/O operations must be non-blocking. Blocking the event loop freezes the entire system — automations stop, the UI becomes unresponsive, and entities stop updating.

Core Features & Use Cases

  • Async Libraries: use async-native libraries such as aiohttp to perform non-blocking I/O.
  • Wrapping Sync Calls: when no async library exists, run blocking I/O in executor via hass.async_add_executor_job.
  • Setup Patterns: implement async_setup_entry and async_unload_entry to ensure safe async setup and teardown.

Quick Start

To begin, ensure your integration uses async_setup_entry and avoids blocking I/O.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: ha-async-patterns
Download link: https://github.com/L3DigitalNet/HA-Dev-Template/archive/main.zip#ha-async-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.