Potencial fix for Washing Machine.yaml nofitications.
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 5s

This commit is contained in:
2026-01-29 15:29:46 +03:00
parent e641cefada
commit b2f71eef0c

View File

@@ -36,7 +36,7 @@
# #
# Message Template Variables: # Message Template Variables:
# All message templates support Jinja2 templating with these variables: # All message templates support Jinja2 templating with these variables:
# - {{ device_name }} - Device name (e.g., "Washing Machine") # - {{ appliance_name }} - Device name (e.g., "Washing Machine")
# - {{ remaining }} - Remaining time as string (e.g., "01:30:00") # - {{ remaining }} - Remaining time as string (e.g., "01:30:00")
# - {{ estimated_end }} - Estimated completion time (e.g., "14:30") # - {{ estimated_end }} - Estimated completion time (e.g., "14:30")
# - {{ minutes }} - Remaining minutes as number (e.g., 90) # - {{ minutes }} - Remaining minutes as number (e.g., 90)
@@ -157,7 +157,7 @@ blueprint:
input: input:
input_device_name: input_device_name:
name: "Device Name" name: "Device Name"
description: "Device name used in notification messages (available as {{ device_name }} in templates)" description: "Device name used in notification messages (available as {{ appliance_name }} in templates)"
default: "Стиральная машина" default: "Стиральная машина"
selector: selector:
text: text:
@@ -182,8 +182,8 @@ blueprint:
name: "Start Message" name: "Start Message"
description: > description: >
Message sent when cycle starts. Message sent when cycle starts.
Variables: {{ device_name }}, {{ remaining }}, {{ details }}, {{ estimated_end }} Variables: {{ appliance_name }}, {{ remaining }}, {{ details }}, {{ estimated_end }}
default: "🧺 {{ device_name }}: старт. Длительность: `{{ remaining }}`. Завершение: ~{{ estimated_end }}.{{ details }}" default: "🧺 {{ appliance_name }}: старт. Длительность: `{{ remaining }}`. Завершение: ~{{ estimated_end }}.{{ details }}"
selector: selector:
text: text:
multiline: true multiline: true
@@ -192,8 +192,8 @@ blueprint:
name: "Completed Message" name: "Completed Message"
description: > description: >
Message sent when cycle completes. Message sent when cycle completes.
Variables: {{ device_name }} Variables: {{ appliance_name }}
default: "🟢 {{ device_name }}: завершено. Не забудьте достать вещи!" default: "🟢 {{ appliance_name }}: завершено. Не забудьте достать вещи!"
selector: selector:
text: text:
multiline: true multiline: true
@@ -202,8 +202,8 @@ blueprint:
name: "Almost Done Message" name: "Almost Done Message"
description: > description: >
Message sent when cycle is about to finish. Message sent when cycle is about to finish.
Variables: {{ device_name }}, {{ minutes }} Variables: {{ appliance_name }}, {{ minutes }}
default: "🟢 {{ device_name }}: завершение через {{ minutes }} минут." default: "🟢 {{ appliance_name }}: завершение через {{ minutes }} минут."
selector: selector:
text: text:
multiline: true multiline: true
@@ -212,8 +212,8 @@ blueprint:
name: "Preparation Message" name: "Preparation Message"
description: > description: >
Message sent when device enters preparation mode. Message sent when device enters preparation mode.
Variables: {{ device_name }} Variables: {{ appliance_name }}
default: "⚙️ {{ device_name }}: подготовка активирована!" default: "⚙️ {{ appliance_name }}: подготовка активирована!"
selector: selector:
text: text:
multiline: true multiline: true
@@ -222,8 +222,8 @@ blueprint:
name: "Error Message" name: "Error Message"
description: > description: >
Message sent when an error occurs. Message sent when an error occurs.
Variables: {{ device_name }}, {{ error }} Variables: {{ appliance_name }}, {{ error }}
default: "⚠️ {{ device_name }}: ошибка. Детали: {{ error }}. Для более подробной информации обратитесь к приложению LG ThinQ." default: "⚠️ {{ appliance_name }}: ошибка. Детали: {{ error }}. Для более подробной информации обратитесь к приложению LG ThinQ."
selector: selector:
text: text:
multiline: true multiline: true
@@ -232,8 +232,8 @@ blueprint:
name: "Tub Clean Reminder Message" name: "Tub Clean Reminder Message"
description: > description: >
Message sent when tub cleaning is needed. Message sent when tub cleaning is needed.
Variables: {{ device_name }}, {{ tub_count }}, {{ tub_threshold }} Variables: {{ appliance_name }}, {{ tub_count }}, {{ tub_threshold }}
default: "⚠️ {{ device_name }}: внимание. Необходима чистка барабана. Число стирок: {{ tub_count }}. Допустимый предел: {{ tub_threshold }}." default: "⚠️ {{ appliance_name }}: внимание. Необходима чистка барабана. Число стирок: {{ tub_count }}. Допустимый предел: {{ tub_threshold }}."
selector: selector:
text: text:
multiline: true multiline: true
@@ -242,8 +242,8 @@ blueprint:
name: "Paused Message" name: "Paused Message"
description: > description: >
Message sent when cycle is paused. Message sent when cycle is paused.
Variables: {{ device_name }}, {{ remaining }} Variables: {{ appliance_name }}, {{ remaining }}
default: "⏸️ {{ device_name }}: пауза. Осталось: {{ remaining }}." default: "⏸️ {{ appliance_name }}: пауза. Осталось: {{ remaining }}."
selector: selector:
text: text:
multiline: true multiline: true
@@ -252,8 +252,8 @@ blueprint:
name: "Resumed Message" name: "Resumed Message"
description: > description: >
Message sent when cycle resumes. Message sent when cycle resumes.
Variables: {{ device_name }}, {{ remaining }} Variables: {{ appliance_name }}, {{ remaining }}
default: "▶️ {{ device_name }}: продолжение. Осталось: {{ remaining }}." default: "▶️ {{ appliance_name }}: продолжение. Осталось: {{ remaining }}."
selector: selector:
text: text:
multiline: true multiline: true
@@ -505,7 +505,9 @@ variables:
# Computed State Values # Computed State Values
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
remaining: "{{ states(remaining_time_sensor) }}" remaining: "{{ states(remaining_time_sensor) }}"
device_name: "{{ input_device_name }}" # Note: Using 'appliance_name' instead of 'device_name' to avoid conflict
# with Home Assistant's internal DeviceExtension.device_name function
appliance_name: "{{ input_device_name }}"
run_state: "{{ states(run_state_sensor) }}" run_state: "{{ states(run_state_sensor) }}"
# Determine if the appliance is actively running a cycle # Determine if the appliance is actively running a cycle
@@ -606,7 +608,7 @@ action:
sequence: sequence:
- service: persistent_notification.create - service: persistent_notification.create
data: data:
title: "Debug - {{ device_name }}" title: "Debug - {{ appliance_name }}"
message: > message: >
Trigger: {{ trigger.entity_id }} Trigger: {{ trigger.entity_id }}
Run State: {{ run_state }} Run State: {{ run_state }}
@@ -650,7 +652,7 @@ action:
# Render the message template with available variables # Render the message template with available variables
message: > message: >
{% set tpl = message_start_template %} {% set tpl = message_start_template %}
{{ tpl | replace('{{ device_name }}', device_name) {{ tpl | replace('{{ appliance_name }}', appliance_name)
| replace('{{ remaining }}', remaining) | replace('{{ remaining }}', remaining)
| replace('{{ estimated_end }}', est_end) | replace('{{ estimated_end }}', est_end)
| replace('{{ details }}', details) }} | replace('{{ details }}', details) }}
@@ -682,7 +684,7 @@ action:
sequence: sequence:
- service: persistent_notification.create - service: persistent_notification.create
data: data:
title: "{{ device_name }} - START" title: "{{ appliance_name }} - START"
message: > message: >
Action: CYCLE STARTED Action: CYCLE STARTED
Time: {{ now().strftime('%H:%M:%S') }} Time: {{ now().strftime('%H:%M:%S') }}
@@ -723,7 +725,7 @@ action:
# Render the message template with available variables # Render the message template with available variables
message: > message: >
{% set tpl = message_completed_template %} {% set tpl = message_completed_template %}
{{ tpl | replace('{{ device_name }}', device_name) }}{{ energy_report }} {{ tpl | replace('{{ appliance_name }}', appliance_name) }}{{ energy_report }}
# Send completion notification # Send completion notification
- service: notify.send_message - service: notify.send_message
@@ -754,7 +756,7 @@ action:
sequence: sequence:
- service: persistent_notification.create - service: persistent_notification.create
data: data:
title: "{{ device_name }} - COMPLETE" title: "{{ appliance_name }} - COMPLETE"
message: > message: >
Action: CYCLE COMPLETED Action: CYCLE COMPLETED
Time: {{ now().strftime('%H:%M:%S') }} Time: {{ now().strftime('%H:%M:%S') }}
@@ -785,7 +787,7 @@ action:
# Render the message template with available variables # Render the message template with available variables
message: > message: >
{% set tpl = message_preparation_template %} {% set tpl = message_preparation_template %}
{{ tpl | replace('{{ device_name }}', device_name) }} {{ tpl | replace('{{ appliance_name }}', appliance_name) }}
# Send preparation notification # Send preparation notification
- service: notify.send_message - service: notify.send_message
@@ -811,7 +813,7 @@ action:
# Render the message template with available variables # Render the message template with available variables
message: > message: >
{% set tpl = message_error_template %} {% set tpl = message_error_template %}
{{ tpl | replace('{{ device_name }}', device_name) {{ tpl | replace('{{ appliance_name }}', appliance_name)
| replace('{{ error }}', error) }} | replace('{{ error }}', error) }}
# Send error notification # Send error notification
@@ -849,7 +851,7 @@ action:
# Render the message template with available variables # Render the message template with available variables
message: > message: >
{% set tpl = message_almost_done_template %} {% set tpl = message_almost_done_template %}
{{ tpl | replace('{{ device_name }}', device_name) {{ tpl | replace('{{ appliance_name }}', appliance_name)
| replace('{{ minutes }}', minutes | string) }} | replace('{{ minutes }}', minutes | string) }}
# Send "almost done" notification # Send "almost done" notification
@@ -877,7 +879,7 @@ action:
# Render the message template with available variables # Render the message template with available variables
message: > message: >
{% set tpl = message_tub_clean_template %} {% set tpl = message_tub_clean_template %}
{{ tpl | replace('{{ device_name }}', device_name) {{ tpl | replace('{{ appliance_name }}', appliance_name)
| replace('{{ tub_count }}', tub_count | string) | replace('{{ tub_count }}', tub_count | string)
| replace('{{ tub_threshold }}', tub_threshold | string) }} | replace('{{ tub_threshold }}', tub_threshold | string) }}
@@ -916,7 +918,7 @@ action:
- variables: - variables:
message: > message: >
{% set tpl = message_paused_template %} {% set tpl = message_paused_template %}
{{ tpl | replace('{{ device_name }}', device_name) {{ tpl | replace('{{ appliance_name }}', appliance_name)
| replace('{{ remaining }}', remaining) }} | replace('{{ remaining }}', remaining) }}
# Send pause notification # Send pause notification
@@ -932,7 +934,7 @@ action:
sequence: sequence:
- service: persistent_notification.create - service: persistent_notification.create
data: data:
title: "{{ device_name }} - PAUSED" title: "{{ appliance_name }} - PAUSED"
message: > message: >
Action: CYCLE PAUSED Action: CYCLE PAUSED
Time: {{ now().strftime('%H:%M:%S') }} Time: {{ now().strftime('%H:%M:%S') }}
@@ -964,7 +966,7 @@ action:
- variables: - variables:
message: > message: >
{% set tpl = message_resumed_template %} {% set tpl = message_resumed_template %}
{{ tpl | replace('{{ device_name }}', device_name) {{ tpl | replace('{{ appliance_name }}', appliance_name)
| replace('{{ remaining }}', remaining) }} | replace('{{ remaining }}', remaining) }}
# Send resume notification # Send resume notification
@@ -980,7 +982,7 @@ action:
sequence: sequence:
- service: persistent_notification.create - service: persistent_notification.create
data: data:
title: "{{ device_name }} - RESUMED" title: "{{ appliance_name }} - RESUMED"
message: > message: >
Action: CYCLE RESUMED Action: CYCLE RESUMED
Time: {{ now().strftime('%H:%M:%S') }} Time: {{ now().strftime('%H:%M:%S') }}