Skip to content

v1.2.2

Latest

Choose a tag to compare

@bigmoby bigmoby released this 25 Jun 17:07

πŸ› 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