Behaviour
Switch-off sequence
A switch-off from the main switch or the auto-off is handled in this order:
- One-time lock active: the switch-off is discarded and the lock is used up. The plug stays on, and
advanced_device_shutdown_blockedfires withreason: one_time_lock. - Shutdown lock off: the plug switches off immediately.
- Shutdown lock on and status
standby: the plug switches off after the delay. - Shutdown lock on, any other status: the status becomes
shutting_down. The pre-action runs, and the integration waits forstandby. Then it waits for the delay and switches off.- If the maximum wait is exceeded, the plug is not switched off. The shutdown is cancelled, the status returns to the value derived from the power, and
advanced_device_shutdown_abortedfires.
- If the maximum wait is exceeded, the plug is not switched off. The shutdown is cancelled, the status returns to the value derived from the power, and
The Force off button and the force_off action do not go through this sequence. They switch the plug off at once, ignore the one-time lock and the shutdown lock, and remove an active lock.
Switching the main switch on during shutting_down cancels the shutdown.
Re-enable after external off
If the plug is switched off by something other than this integration (a physical button, another integration) while the device is running, the shutdown lock is on, and Switch back on after external off is enabled, the integration switches the plug back on. This happens at most three times. advanced_device_shutdown_blocked fires with reason: external_off.
An external off while WashData reports paused or user_paused is tolerated and not reversed.
One-time lock
- Turning on the One-time lock switch, or calling
lock_shutdown, arms the lock. The switch uses the default expiry from the options. - The lock ends at the first switch-off it blocks, at its expiry, when the switch is turned off manually, or when
unlock_shutdownis called, whichever happens first. - The lock does not block Force off.
- Expiry is stored. A lock whose expiry passed while Home Assistant was stopped is off after the restart.
Auto-off
After the configured time in uninterrupted standby, the integration switches the plug off through the normal switch-off path. The one-time lock and the shutdown lock are respected.
Problem sensor
The problem sensor reports these reasons in its reasons attribute:
power_missing: the plug is on and the power sensor is unavailable.cycle_too_long: the running cycle exceeds the maximum cycle duration.
Safety principle
The integration must not switch a device off unexpectedly. If the state is unclear (missing power data, unavailable sensor, restart during a pending shutdown), the plug stays on. A pending shutdown is discarded on restart.
Persistence
Cycle counter, operating hours, maintenance counter, last cycle values and the one-time lock expiry are stored with Home Assistant’s storage helper. They survive restarts.
Without WashData, a running cycle is stored too, with its start time and the energy up to the last update. After a restart the cycle continues with its original start, and no new cycle starts. The downtime counts towards the duration: if the cycle ends soon after the restart, duration_s is measured from the original start. Energy from the last seconds before the restart may be missing. With WashData linked, no cycle is stored, and the cycle state comes from WashData again after a restart.
Removing the entry
When the config entry is removed, the original switch is shown again, but only if it is still hidden by this integration. A switch that you hid yourself stays hidden.
WashData
WashData (ha_washdata) detects cycles and programs. Advanced Device does not recognise programs itself. If you select a WashData device under Extras:
- Cycles and cycle events follow WashData instead of this integration’s own thresholds.
- The shutdown lock is released only when WashData reports
finished,clean,offoridle. It is never released while WashData reportsrunning,paused,user_paused,endingoranti_wrinkle. - Program, time remaining and progress sensors are added to the device and mirror WashData.
In WashData, set the original plug switch (the one this integration hides) as the pause/resume switch, not the Advanced Device switch. Pausing turns the plug off from outside this integration. While WashData reports a pause, the integration tolerates that off and does not switch the plug back on.
A linked WashData entry that is not loaded when the device is set up is not used. That includes a removed WashData device and a WashData entry that is still retrying its setup when Home Assistant starts. The device then uses its own cycle logic and shows a repair issue, and setup does not fail. After WashData is loaded again, reload the Advanced Device entry or restart Home Assistant.
To remove a stale link, open the options and save the Extras step.