π Bug Fix
Fix: Integration fails to load when appliance is off at HA startup
In v1.2.1, if Home Assistant restarted while the appliance was powered off, the integration
could not complete its first coordinator poll and entered a retry loop β causing all sensors
to appear as "unavailable" with the warning:
"Questa entitΓ non viene piΓΉ fornita dall'integrazione candy"
(This entity is no longer provided by the candy integration)
Root cause: On the first poll after startup, last_known_status was None (no previous
successful poll in memory). A timeout from the offline device therefore could not trigger
the "Off" heuristic introduced in v1.2.1, resulting in UpdateFailed β
ConfigEntryNotReady β integration not loaded β entities missing.
Fix: The integration now reads Home Assistant's own entity registry and state machine
at startup to determine the previously registered device type. It pre-populates
last_known_status with a synthetic "Off" status before the first poll β allowing the
integration to load successfully even when the appliance is powered off.
Startup behavior after this fix
| Scenario | Before v1.2.2 | After v1.2.2 |
|---|---|---|
| HA restarts, appliance off after finished cycle | β Integration fails to load | β Sensors show "Off" |
| HA restarts, appliance on | β Works normally | β Works normally |
| Appliance goes offline during HA session (after Finished/Idle) | β Sensors show "Off" | β Sensors show "Off" |
| Appliance goes offline during active cycle | β Sensors show "unavailable" | β Sensors show "unavailable" |
Followup fix for issue #1 reported by @nelsonamen
Full Changelog: v1.2.1...v1.2.2