Conversation
Both paths now share the single set of callbacks registered in setup_OtaFirmware(). otaFirmware_checkPending() uses an isForced bool to gate the forced-only setup (application name, HTTPS client, version label), then both paths share the _otaLastPublishedPercentage reset, the retained in_progress MQTT publish with full version info, and the failure cleanup. Fixes three symptoms on MQTT-triggered OTA: - immediately shows 100% (premature incomplete MQTT publish removed from the update/set handler; checkPending now issues the proper message) - Updating app/ui titles not published (missing percentage reset before execOTA and on partition boundary now both handled) - progress bar not restarting between app and ui partitions (_otaLastPublishedPercentage reset added inside onProgress when a new partition is detected) Closes #689 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Jun 21, 2026
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
otaFirmware_checkPending()into one, gated by a singleisForcedbool (_otaPendingDoc.size() > 0)onProgress/onPartitionComplete/onCompletecallback registrations that were copy-pasted into the forced path — the callbacks registered once insetup_OtaFirmware()now serve both paths_otaLastPublishedPercentage = -1insideonProgresswhen a new partition is detected, so each partition starts with a fresh publish gate{"in_progress": true}publish from the MQTTupdate/sethandler —checkPending()now issues the proper retained message with full version info on the next loop tickFixes (#689)
update_percentage,installed_version, orlatest_version; removed in favour of the unified publish incheckPending()_otaLastPublishedPercentagewas never reset before callingexecOTA()on the non-forced path; thepct != _otaLastPublishedPercentageguard then suppressed publishes when a small partition completed at the same percentage as the previous run-1wheneveronProgressdetects a new partitionTest plan
update/set ON) with an update available — confirm HA showsinstalled_version,latest_version, andin_progress: trueimmediately, starting from 0%x.x.x (Forced), same progress/title behaviour)🤖 Generated with Claude Code