Refine vacuum automation logic in README and vacuum.yaml. Updated phase change conditions to ensure the vacuum is not actively cleaning before advancing phases. Improved clarity in comments regarding task completion and queue management.
@ -67,7 +67,7 @@ Live collection of plug-and-play Home Assistant packages. Each YAML file in this
### Dreame vacuum automations
### Dreame vacuum automations
- Logic lives in [vacuum.yaml](vacuum.yaml): continuous four-phase loop (sweep main, sweep baths, mop main, mop baths) driven by `input_select.l10s_vacuum_phase` and `input_text.l10s_vacuum_room_queue`, with per-room notifications and automatic reseeding between phases.
- Logic lives in [vacuum.yaml](vacuum.yaml): continuous four-phase loop (sweep main, sweep baths, mop main, mop baths) driven by `input_select.l10s_vacuum_phase` and `input_text.l10s_vacuum_room_queue`, with per-room notifications and automatic reseeding between phases.
- Uses the Dreame HACS integration with segment IDs to enforce bathrooms last in each sweep/mop pass, dock on arrival, and auto-run if idle for 3+ days.
- Uses the Dreame HACS integration with segment IDs to enforce bathrooms last in each sweep/mop pass, dock on arrival, and auto-run if idle for 3+ days.
- Room queue advances on a 2-minute dwell in `sensor.l10s_vacuum_current_room` (queue = remaining rooms); phase changes happen when an empty queue is reseeded after a completed task.
- Room queue advances on a 2-minute dwell in `sensor.l10s_vacuum_current_room` (queue = remaining rooms); phase changes happen when an empty queue is reseeded and the vacuum is not actively cleaning.
- One-off room cleaning for Alexa uses `input_boolean.l10s_vacuum_clean_*` (example: "Kitchen Clean") and runs a segment job without touching or checking the phased queue.
- One-off room cleaning for Alexa uses `input_boolean.l10s_vacuum_clean_*` (example: "Kitchen Clean") and runs a segment job without touching or checking the phased queue.
- Formal Dining (room 17/dock) is excluded from phased queues; clean it via the one-off toggle.
- Formal Dining (room 17/dock) is excluded from phased queues; clean it via the one-off toggle.
# - `sensor.l10s_vacuum_current_room` can change during transit; require a dwell (`for:`) before dequeuing.
# - `sensor.l10s_vacuum_current_room` can change during transit; require a dwell (`for:`) before dequeuing.
# - Treat 2+ minutes in a room as "being cleaned" and dequeue immediately (queue = remaining rooms).
# - Treat 2+ minutes in a room as "being cleaned" and dequeue immediately (queue = remaining rooms).
# - Phase changes happen when the queue is reseeded after task completion (queue is the source of truth).
# - Phase changes happen when the queue is reseeded after the queue hits zero and the vacuum is not actively cleaning (queue is the source of truth).
# - Avoid reissuing `dreame_vacuum.vacuum_clean_segment` while already cleaning; only send a new segment job when starting/resuming or switching phases.
# - Avoid reissuing `dreame_vacuum.vacuum_clean_segment` while already cleaning; only send a new segment job when starting/resuming or switching phases.
# - Jinja2 loop scoping: use a `namespace` when building lists (otherwise the queue can appear empty and get cleared).
# - Jinja2 loop scoping: use a `namespace` when building lists (otherwise the queue can appear empty and get cleared).
# - Docked + task complete only logs queue state; no auto-clearing.
# - Docked + task complete only logs queue state; no auto-clearing.
@ -125,10 +125,10 @@ script:
next_phase:"{{ phase_order[phase_index + 1] if has_next_phase else '' }}"
next_phase:"{{ phase_order[phase_index + 1] if has_next_phase else '' }}"