github jasonacox/pypowerwall v0.17.1
v0.17.1 - set_operation Partial Payload Fix

5 hours ago

v0.17.1 - set_operation Partial Payload Fix (PW3 Mode-Persistence Race)

  • fix(core): set_operation() no longer back-fills /api/operation payloads 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=0 is no longer coerced to boolean False — numeric 0 is preserved through payload construction, and the cloud/fleetapi "missing parameters" guards now treat 0 as present (is None checks)
  • fix(core): calling set_operation() with neither level nor mode on a non-local backend now logs an error and returns None instead 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


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 ⚡

Don't miss a new pypowerwall release

NewReleases is sending notifications on new releases.