feat: add unload reminder to Washing Machine

- Send a reminder N minutes after cycle completion, with optional repeats
- Auto-cancel reminders when a new cycle starts or a door/lid sensor opens
- Gate the completion timestamp on configured door sensors being closed
- Track completion time (cct) and reminder count (urc) in persistent state
This commit is contained in:
2026-05-27 13:09:55 +03:00
parent 34cf5b1f7a
commit ad6f30ce3c
2 changed files with 212 additions and 3 deletions
+16 -1
View File
@@ -7,6 +7,7 @@ This blueprint monitors washing machine or dryer appliances and sends notificati
- Start notification with cycle duration, estimated end time, and mode details
- Completion notification (reminder to unload clothes) with energy report
- "Almost done" notification (configurable minutes before end)
- Unload reminder (configurable delay, optional repeats) — auto-cancelled when a new cycle starts or a configured door/lid sensor opens
- Pause/Resume notifications (detect when cycle is paused or resumed)
- Error message notifications
- Preparation mode notification (e.g., for dryer prep)
@@ -39,6 +40,8 @@ The automation tracks the appliance through these states:
| `cst` | Cycle Start Time (ISO timestamp) |
| `esmp` | Energy Samples accumulator (Wh) |
| `lst` | Last Sample Time (ISO timestamp) |
| `cct` | Cycle Completion Time (ISO timestamp, drives unload reminder) |
| `urc` | Unload Reminder Count (number of reminders already sent) |
## Message Template Variables
@@ -49,7 +52,7 @@ All message templates support these placeholder variables (use single braces):
| `{appliance_name}` | Device name (e.g., "Washing Machine") |
| `{remaining}` | Remaining time as string (e.g., "01:30:00") |
| `{estimated_end}` | Estimated completion time (e.g., "14:30") |
| `{minutes}` | Remaining minutes as number (e.g., 90) |
| `{minutes}` | Remaining minutes (almost-done) or elapsed minutes since completion (unload reminder) |
| `{error}` | Error message text (only in error notification) |
| `{tub_count}` | Tub clean counter value (only in tub clean notification) |
| `{tub_threshold}` | Tub clean threshold (only in tub clean notification) |
@@ -64,6 +67,18 @@ All message templates support these placeholder variables (use single braces):
- Notification service entity
- (Optional) Power sensor for energy tracking
## Unload Reminder
If `Unload Reminder Delay` is greater than 0, the automation:
1. Records the completion timestamp (`cct`) when the cycle finishes — but **only if** every door sensor in `Unload Reminder Door Sensors` is currently closed (or the list is empty).
2. Sends a reminder N minutes later (where N = delay), then optionally repeats every `Unload Reminder Repeat Interval` minutes up to `Unload Reminder Repeat Count` total.
3. Cancels all pending reminders when:
- A new cycle starts (start handler clears `cct` and `urc`), **or**
- Any of the configured door / lid sensors transitions to `on` (treated as "user has unloaded").
The check runs once per minute via a `time_pattern` trigger. The door sensor list is optional — leave it empty to keep reminders purely time-based.
## Note
Default messages are in Russian for LG ThinQ integration. Customize messages in the "Messages" section for your language.