From 00506a79e9771adfcea6f694233eabe7ed43c016 Mon Sep 17 00:00:00 2001 From: Carlo Costanzo Date: Sat, 27 Dec 2025 15:41:39 -0500 Subject: [PATCH] Update HA version to 2025.12.4 and refine vacuum automation logic to improve queue handling and logbook entries for better tracking of vacuum state changes. --- config/.HA_VERSION | 2 +- config/packages/vacuum.yaml | 46 +++++++++++++++++++++++-------------- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/config/.HA_VERSION b/config/.HA_VERSION index 6e7e5869..2f69e60d 100755 --- a/config/.HA_VERSION +++ b/config/.HA_VERSION @@ -1 +1 @@ -2025.12.3 \ No newline at end of file +2025.12.4 \ No newline at end of file diff --git a/config/packages/vacuum.yaml b/config/packages/vacuum.yaml index d3807811..79ab2f8b 100755 --- a/config/packages/vacuum.yaml +++ b/config/packages/vacuum.yaml @@ -13,7 +13,9 @@ # - Phase changes are driven by `sensor.l10s_vacuum_task_status: completed` and an empty queue to avoid skipping ahead on false room transitions. # - 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). -# - Docked + task complete now clears the queue and disables On-Demand to keep the UI state honest. +# - Docked + task complete clears the queue to keep the UI state honest. +# - Queue-empty trigger ignores already-completed tasks to avoid immediate reseeding. +# - Queue-empty no longer auto-reseeds; phase advance handles the next run on completion. ###################################################################### ## 1. Helpers @@ -166,9 +168,6 @@ automation: - platform: state entity_id: input_boolean.l10s_vacuum_on_demand to: 'on' - - platform: state - entity_id: input_text.l10s_vacuum_room_queue - to: "" condition: - condition: state entity_id: input_boolean.guest_mode @@ -176,6 +175,9 @@ automation: - condition: template value_template: > {{ is_state('input_boolean.l10s_vacuum_on_demand', 'on') or is_state('group.family', 'not_home') }} + - condition: template + value_template: > + true - condition: template value_template: "{{ not is_state('vacuum.l10s_vacuum', 'cleaning') }}" action: @@ -314,21 +316,31 @@ automation: - platform: state entity_id: vacuum.l10s_vacuum to: 'docked' + variables: + queue_empty: "{{ (states('input_text.l10s_vacuum_room_queue') | default('', true) | trim) == '' }}" condition: - condition: state entity_id: sensor.l10s_vacuum_task_status - state: 'Completed' + state: 'completed' action: - - service: input_text.set_value - target: - entity_id: input_text.l10s_vacuum_room_queue - data: - value: "" - - service: script.send_to_logbook - data: - topic: "VACUUM" - message: "Docked after completion; queue cleared." - - delay: 00:15:00 + - choose: + - conditions: + - condition: template + value_template: "{{ queue_empty }}" + sequence: + - service: script.send_to_logbook + data: + topic: "VACUUM" + message: "Docked after completion; queue already empty." + - conditions: + - condition: template + value_template: "{{ not queue_empty }}" + sequence: + - service: script.send_to_logbook + data: + topic: "VACUUM" + message: "Docked but queue still has rooms; leaving queue intact." + default: [] - alias: 'Away Vacuum: Advance Phase on Task Complete' id: 3b49236f-6da5-4b4d-a743-82b4ea00db62 @@ -336,7 +348,7 @@ automation: trigger: - platform: state entity_id: sensor.l10s_vacuum_task_status - to: 'Completed' + to: 'completed' condition: - condition: state entity_id: input_boolean.l10s_vacuum_on_demand @@ -408,7 +420,7 @@ automation: condition: - condition: state entity_id: sensor.l10s_vacuum_task_status - state: 'Completed' + state: 'completed' action: - service: button.press target: