Releases: HomeAssistant-API/HomeAssistantAPI
v6.0.1
What's Changed
- Add script to generate coverage reports locally by @GrandMoff100 in #242
- Add missing
__call__methods to Service classes by @GrandMoff100 in #244 - Modernize docs by @GrandMoff100 in #245
Full Changelog: v6.0.0...v6.0.1
v6.0.0
HomeAssistant-API v6.0 Changelog
Breaking Changes
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.
Minimum Python version raised to 3.11
Python 3.9 and 3.10 are no longer supported.
Client classes restructured
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.
Models split into Base/Sync/Async variants
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
Processing module rewritten
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.
Build system moved from Poetry to uv + hatchling
poetry.lock is removed. The project now uses uv for dependency management and hatchling as the build backend.
Type checker changed from mypy to zuban
New Features
WebSocket API support (sync & async)
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
Entity registry models
New models: EntityRegistryEntry, EntityRegistryEntryExtended, EntityRegistryUpdateResult.
Configurable WebSocket max message size
WS clients accept a max_size parameter (default 16 MB) to handle large responses like full entity registry lists.
Improvements
- 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
v5.0.3
What's Changed
- Make
Service.namean optional field by @GrandMoff100 in #218 - Fix Pydantic validation error for
ServiceField.selector.media.multipleby @GrandMoff100 in #220 - Bump urllib3 from 2.5.0 to 2.6.0 by @dependabot[bot] in #219
- Bump aiohttp from 3.12.15 to 3.13.3 by @dependabot[bot] in #222
- Bump virtualenv from 20.34.0 to 20.36.1 by @dependabot[bot] in #224
- Bump urllib3 from 2.6.0 to 2.6.3 by @dependabot[bot] in #223
- Change model_config to allow extra fields by @GrandMoff100 in #228
- Fix optional translation fields in websocket Error model by @Copilot in #226
New Contributors
- @Copilot made their first contribution in #226
Full Changelog: v5.0.2...v5.0.3
Minor bugfix
What's Changed
- Fix Pydantic validation error for
ServiceField.selector.media.multipleby @GrandMoff100 in #220 - Bump urllib3 from 2.5.0 to 2.6.0 by @dependabot[bot] in #219
Full Changelog: v5.0.2.post1...v5.0.2.post2
Patch an annoying bug
What's Changed
- Make
Service.namean optional field by @GrandMoff100 in #218
Full Changelog: v5.0.2...v5.0.2.post1
v5.0.2
What's Changed
- Update requirements to be looser. by @adamlogan73 in #215
New Contributors
- @adamlogan73 made their first contribution in #215
Full Changelog: v5.0.1...v5.0.2
v5.0.1
What's Changed
- get_entity_histories() - fixed date formatting by @timohencken in #202
- Strip tokens of whitespace before using. by @GrandMoff100 in #203
- Clean websocket tokens before using by @GrandMoff100 in #204
- Bump aiohttp from 3.10.11 to 3.12.14 by @dependabot[bot] in #209
- Bump urllib3 from 2.2.3 to 2.5.0 by @dependabot[bot] in #207
- Bump requests from 2.32.3 to 2.32.4 by @dependabot[bot] in #206
- Update entity (state) & service model by @kpustelnik in #211
New Contributors
- @timohencken made their first contribution in #202
- @kpustelnik made their first contribution in #211
Full Changelog: v5.0.0...v5.0.1
Websocket API!
What's Changed
- Patch return_response flag handling when calling services by @GrandMoff100 in #195
- Implement websockets! by @GrandMoff100 in #196
- Websocket docs by @GrandMoff100 in #200
Full Changelog: v4.2.2...v5.0.0
v4.2.2.post2
What's Changed
- Bump idna from 3.6 to 3.7 by @dependabot in #179
- Bump aiohttp from 3.9.3 to 3.9.4 by @dependabot in #180
- Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows by @dependabot in #187
- Exclude
pydantic>=2.9for #188
Full Changelog: v4.2.2.post1...v4.2.2.post2
v4.2.2.post1
What's Changed
- Update aiohttp-client-cache by @GrandMoff100 in #178
Full Changelog: v4.2.2...v4.2.2.post1