Merged
Conversation
Without this, the blocking execOTA() download prevents loop() from running, causing MQTT to drop offline during the update. Fixes #602 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The pre-execOTA publish in otaFirmware_checkPending() incorrectly set in_progress to false. Home Assistant therefore never saw the update state transition to in-progress during a forced OTA download. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tracks latest version and release URL in globals (set from onAvailable for auto OTA and from _otaPendingDoc for forced OTA). onProgress publishes a full state payload with update_percentage on each integer percent change so HA shows live download progress. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
HA requires installed_version != latest_version to show an update as actively installing. Forced OTA may use the same version string, so appending (Forced) ensures the values always differ. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix update_percentage description: value is 0-100, not percentage*100 - Document (Forced) suffix on latest_version for forced OTA installs - Add installed_version, latest_version, release_url to updateInProgressPayload to match the full state payload now published by onProgress callbacks Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add title field (e.g. "Flashing UI", "Flashing Firmware") to onProgress MQTT state publish so Home Assistant shows which partition is active - Remove title/release_summary from updateAvailablePayload schema; controller does not publish those fields from onAvailable - Add title field to updateInProgressPayload schema - Replace message-level examples with realistic, complete payloads including forced OTA and per-partition progress scenarios Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Partition names app and ui are lowercase; title now matches exactly what the OLED displays. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
mqttClient.loop()inside bothonProgresscallbacks (auto OTA insetup_OtaFirmware()and forced OTA inotaFirmware_checkPending()) so MQTT keepalives fire during the blockingexecOTA()download and the broker does not drop the connectionotaFirmware_checkPending()publishingin_progress: falseimmediately before callingexecOTA()— changed totrueso Home Assistant correctly shows the update as in-progressupdate_percentagepublishing during OTA download: globals_otaLatestVersion,_otaReleaseUrl, and_otaLastPublishedPercentageare set before each OTA begins (fromonAvailablefor the auto path, from_otaPendingDocfor the forced path);onProgresspublishes a full state payload on each integer-percent change" (Forced)"tolatest_versionin forced OTA progress publishes so Home Assistant detects a version difference and renders the install progress bar even when installed and target versions are identicaltitlefield to eachonProgresspublish (e.g."Flashing UI","Flashing Firmware") so Home Assistant shows which partition is currently being flashed instead of the progress bar resetting silently between partitionsupdate_percentagedescription (0–100, not percentage×100), documents the" (Forced)"suffix onlatest_version, addsinstalled_version/latest_version/release_url/titletoupdateInProgressPayload, removestitle/release_summaryfromupdateAvailablePayload(controller does not publish them), and replaces sparse examples with realistic, complete payloads covering all scenariosTest plan
in_progress: trueas soon as the forced OTA beginsupdate_percentageincrements in the HA update entity during downloadtitlechanges from"Flashing UI"to"Flashing Firmware"between partitionslatest_versioncarries the(Forced)suffix in progress publishes for forced OTAFixes #602
🤖 Generated with Claude Code