v0.17.1 - set_operation Partial Payload Fix (PW3 Mode-Persistence Race)
- fix(core):
set_operation()no longer back-fills/api/operationpayloads for partial-payload backends (cloud, fleetapi, tedapi) — only the fields the caller actually set are written. Tesla applies BACKUP_RESERVE and OPERATION_MODE as two asynchronous commands, so a back-filled reserve write raced a mode-only change and the mode command could be silently dropped on Powerwall 3 (most reproducible when the current reserve is 0). Local gateway writes keep the full-overwrite back-fill behavior, as before. - fix(core): an explicit
level=0is no longer coerced to booleanFalse— numeric0is preserved through payload construction, and the cloud/fleetapi "missing parameters" guards now treat0as present (is Nonechecks) - fix(core): calling
set_operation()with neitherlevelnormodeon a non-local backend now logs an error and returnsNoneinstead of posting an empty payload that would raise - chore: corrected the cloud/fleetapi invalid-payload error message quoting and grammar
- tests: payload-construction regression tests across local vs non-local semantics, reserve-0 acceptance (cloud + new FleetAPI suite), and empty-payload soft-fail
- Library version bumped to
0.17.1
Full changelog: v0.17.0...v0.17.1
- PyPI: https://pypi.org/project/pypowerwall/0.17.1/
- Legacy Proxy:
jasonacox/pypowerwall:0.17.1t100
Contributors
Thanks to the community members who made this release possible:
- @nesys — PW3 test matrix on pypowerwall-server #85 that surfaced the mode-persistence race and reserve-0 failures this release fixes
- @jasonacox — review, merge, and live-hardware validation direction
— Sam ⚡