After a successful OTA firmware update (upgrade_end with status=SUCCESS), the device reboots and rejoins the network. However, ZHA does not re-initialize the device after OTA completion, causing it to appear online but become functionally broken until ZHA is manually reloaded.
AI analysis:In zha/application/platforms/update.py, the async_install() method only clears _attr_in_progress after a successful OTA. It does not trigger device.async_configure() or device.async_initialize() to re-read attributes, re-establish bindings, and refresh the device's internal state.
Meanwhile, during the device reboot (~5-10 seconds), the coordinator's message queue accumulates DELIVERY_FAILED / MAC_INDIRECT_TIMEOUT errors for the target device. When the device comes back online, ZHA never calls async_device_initialized because no Device Announce is received (some end devices don't send one after OTA reboot), so the stale internal state persists.
After a successful OTA firmware update (upgrade_end with status=SUCCESS), the device reboots and rejoins the network. However, ZHA does not re-initialize the device after OTA completion, causing it to appear online but become functionally broken until ZHA is manually reloaded.
AI analysis:In
zha/application/platforms/update.py, theasync_install()method only clears_attr_in_progressafter a successful OTA. It does not triggerdevice.async_configure()ordevice.async_initialize()to re-read attributes, re-establish bindings, and refresh the device's internal state.Meanwhile, during the device reboot (~5-10 seconds), the coordinator's message queue accumulates
DELIVERY_FAILED/MAC_INDIRECT_TIMEOUTerrors for the target device. When the device comes back online, ZHA never callsasync_device_initializedbecause no Device Announce is received (some end devices don't send one after OTA reboot), so the stale internal state persists.