Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add firmware update support across the API layer, including firmware auto-upgrade toggling, firmware availability lookup, OTA trigger support, Markdown-friendly changelog output, and debug logging around OTA trigger attempts.
Changes
This branch adds
set_firmware_auto_upgrade(...),get_firmware_upgrade_info(...), andstart_firmware_upgrade(...)toWorxCloud. It also adds domain exceptions for OTA support and missing firmware availability, keeps cached mower and device firmware state aligned, and documents the new helpers in the README.The firmware availability flow was live-verified against two accounts: one mower returning firmware upgrade metadata with a newer version available, and one mower returning no available firmware. The implementation now handles
404fromGET /api/v2/product-items/{serial}/firmware-upgradeas no currently available firmware metadata, which matches the observed live behavior. OTA trigger logging was also added to make queue attempts and no-update rejections visible in debug logs.Firmware changelogs are now exposed both in their raw form and as a Markdown-friendly
changelog_markdownvariant. This keeps the original payload intact while making the release notes easier to render cleanly in Home Assistant and other downstream integrations.Testing
ruff format pyworxcloud/__init__.py pyworxcloud/exceptions.py tests/test_api_lifecycle.pyruff check pyworxcloud/__init__.py pyworxcloud/exceptions.py tests/test_api_lifecycle.py./.venv/bin/pytest -q tests/test_api_lifecycle.py -k 'firmware_upgrade or firmware_auto_upgrade or toggle_auto_schedule or set_lawn'./.venv/bin/pytest -q tests/test_api_lifecycle.py -k 'firmware_upgrade_info or firmware_upgrade or changelog_markdown'NoFirmwareAvailableErrorproduct.changelogandproduct.changelog_markdownNotes
Proposed semver label for merge:
minor.The semver label has not been set yet and can be finalized when the PR is prepared for merge.