Commit 7069c87
fix: clear OTA update availability on initial MQTT connect after reboot
On first MQTT connect (auto-discovery not yet sent), publish retained
"offline" to the update availability topic so HA shows "Unavailable"
instead of the stale "Update available" from the previous session's
retained state. The OTA check will publish "online" once it confirms
the current firmware state.
Also adds "online" to the onAvailable callback, which previously never
set the availability topic, leaving the entity stuck "Unavailable" after
the initial connect fix when an update is found.
Closes #685
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 43b27c6 commit 7069c87
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3661 | 3661 | | |
3662 | 3662 | | |
3663 | 3663 | | |
| 3664 | + | |
| 3665 | + | |
| 3666 | + | |
| 3667 | + | |
3664 | 3668 | | |
3665 | 3669 | | |
3666 | 3670 | | |
| |||
4161 | 4165 | | |
4162 | 4166 | | |
4163 | 4167 | | |
| 4168 | + | |
| 4169 | + | |
| 4170 | + | |
| 4171 | + | |
| 4172 | + | |
4164 | 4173 | | |
4165 | 4174 | | |
4166 | 4175 | | |
| |||
0 commit comments