Skip to content

Commit 23d6235

Browse files
committed
Enhance vacuum automation logging by including the current phase in logbook messages and add a new automation for tracking phase changes. This improves visibility into the vacuum's operational state.
1 parent a7b0f58 commit 23d6235

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

config/packages/vacuum.yaml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ automation:
265265
- service: script.send_to_logbook
266266
data:
267267
topic: "VACUUM"
268-
message: "{{ room_name }} is clean. Remaining: {{ remaining_count }}."
268+
message: "{{ room_name }} is clean. Phase: {{ phase }}. Remaining: {{ remaining_count }}."
269269
- choose:
270270
- conditions:
271271
- condition: template
@@ -335,7 +335,7 @@ automation:
335335
- service: script.send_to_logbook
336336
data:
337337
topic: "VACUUM"
338-
message: "{{ states('sensor.l10s_vacuum_error') }} - {{ states('sensor.l10s_vacuum_current_room') }}"
338+
message: "{{ states('sensor.l10s_vacuum_error') }} - {{ states('sensor.l10s_vacuum_current_room') }} (phase: {{ states('input_select.l10s_vacuum_phase') }})"
339339

340340
- service: repairs.create
341341
data:
@@ -389,4 +389,19 @@ automation:
389389
- service: script.send_to_logbook
390390
data:
391391
topic: "VACUUM"
392-
message: "Vacuum error cleared."
392+
message: "Vacuum error cleared (phase: {{ states('input_select.l10s_vacuum_phase') }})."
393+
394+
- alias: "Vacuum Phase Changed"
395+
id: 3e99c6fb-7c4a-4a9f-8f2d-9f1b9a6b4baf
396+
mode: single
397+
trigger:
398+
- platform: state
399+
entity_id: input_select.l10s_vacuum_phase
400+
condition:
401+
- condition: template
402+
value_template: "{{ trigger.from_state is not none and trigger.to_state is not none }}"
403+
action:
404+
- service: script.send_to_logbook
405+
data:
406+
topic: "VACUUM"
407+
message: "Phase changed: {{ trigger.from_state.state }} -> {{ trigger.to_state.state }}."

0 commit comments

Comments
 (0)