Loading…
Reference in a new issue
No description provided.
Delete branch "fix/unit-detection"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes two upstream issues that are real bugs. Upstream has no open PRs, and every merged PR is already in our fork.
Upstream issue #12: every unit was a hot water tank
is always true (a non-empty string), so every unit that was not space heating became a water tank controller, and the
function/Adapterbranch after it could never run. On a hydrobox without a tank (EHYHBH08AAV3), the adapter was reported ashot_water_tankwith every fieldNone. In the Home Assistant integration that was a phantom Hot Water Tank device (sw_version "None/None") that could not be deleted. It is now a membership test, sohot_water_tankisNonewhen there is no tank.Upstream issue #10: bare KeyError
call_operationindexed the unit's operation config directly, so an operation the unit does not expose raisedKeyError. It now raisesAlthermaException("Operation X is not supported by unit N")and sends nothing.Tests
Written first, five failed on the old code: discovery for space heating, both tank labels, the adapter, a hydrobox without a tank, an unrecognized unit; and supported/unsupported operations. 41 tests pass (coverage 65% to 75%), ruff and bandit clean.
Not changed
settable: falsestill receives the write, with a warning): this is how the library has always behaved and the reporter confirms the write works. Not a library bug.After merging
auto-tagcreatesv0.1.1. Then the Home Assistant integration needs its pin bumped tov0.1.1, and the platforms must cope withhot_water_tankbeingNone(separate MR, in preparation).Claude-Session: https://claude.ai/code/session_013jL41LP9srdcUDYggNpC98
🤖 Generated with Claude Code