Compare commits

..
Author SHA1 Message Date
dev_agentandClaude Opus 5.5 4834f19118 Read the panel SSE body from response.content (task 4cbf2e96)
stream_events iterated the aiohttp/HA ClientResponse itself, which is
not async-iterable, so every panel event stream died with "'async for'
requires an object with __aiter__ method, got HassClientResponse" and
reconnected forever. Iterate response.content (the StreamReader)
instead; parsing, close, and the error/retry contract are unchanged.

The streaming test stub in test_sse_subscription.py made the same
mistake (it implemented __aiter__ on the response), which is why the
suite never caught this; it now exposes .content like the real
response. New test_api_client.py tests use a response without
__aiter__ and byte chunks split across frame boundaries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 07:52:52 -04:00
4 changed files with 3 additions and 43 deletions
-40
View File
@@ -1,45 +1,5 @@
# NestQuest Release Notes
## Version 0.10.1 — 2026-10-06
### Scope
Patch release carrying the panel SSE stream fix onto `main` (PR #295, task
4cbf2e96).
### Behaviour
- The Home Assistant integration now reads the panel event stream from the
response body (`response.content`), fixing the logged failure
`'async for' requires an object with __aiter__ method, got HassClientResponse`
that logged ~935 times and prevented live panel events (completions,
un-completions, day-complete, missed) from re-firing from the API's SSE
stream. SSE line-buffering and JSON-frame parsing are unchanged.
### Requirements
- Home Assistant floor 2024.6.0 (unchanged).
### Breaking changes
- None. Schema unchanged at version 9; no migration, no database backup
required.
### Known limitations
- Intermittent `GET /api/v1/panel/events failed with HTTP 502` during API
restarts/redeploys is expected (the integration reconnects with backoff).
- The event stream still reconnects periodically because Home Assistant's
shared aiohttp session applies a default total timeout. During a
disconnect/reconnect window, transitions published by the API are NOT
re-fired on Home Assistant's event bus (the API has no replay), so an
automation could miss a transition in that window; this is tracked as a
follow-up (disable aiohttp's total timeout on the stream).
### Rollback
- No schema change: rolling back to 0.10.0 requires no database restore.
## Version 0.10.0 — 2026-09-30
### Scope
+1 -1
View File
@@ -15,5 +15,5 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/Maniacs-Mansion/NestQuest/issues",
"requirements": [],
"version": "0.10.1"
"version": "0.10.0"
}
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "nestquest"
version = "0.10.1"
version = "0.10.0"
description = "NestQuest Home Assistant Integration"
readme = "README.md"
requires-python = ">=3.11"
Generated
+1 -1
View File
@@ -373,7 +373,7 @@ wheels = [
[[package]]
name = "nestquest"
version = "0.10.1"
version = "0.10.0"
source = { virtual = "." }
[package.dev-dependencies]