Skip to content

Commit 8cff54d

Browse files
committed
Bump version to v1.3.6 - block size crash on non-shared fetch path (#367)
1 parent 712f605 commit 8cff54d

3 files changed

Lines changed: 35 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Growatt Modbus Integration for Home Assistant ☀️
44

55
![HACS Badge](https://img.shields.io/badge/HACS-Custom-orange.svg)
6-
![Version](https://img.shields.io/badge/Version-1.3.5-blue.svg)
6+
![Version](https://img.shields.io/badge/Version-1.3.6-blue.svg)
77
[![GitHub Issues](https://img.shields.io/github/issues/0xAHA/Growatt_ModbusTCP.svg)](https://github.com/0xAHA/Growatt_ModbusTCP/issues)
88
[![GitHub Stars](https://img.shields.io/github/stars/0xAHA/Growatt_ModbusTCP.svg?style=social)](https://github.com/0xAHA/Growatt_ModbusTCP)
99

RELEASENOTES.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,39 @@
44

55
---
66

7+
## v1.3.6
8+
9+
Issues: #367
10+
11+
**Update promptly if you set the Max Register Block Size option on v1.3.5.**
12+
13+
- **Fix: saving the block-size option took every entity unavailable on some setups.**
14+
v1.3.5 changed the options flow to store the block size as a label (`"25 registers"`)
15+
and updated the parsing in the shared-connection path only. The other fetch path still
16+
called `int()` on it, which raised `ValueError` on every poll. That includes
17+
**"Auto (recommended)"** — a truthy string, so it never hit the fallback either.
18+
19+
The error was caught by the retry loop rather than crashing Home Assistant, so the
20+
visible symptom was every sensor going unavailable with `Error during data fetch` in
21+
the log. It triggered on *any* options save, because the field is required.
22+
23+
Affected: entries **not** using a shared connection — serial/RTU, or TCP entries that
24+
don't share a host:port with another entry. Shared-connection setups were unaffected.
25+
26+
Reported by @tdalejandro, who diffed the two call sites and identified the exact cause.
27+
28+
- **Internal: the two fetch paths no longer duplicate their option handling.**
29+
The blocks were byte-identical apart from the two lines above, which is how they drifted
30+
out of sync in the first place. Both now call one `_apply_client_options()`.
31+
32+
- **Testing: replaced the test that should have caught this.**
33+
The old one asserted `resolve_block_size(stored_value) == 25` — it called the helper on
34+
its own output, proving only that the helper worked, and stayed green throughout. It now
35+
drives the coordinator and checks what actually reaches the client, across every offered
36+
block-size label.
37+
38+
---
39+
740
## v1.3.5
841

942
Issues: #360, #367

custom_components/growatt_modbus/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
"pymodbus>=3.0.0",
1313
"pyserial>=3.4"
1414
],
15-
"version": "1.3.5"
15+
"version": "1.3.6"
1616
}

0 commit comments

Comments
 (0)