A lot has changed in this version. A lot went into modernising and standardizing the interfaces of the clients. As such, many of the previous paradigms have changed. If you run into any bugs or issues, please let us know.
Python 3.9 and 3.10 are no longer supported.
The old Client class (which combined sync and async via a use_async flag) has been removed. There are now four distinct client classes:
| Old | New |
|---|---|
Client(use_async=False) |
Client |
Client(use_async=True) |
AsyncClient |
WebsocketClient (sync) |
WebsocketClient |
| — | AsyncWebsocketClient (new) |
Async client methods no longer have the async_ prefix — e.g. async_get_states() is now just get_states() on AsyncClient.
Domain, Entity, Group, Service, and Event now have three variants each:
Base*— plain data, no client reference*(e.g.Domain) — sync, bound toClientAsync*(e.g.AsyncDomain) — async, bound toAsyncClient
The decorator-based @Processing.processor(mimetype) registry has been replaced with simple dict-based MIME dispatch and separate sync/async entry points. Custom processor registration and the decode_bytes parameter have been removed.
poetry.lock is removed. The project now uses uv for dependency management and hatchling as the build backend.
Full WebSocket client implementation for both sync (WebsocketClient) and async (AsyncWebsocketClient) with support for:
- Config entries — get, disable, enable, ignore flow, subentries, subscribe
- Entity registry — list, get, update, remove entries
- Events — subscribe, fire, and listen
- Services — trigger with full domain/service routing
- Templates — render and subscribe to template updates
New models: EntityRegistryEntry, EntityRegistryEntryExtended, EntityRegistryUpdateResult.
WS clients accept a max_size parameter (default 16 MB) to handle large responses like full entity registry lists.
- Unified method signatures across all four client classes for consistency
- Expanded ruff lint rules to
ALL(from just E, F, W) - Test coverage at 100%
- Modernized type annotations throughout
- Response content is now read lazily, eliminating internal
_bufferaccess hacks - Migrated HTTP/async/WebSocket transport from
requests/aiohttp/websocketstoniquests - Cassette-based testing via
nimax— tests replay pre-recorded HTTP cassettes and no longer require a running Home Assistant instance - CI simplified: dropped Docker Compose, pytest runs directly against cassettes