Washer Delay-Start to Super-Off-Peak — One-Tap Button¶
Date: 2026-07-08 Ticket: #32 Status: Approved (design settled via brainstorm)
Goal¶
A one-tap dashboard button (and Alexa phrase) that schedules the LG WashTower washer to run overnight in super-off-peak — the cheapest TOU tier (00:00–05:00 ET) — by computing the right number.washer_delayed_start so the cycle starts at ~midnight, then starting it.
Entities (verified live)¶
| Entity | Role |
|---|---|
number.washer_delayed_start | delay-before-start, integer 0–19 h (unit h) |
select.washer_operation | options ['start','stop','power_off','power_on'] — set start to begin |
binary_sensor.washer_remote_start | must be on — the unit's Remote Start armed (load + select cycle + press Remote Start on the washer); currently off |
sensor.washtower_current_status | washer state (initial when idle) — informational |
notify.mobile_app_louis_iphone, notify.mobile_app_lindsays_iphone | both-phones confirmation |
Super-off-peak = 00:00–05:00 ET (from configuration_tou_addition.yaml — hour < 5 in every day-type branch), the cheapest tier.
Component — script.washer_delay_super_off_peak¶
alias: "Delay Wash to Super-Off-Peak". Sequence:
- Readiness guard. If
binary_sensor.washer_remote_startis noton: push both phones — "🧺 Washer isn't ready — load it, pick a cycle, and press Remote Start on the unit, then tap again." — andstop:. (Without Remote Start armed on the unit, HA'sstartdoes nothing.) - Compute the delay so the wash starts at midnight (super-off-peak begins): Always 0–19 (max 19 at 05:00); lands the start in the 00:00–00:59 super-off-peak window. If tapped during super-off-peak (00:00–04:59) → delay 0 → starts now (already cheapest).
number.set_valuenumber.washer_delayed_start=delay.select.select_optionselect.washer_operation→start.- Confirm (both phones): if delay 0 → "🧺 Wash starting now — super-off-peak."; else "🧺 Wash scheduled — starts ~midnight (super-off-peak), in {delay}h."
mode: single.
Delay-start semantics — verify on first real use¶
This assumes number.washer_delayed_start delays the start (what the name implies). If the LG unit instead treats it as delay-end (cycle finishes after N hours), the finish would land at midnight rather than the start. That's a one-line change to the delay formula once confirmed on the unit. The script comment + docs call this out; do not treat delay-start-vs-end as settled until observed on a real cycle.
Alexa exposure¶
Expose script.washer_delay_super_off_peak to Alexa (say "Alexa, activate Delay Wash to Super-Off-Peak" — or map a friendlier phrase via an Alexa routine). Exposure lives in .storage/homeassistant.exposed_entities (per-entity should_expose for cloud.alexa), not repo config — set via the HA UI (Settings → Voice assistants → Alexa) or a bulk jq-edit + restart + cloud/alexa/sync. Update the CLAUDE.md "Alexa Voice Exposure" index (19 → 20 scripts; add it to the Utility group).
Dashboard tile¶
Add a custom:button-card tile to the Command dashboard's Energy tab (command_dashboard.yaml) that calls script.washer_delay_super_off_peak. Icon mdi:washing-machine, label "Wash → Super-Off-Peak". Match the tab's existing glass/button styling. No standalone title card (house convention).
Out of scope¶
- Dryer — LG ThinQ exposes no delayed-start / start entity for the dryer (only power + monitoring); the dry cycle still uses the on-unit Delay Start. (#32 note.)
- Auto-triggering / scheduling without a tap — this is an on-demand button only.
- A tunable "finish by" time — the overnight-super-off-peak target is fixed (chosen in brainstorm).
Testing¶
- Entity-ref (Tier 3): the script references
number.washer_delayed_start,select.washer_operation,binary_sensor.washer_remote_start, and the two notify services — all exist. Dashboard tile references the script. - Unique script id;
make testgreen; Tier-1check_config(CI) validates the script + dashboard. - Manual, on a real load: load washer + arm Remote Start → tap → confirm the delay computes right and the cycle starts at midnight (and verify delay-start vs delay-end — see above). Also test the not-ready guard (tap with Remote Start off → get the guidance push).
Docs¶
- CLAUDE.md — add the script to the scripts/energy notes + the Alexa Voice Exposure index (19 → 20).
docs/energy.md— describe the button (what it does, the Remote-Start-first requirement, super-off-peak overnight, dryer caveat).docs/notifications.md— the confirmation / not-ready pushes.
Acceptance criteria¶
- [ ]
script.washer_delay_super_off_peakcomputesdelay = 0 if hour<5 else 24-hour, setsnumber.washer_delayed_start, andselect.washer_operation → start. - [ ] Readiness guard: not-ready (
washer_remote_startoff) → guidance push, no start. - [ ] Confirmation push to both phones (scheduled vs starting-now).
- [ ] Energy-tab dashboard tile calls the script.
- [ ] Script exposed to Alexa; CLAUDE.md Alexa index updated (19 → 20).
- [ ]
make testpasses; docs (CLAUDE.md, energy.md, notifications.md) updated. - [ ] Delay-start-vs-end flagged in code + docs as a first-use verification.