homeassistant-quality-and-testing
Installation
SKILL.md
Home Assistant Quality & Testing
Use this skill to align changes with Home Assistant best practices and the Integration Quality Scale expectations.
When to Use
- Planning or reviewing changes for config flows, options, or reauth
- Deciding how to structure polling, discovery, and entities
- Ensuring translations, metadata, and versioning are correct
- Setting up or updating tests and CI
- Driving toward Bronze/Silver IQS targets (config flow coverage, >95% overall coverage, diagnostics)
Architectural Principles
- Async-only: Never block the event loop; offload sync work via
hass.async_add_executor_job. - Coordinator-first: Centralize device I/O in
DataUpdateCoordinator; entities consumecoordinator.data. - Single source of discovery: Rely on declared discovery (dhcp/zeroconf/ssdp) or dedicated scanner; avoid ad-hoc discovery inside polling.
- Separation: Keep protocol/library logic outside entities; prefer a library (
requirements) for raw API/UDP/HTTP handling. - Quality Scale focus: Bronze requires 100% config_flow coverage and connection tests; Silver pushes >95% overall coverage, strict typing, and reauth flows.