revert Clean main branch
This commit is contained in:
2026-07-14 17:02:06 +07:00
parent 9c5f315f73
commit 47eee0291f
25 changed files with 7915 additions and 0 deletions
+190
View File
@@ -0,0 +1,190 @@
washer:
automation:
# ==========================================
# --- УВЕДОМЛЕНИЕ: ОШИБКА СТИРАЛКИ ---
# ==========================================
- id: ntf_washing_error
alias: "ntf|washing_error"
mode: single
trigger:
- platform: state
entity_id: binary_sensor.stiralnaia_mashina_s_gorizontalnoi_zagruzkoi_error_state
to: "on"
action:
- service: telegram_bot.send_message
data:
chat_id:
- -1002006010424
- -1003233671944
parse_mode: html
message: |
{% set err = states("sensor.stiralnaia_mashina_s_gorizontalnoi_zagruzkoi_error_message") %}
⚠️ <b>Ошибка стиральной машины!</b>
{% if err == "dE1" %}🚪 Открыт люк!
{% elif err == "UE" %}⚖️ Дисбаланс: бельё плохо распределено. Попробуйте переложить вещи.
{% else %}❓ Неизвестная ошибка: {{ err }}{% endif %}
inline_keyboard:
- '📊 Состояние:/bt_wh_control, 🔙 Меню:/menu_back'
- '🗑️ Прочитано:/menu_hide'
# ==========================================
# --- УВЕДОМЛЕНИЕ: НАЧАЛО СТИРКИ ---
# ==========================================
- id: ntf_wshr_wash_start
alias: "ntf|wshr|wash_start"
trigger:
- platform: state
entity_id: sensor.stiralnaia_mashina_s_gorizontalnoi_zagruzkoi_run_state
to: "Стирка"
for:
seconds: 30
action:
- service: telegram_bot.send_message
data:
chat_id:
- -1002006010424
- -1003233671944
parse_mode: html
message: |
🧼 <b>Стирка запущена</b>
📋 Программа: {{ states('sensor.stiralnaia_mashina_s_gorizontalnoi_zagruzkoi_current_course') }}
🌡️ Температура: {{ states('sensor.stiralnaia_mashina_s_gorizontalnoi_zagruzkoi_water_temp') }}
♻️ Обороты: {{ states('sensor.stiralnaia_mashina_s_gorizontalnoi_zagruzkoi_spin_speed') }}
⏳ Время: {{ state_attr('sensor.stiralnaia_mashina_s_gorizontalnoi_zagruzkoi', 'remain_time') }}
🕒 Завершение в: {{ as_timestamp(state_attr('sensor.stiralnaia_mashina_s_gorizontalnoi_zagruzkoi', 'end_time')) | timestamp_custom('%H:%M:%S') }}
inline_keyboard:
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
# ==========================================
# --- УВЕДОМЛЕНИЕ: ЗАВЕРШЕНИЕ СТИРКИ ---
# ==========================================
- id: ntf_wshr_wash_finish
alias: "ntf|wshr|wash_finish"
trigger:
- platform: state
entity_id: sensor.stiralnaia_mashina_s_gorizontalnoi_zagruzkoi_run_state
from: "Завершено"
to: "-"
action:
- service: telegram_bot.send_message
data:
chat_id:
- -1002006010424
- -1003233671944
parse_mode: html
message: "✅ <b>Стирка успешно завершена!</b>"
inline_keyboard:
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
# ==========================================
# --- УВЕДОМЛЕНИЕ: НУЖНО ДОСТАТЬ БЕЛЬЕ ---
# ==========================================
- id: ntf_wshr_wash_cool_on
alias: "ntf|wshr|wash_cool_on"
trigger:
- platform: state
entity_id: sensor.stiralnaia_mashina_s_gorizontalnoi_zagruzkoi_run_state
from: "Завершено"
to: "Охлаждение"
action:
- service: telegram_bot.send_message
data:
chat_id:
- -1002006010424
- -1003233671944
parse_mode: html
message: "🧺 <b>Сушка завершена!</b> Пора достать бельё."
inline_keyboard:
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
# ==========================================
# --- УВЕДОМЛЕНИЕ: ОХЛАЖДЕНИЕ ОСТАНОВЛЕНО ---
# ==========================================
- id: ntf_wshr_wash_cool_off
alias: "ntf|wshr|wash_cool_off"
trigger:
- platform: state
entity_id: sensor.stiralnaia_mashina_s_gorizontalnoi_zagruzkoi_run_state
from: "Охлаждение"
to: null
action:
- service: telegram_bot.send_message
data:
chat_id:
- -1002006010424
- -1003233671944
parse_mode: html
message: "✅ <b>Охлаждение белья остановлено</b>"
inline_keyboard:
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
# ==========================================
# --- ПОВТОРЯЮЩЕЕСЯ НАПОМИНАНИЕ (УМНОЕ) ---
# ==========================================
- id: ntf_tg_wshr_get_laundry
alias: "ntf|tg|wshr|get_laundry"
description: "Напоминает достать белье тому, кто дома"
mode: single
trigger:
- platform: state
entity_id: timer.timer_cool_washer
from: "idle"
to: "active"
condition:
- condition: state
entity_id: binary_sensor.day_time
state: "on"
action:
- repeat:
while:
- condition: state
entity_id: timer.timer_cool_washer
state: "active"
sequence:
- variables:
denis_home: "{{ is_state('device_tracker.google_maps_108918666344169166438', 'home') }}"
lena_home: "{{ is_state('device_tracker.google_maps_118311730364158481019', 'home') }}"
finish: "{{ state_attr('timer.timer_cool_washer', 'finishes_at') }}"
msg: |
🧺 <b>Напоминание: Бельё в машинке!</b>
{% if finish -%}
{%- set delta = (as_datetime(finish) - now()).total_seconds() | int -%}
{%- if delta > 0 -%}
{%- set hours = delta // 3600 -%}
{%- set minutes = (delta % 3600) // 60 -%}
{%- set seconds = delta % 60 %}
⏳ До автовыключения: {{ '%02d:%02d:%02d' % (hours, minutes, seconds) }}
{%- else %}
⏳ До автовыключения: 00:00:00
{%- endif -%}
{%- else %}
❌ Таймер не активен.
{%- endif %}
# Пишем в группу Дениса, если он дома
- if: "{{ denis_home }}"
then:
- service: telegram_bot.send_message
data:
chat_id: -1002006010424
parse_mode: html
message: "{{ msg }}"
inline_keyboard:
- '🔙 Меню:/menu_back, 🗑️ Прочитано:/menu_hide'
# Пишем в группу Лены, если она дома
- if: "{{ lena_home }}"
then:
- service: telegram_bot.send_message
data:
chat_id: -1003233671944
parse_mode: html
message: "{{ msg }}"
inline_keyboard:
- '🔙 Меню:/menu_back, 🗑️ Прочитано:/menu_hide'
- delay:
minutes: 30