@@ -0,0 +1,846 @@
|
||||
gps:
|
||||
rest_command:
|
||||
notify_n8n_lena_left_home:
|
||||
url: "https://n8n.dddennnisss.ru:8443/webhook-test/lena_left_home"
|
||||
method: POST
|
||||
content_type: "application/json"
|
||||
payload: >
|
||||
{
|
||||
"event": "lena_left_home",
|
||||
"name": "{{ state_attr('device_tracker.google_maps_118311730364158481019', 'nickname') | replace('\"', '\\\"') }}",
|
||||
"address": "{{ state_attr('device_tracker.google_maps_118311730364158481019', 'address') | replace('\"', '\\\"') }}",
|
||||
"last_updated": "{{ states.device_tracker.google_maps_118311730364158481019.last_updated }}"
|
||||
}
|
||||
|
||||
input_boolean:
|
||||
gps_recently_nearby_d_e:
|
||||
name: gps_recently_nearby_d_e
|
||||
initial: false
|
||||
icon: mdi:map-marker-distance
|
||||
|
||||
automation:
|
||||
################################################################################
|
||||
# Уведомления о местоположении
|
||||
################################################################################
|
||||
|
||||
# ===============
|
||||
# HOME (ДОМ)
|
||||
# ===============
|
||||
- id: GPS|lena_on_home
|
||||
alias: GPS|lena_on_home
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.home
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
🏠 Лена дома.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|lena_off_home
|
||||
alias: GPS|lena_off_home
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.home
|
||||
event: leave
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
💨 Лена вышла из дома.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
- service: rest_command.notify_n8n_lena_left_home
|
||||
|
||||
- id: GPS|denis_on_home
|
||||
alias: GPS|denis_on_home
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.home
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
🏠 Денис дома.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|denis_off_home
|
||||
alias: GPS|denis_off_home
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.home
|
||||
event: leave
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
💨 Денис вышел из дома.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
# ===============
|
||||
# RADUGA (РАДУГА)
|
||||
# ===============
|
||||
- id: GPS|lena_on_raduga
|
||||
alias: GPS|lena_on_raduga
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.raduga
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_location
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
latitude: "{{ state_attr('device_tracker.google_maps_118311730364158481019', 'latitude') }}"
|
||||
longitude: "{{ state_attr('device_tracker.google_maps_118311730364158481019', 'longitude') }}"
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
🌈 Лена на радуге.
|
||||
inline_keyboard:
|
||||
- '🗺️ Где Лена:/gps_send_loc_e'
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|lena_off_raduga
|
||||
alias: GPS|lena_off_raduga
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.raduga
|
||||
event: leave
|
||||
action:
|
||||
- service: telegram_bot.send_location
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
latitude: "{{ state_attr('device_tracker.google_maps_118311730364158481019', 'latitude') }}"
|
||||
longitude: "{{ state_attr('device_tracker.google_maps_118311730364158481019', 'longitude') }}"
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
💨 Лена уехала с радуги.
|
||||
inline_keyboard:
|
||||
- '🗺️ Где Лена:/gps_send_loc_e'
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|denis_on_raduga
|
||||
alias: GPS|denis_on_raduga
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.raduga
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_location
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
latitude: "{{ state_attr('device_tracker.google_maps_108918666344169166438', 'latitude') }}"
|
||||
longitude: "{{ state_attr('device_tracker.google_maps_108918666344169166438', 'longitude') }}"
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
🌈 Денис на радуге.
|
||||
inline_keyboard:
|
||||
- '🗺️ Где Денис:/gps_send_loc_d'
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|denis_off_raduga
|
||||
alias: GPS|denis_off_raduga
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.raduga
|
||||
event: leave
|
||||
action:
|
||||
- service: telegram_bot.send_location
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
latitude: "{{ state_attr('device_tracker.google_maps_108918666344169166438', 'latitude') }}"
|
||||
longitude: "{{ state_attr('device_tracker.google_maps_108918666344169166438', 'longitude') }}"
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
💨 Денис уехал с радуги.
|
||||
inline_keyboard:
|
||||
- '🗺️ Где Денис:/gps_send_loc_d'
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
# ===============
|
||||
# CENTER (ЦЕНТР)
|
||||
# ===============
|
||||
- id: GPS|lena_on_center
|
||||
alias: GPS|lena_on_center
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.tsentr
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_location
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
latitude: "{{ state_attr('device_tracker.google_maps_118311730364158481019', 'latitude') }}"
|
||||
longitude: "{{ state_attr('device_tracker.google_maps_118311730364158481019', 'longitude') }}"
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
🏙️ Лена в центре.
|
||||
inline_keyboard:
|
||||
- '🗺️ Где Лена:/gps_send_loc_e'
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|lena_off_center
|
||||
alias: GPS|lena_off_center
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.tsentr
|
||||
event: leave
|
||||
action:
|
||||
- service: telegram_bot.send_location
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
latitude: "{{ state_attr('device_tracker.google_maps_118311730364158481019', 'latitude') }}"
|
||||
longitude: "{{ state_attr('device_tracker.google_maps_118311730364158481019', 'longitude') }}"
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
💨 Лена уехала из центра.
|
||||
inline_keyboard:
|
||||
- '🗺️ Где Лена:/gps_send_loc_e'
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|denis_on_center
|
||||
alias: GPS|denis_on_center
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.tsentr
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_location
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
latitude: "{{ state_attr('device_tracker.google_maps_108918666344169166438', 'latitude') }}"
|
||||
longitude: "{{ state_attr('device_tracker.google_maps_108918666344169166438', 'longitude') }}"
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
🏙️ Денис в центре.
|
||||
inline_keyboard:
|
||||
- '🗺️ Где Денис:/gps_send_loc_d'
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|denis_off_center
|
||||
alias: GPS|denis_off_center
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.tsentr
|
||||
event: leave
|
||||
action:
|
||||
- service: telegram_bot.send_location
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
latitude: "{{ state_attr('device_tracker.google_maps_108918666344169166438', 'latitude') }}"
|
||||
longitude: "{{ state_attr('device_tracker.google_maps_108918666344169166438', 'longitude') }}"
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
💨 Денис уехал из центра.
|
||||
inline_keyboard:
|
||||
- '🗺️ Где Денис:/gps_send_loc_d'
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
# ===============
|
||||
# FAMILY (РОДИТЕЛИ)
|
||||
# ===============
|
||||
- id: GPS|lena_on_familyr
|
||||
alias: GPS|lena_on_familyr
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.roditeli_leny
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
👨👩👧 Лена у родителей.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|lena_off_familyr
|
||||
alias: GPS|lena_off_familyr
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.roditeli_leny
|
||||
event: leave
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
💨 Лена уехала от родителей.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|denis_on_familyr
|
||||
alias: GPS|denis_on_familyr
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.roditeli_leny
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
👨👩👧 Денис у родителей Лены.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|denis_off_familyr
|
||||
alias: GPS|denis_off_familyr
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.roditeli_leny
|
||||
event: leave
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
💨 Денис уехал от родителей Лены.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
# ===============
|
||||
# JOB ELENA (РАБОТА ЛЕНЫ)
|
||||
# ===============
|
||||
- id: GPS|lena_on_job
|
||||
alias: GPS|lena_on_job
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.rabota_leny
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
💼 Лена на работе.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|lena_off_job
|
||||
alias: GPS|lena_off_job
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.rabota_leny
|
||||
event: leave
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
💨 Лена уехала с работы.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
# ===============
|
||||
# YASHKA (ЯШКА)
|
||||
# ===============
|
||||
- id: GPS|lena_on_ya
|
||||
alias: GPS|lena_on_ya
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.iashka
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
🐾 Лена около Яшки.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|Denis_on_ya
|
||||
alias: GPS|Denis_on_ya
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.iashka
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
🐾 Денис около Яшки.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
# ===============
|
||||
# TERESHKOVOI_16 (КВАРТИРА ТЕРЕШКОВОЙ)
|
||||
# ===============
|
||||
- id: GPS|lena_on_tereshkovoi_16
|
||||
alias: GPS|lena_on_tereshkovoi_16
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.tereshkovoi_16
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
🏢 Лена на квартире.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|lena_off_tereshkovoi_16
|
||||
alias: GPS|lena_off_tereshkovoi_16
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.tereshkovoi_16
|
||||
event: leave
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
💨 Лена уехала с квартиры.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|denis_on_tereshkovoi_16
|
||||
alias: GPS|denis_on_tereshkovoi_16
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.tereshkovoi_16
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
🏢 Денис на квартире.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|denis_off_tereshkovoi_16
|
||||
alias: GPS|denis_off_tereshkovoi_16
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.tereshkovoi_16
|
||||
event: leave
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
💨 Денис уехал с квартиры.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
# ===============
|
||||
# NOVOSTROIKA (НОВОСТРОЙКА)
|
||||
# ===============
|
||||
- id: GPS|lena_on_novostroika
|
||||
alias: GPS|lena_on_novostroika
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.novostroika
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
🏗️ Лена на Новостройке.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|lena_off_novostroika
|
||||
alias: GPS|lena_off_novostroika
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.novostroika
|
||||
event: leave
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
💨 Лена уехала с Новостройки.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
# ===============
|
||||
# MAMA (МАМА)
|
||||
# ===============
|
||||
- id: GPS|lena_on_mama
|
||||
alias: GPS|lena_on_mama
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.mama
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
👩👧 Лена у мамы.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|lena_off_mama
|
||||
alias: GPS|lena_off_mama
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.mama
|
||||
event: leave
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
💨 Лена уехала от мамы.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|denis_on_mama
|
||||
alias: GPS|denis_on_mama
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.mama
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
👨👧 Денис у мамы.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|denis_off_mama
|
||||
alias: GPS|denis_off_mama
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.mama
|
||||
event: leave
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
💨 Денис уехал от мамы.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
# ===============
|
||||
# JOB DENIS (РАБОТА ДЕНИС)
|
||||
# ===============
|
||||
- id: GPS|denis_on_job
|
||||
alias: GPS|denis_on_job
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.rabota
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
💼 Денис на работе.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|denis_off_job
|
||||
alias: GPS|denis_off_job
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.rabota
|
||||
event: leave
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
💨 Денис уехал с работы.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
# ===============
|
||||
# LENINSKIJ (ЛЕНИНСКИЙ)
|
||||
# ===============
|
||||
- id: GPS|denis_on_len
|
||||
alias: GPS|denis_on_len
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.leninskii
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
🏘️ Денис в Ленинском.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|denis_off_len
|
||||
alias: GPS|denis_off_len
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.leninskii
|
||||
event: leave
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
💨 Денис уехал из Ленинского.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|elena_on_len
|
||||
alias: GPS|elena_on_len
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.leninskii
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
🏘️ Лена в Ленинском.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|elena_off_len
|
||||
alias: GPS|elena_off_len
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.leninskii
|
||||
event: leave
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
💨 Лена уехала из Ленинского.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
# ===============
|
||||
# KEMEROVO (КЕМЕРОВО)
|
||||
# ===============
|
||||
- id: GPS|denis_on_kem
|
||||
alias: GPS|denis_on_kem
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.kemerovo
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
🌆 Денис в Кемерово.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|denis_off_kem
|
||||
alias: GPS|denis_off_kem
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.kemerovo
|
||||
event: leave
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
💨 Денис уехал из Кемерово.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|elena_on_kem
|
||||
alias: GPS|elena_on_kem
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.kemerovo
|
||||
event: enter
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
🌆 Лена в Кемерово.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- id: GPS|elena_off_kem
|
||||
alias: GPS|elena_off_kem
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.google_maps_118311730364158481019
|
||||
zone: zone.kemerovo
|
||||
event: leave
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
💨 Лена уехала из Кемерово.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
# ===============
|
||||
# УВЕДОМЛЕНИЕ: РЯДОМ (< 1км)
|
||||
# ===============
|
||||
- id: ntf|tg|GPS|distance<1km_d_e
|
||||
alias: ntf|tg|GPS|distance<1km_d_e
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: template
|
||||
value_template: >-
|
||||
{% set lat1 = state_attr('device_tracker.google_maps_108918666344169166438', 'latitude') %}
|
||||
{% set lon1 = state_attr('device_tracker.google_maps_108918666344169166438', 'longitude') %}
|
||||
{% set lat2 = state_attr('device_tracker.google_maps_118311730364158481019', 'latitude') %}
|
||||
{% set lon2 = state_attr('device_tracker.google_maps_118311730364158481019', 'longitude') %}
|
||||
{% if lat1 and lon1 and lat2 and lon2 %}
|
||||
{{ distance(lat1, lon1, lat2, lon2) < 1 }}
|
||||
{% else %}
|
||||
false
|
||||
{% endif %}
|
||||
for:
|
||||
seconds: 10
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.gps_recently_nearby_d_e
|
||||
state: "off"
|
||||
- condition: template
|
||||
value_template: >
|
||||
{{ not is_state('device_tracker.google_maps_108918666344169166438', 'home') and
|
||||
not is_state('device_tracker.google_maps_118311730364158481019', 'home') }}
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.gps_recently_nearby_d_e
|
||||
|
||||
# 1. Уведомление Денису (о Елене)
|
||||
- service: telegram_bot.send_location
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
latitude: "{{ state_attr('device_tracker.google_maps_118311730364158481019', 'latitude') }}"
|
||||
longitude: "{{ state_attr('device_tracker.google_maps_118311730364158481019', 'longitude') }}"
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
🤝 Вы рядом с Еленой!
|
||||
📏 Расстояние: {{ distance(state_attr('device_tracker.google_maps_108918666344169166438', 'latitude'), state_attr('device_tracker.google_maps_108918666344169166438', 'longitude'), state_attr('device_tracker.google_maps_118311730364158481019', 'latitude'), state_attr('device_tracker.google_maps_118311730364158481019', 'longitude')) | round(2) }} км
|
||||
📍 Адрес Елены: {{ state_attr('device_tracker.google_maps_118311730364158481019', 'address') }}
|
||||
inline_keyboard:
|
||||
- '🗺️ Где Денис:/gps_send_loc_d, 🗺️ Где Лена:/gps_send_loc_e'
|
||||
- '🔙 Главное меню:/menu_back, ⚙️ Настройки GPS:/gps_control'
|
||||
|
||||
# 2. Уведомление Елене (о Денисе)
|
||||
- service: telegram_bot.send_location
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
latitude: "{{ state_attr('device_tracker.google_maps_108918666344169166438', 'latitude') }}"
|
||||
longitude: "{{ state_attr('device_tracker.google_maps_108918666344169166438', 'longitude') }}"
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1003233671944
|
||||
message: |
|
||||
🤝 Вы рядом с Денисом!
|
||||
📏 Расстояние: {{ distance(state_attr('device_tracker.google_maps_108918666344169166438', 'latitude'), state_attr('device_tracker.google_maps_108918666344169166438', 'longitude'), state_attr('device_tracker.google_maps_118311730364158481019', 'latitude'), state_attr('device_tracker.google_maps_118311730364158481019', 'longitude')) | round(2) }} км
|
||||
📍 Адрес Дениса: {{ state_attr('device_tracker.google_maps_108918666344169166438', 'address') }}
|
||||
inline_keyboard:
|
||||
- '🗺️ Где Денис:/gps_send_loc_d, 🗺️ Где Лена:/gps_send_loc_e'
|
||||
- '🔙 Главное меню:/menu_back, ⚙️ Настройки GPS:/gps_control'
|
||||
|
||||
# Сброс вспомогательного булеана для автоматизации уведомлений в телеграм
|
||||
- id: reset_gps_recently_nearby_d_e
|
||||
alias: reset_gps_recently_nearby_d_e
|
||||
description: "Сброс тумблера после расхождения > 1 км"
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: template
|
||||
value_template: >
|
||||
{% set lat1 = state_attr('device_tracker.google_maps_108918666344169166438', 'latitude') %}
|
||||
{% set lon1 = state_attr('device_tracker.google_maps_108918666344169166438', 'longitude') %}
|
||||
{% set lat2 = state_attr('device_tracker.google_maps_118311730364158481019', 'latitude') %}
|
||||
{% set lon2 = state_attr('device_tracker.google_maps_118311730364158481019', 'longitude') %}
|
||||
{% if lat1 and lon1 and lat2 and lon2 %}
|
||||
{{ distance(lat1, lon1, lat2, lon2) > 1 }}
|
||||
{% else %}
|
||||
false
|
||||
{% endif %}
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 5
|
||||
seconds: 0
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.gps_recently_nearby_d_e
|
||||
state: "on"
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.gps_recently_nearby_d_e
|
||||
@@ -0,0 +1,608 @@
|
||||
bus:
|
||||
|
||||
# Время после которого будет разрешено работать автоматизации tg|ntf|tram10_rad-gor_<20m
|
||||
|
||||
input_datetime:
|
||||
tram10_r_g_enable_time:
|
||||
name: INPT|tram10_r_g_enable_time
|
||||
has_date: false
|
||||
has_time: true
|
||||
initial: "07:15:00"
|
||||
|
||||
|
||||
|
||||
# Сенсоры, которые получают даннные о автобусе из API
|
||||
|
||||
#################34#####################################
|
||||
|
||||
sensor:
|
||||
- platform: rest
|
||||
name: bustime_34_kuz_pr
|
||||
resource: "https://ru.busti.me/api/notify_stop/?stop_id=460789&bus_id=11299"
|
||||
method: GET
|
||||
scan_interval: 30
|
||||
value_template: "{{ value_json.time }}"
|
||||
json_attributes:
|
||||
- name
|
||||
- time
|
||||
- x
|
||||
- y
|
||||
- updated
|
||||
|
||||
- platform: rest
|
||||
name: bustime_34_circ
|
||||
resource: "https://ru.busti.me/api/notify_stop/?stop_id=8880&bus_id=11299"
|
||||
method: GET
|
||||
scan_interval: 30
|
||||
value_template: "{{ value_json.time }}"
|
||||
json_attributes:
|
||||
- name
|
||||
- time
|
||||
- x
|
||||
- y
|
||||
- updated
|
||||
|
||||
- platform: rest
|
||||
name: bustime_34_univ
|
||||
resource: "https://ru.busti.me/api/notify_stop/?stop_id=87239&bus_id=11299"
|
||||
method: GET
|
||||
scan_interval: 15
|
||||
value_template: "{{ value_json.time }}"
|
||||
json_attributes:
|
||||
- name
|
||||
- time
|
||||
- x
|
||||
- y
|
||||
- updated
|
||||
|
||||
#################127#####################################
|
||||
|
||||
- platform: rest
|
||||
name: bustime_127_circ
|
||||
resource: "https://ru.busti.me/api/notify_stop/?stop_id=9277&bus_id=751"
|
||||
method: GET
|
||||
scan_interval: 30
|
||||
value_template: "{{ value_json.time }}"
|
||||
json_attributes:
|
||||
- name
|
||||
- time
|
||||
- x
|
||||
- y
|
||||
- updated
|
||||
|
||||
#################100#####################################
|
||||
|
||||
- platform: rest
|
||||
name: bustime_100_circ
|
||||
resource: "https://ru.busti.me/api/notify_stop/?stop_id=8899&bus_id=649"
|
||||
method: GET
|
||||
scan_interval: 30
|
||||
value_template: "{{ value_json.time }}"
|
||||
json_attributes:
|
||||
- name
|
||||
- time
|
||||
- x
|
||||
- y
|
||||
- updated
|
||||
|
||||
#################40#####################################
|
||||
|
||||
- platform: rest
|
||||
name: bustime_40_circ
|
||||
resource: "https://ru.busti.me/api/notify_stop/?stop_id=8880&bus_id=696"
|
||||
method: GET
|
||||
scan_interval: 30
|
||||
value_template: "{{ value_json.time }}"
|
||||
json_attributes:
|
||||
- name
|
||||
- time
|
||||
- x
|
||||
- y
|
||||
- updated
|
||||
|
||||
#################12#####################################
|
||||
|
||||
- platform: rest
|
||||
name: bustime_12_circ
|
||||
resource: "https://ru.busti.me/api/notify_stop/?stop_id=9277&bus_id=652"
|
||||
method: GET
|
||||
scan_interval: 30
|
||||
value_template: "{{ value_json.time }}"
|
||||
json_attributes:
|
||||
- name
|
||||
- time
|
||||
- x
|
||||
- y
|
||||
- updated
|
||||
|
||||
########################################################
|
||||
|
||||
# Остановка: Серебряный бор - мжк
|
||||
#################10#####################################
|
||||
|
||||
- platform: rest
|
||||
name: bustime_10_sereb_sbb
|
||||
resource: "https://ru.busti.me/api/notify_stop/?stop_id=9395&bus_id=647"
|
||||
method: GET
|
||||
scan_interval: 15
|
||||
value_template: "{{ value_json.time }}"
|
||||
json_attributes:
|
||||
- name
|
||||
- time
|
||||
- x
|
||||
- y
|
||||
- updated
|
||||
|
||||
- platform: rest
|
||||
name: bustime_10_sereb_sb
|
||||
resource: "https://ru.busti.me/api/notify_stop/?stop_id=9397&bus_id=647"
|
||||
method: GET
|
||||
scan_interval: 15
|
||||
value_template: "{{ value_json.time }}"
|
||||
json_attributes:
|
||||
- name
|
||||
- time
|
||||
- x
|
||||
- y
|
||||
- updated
|
||||
|
||||
- platform: rest
|
||||
name: bustime_10_sereb_a
|
||||
resource: "https://ru.busti.me/api/notify_stop/?stop_id=9407&bus_id=647"
|
||||
method: GET
|
||||
scan_interval: 15
|
||||
value_template: "{{ value_json.time }}"
|
||||
json_attributes:
|
||||
- name
|
||||
- time
|
||||
- x
|
||||
- y
|
||||
- updated
|
||||
|
||||
|
||||
# Остановка: Кузбассэнерго (трамвай)- Радуга
|
||||
#################10#####################################
|
||||
|
||||
- platform: rest
|
||||
name: bustime_10_kemdor
|
||||
resource: "https://ru.busti.me/api/notify_stop/?stop_id=8956&bus_id=647"
|
||||
method: GET
|
||||
scan_interval: 30
|
||||
value_template: "{{ value_json.time }}"
|
||||
json_attributes:
|
||||
- name
|
||||
- time
|
||||
- x
|
||||
- y
|
||||
- updated
|
||||
|
||||
- platform: rest
|
||||
name: bustime_10_kuzbass
|
||||
resource: "https://ru.busti.me/api/notify_stop/?stop_id=125776&bus_id=647"
|
||||
method: GET
|
||||
scan_interval: 30
|
||||
value_template: "{{ value_json.time }}"
|
||||
json_attributes:
|
||||
- name
|
||||
- time
|
||||
- x
|
||||
- y
|
||||
- updated
|
||||
|
||||
################шаблоны########################################
|
||||
|
||||
################10########################################
|
||||
|
||||
#сенсор показывющий время до остановки сельская б и до серебряный бор в сторону города 🚌 10 | Сельская Б: 12:49 (8 мин) | Ближ: 12:46
|
||||
template:
|
||||
- sensor:
|
||||
- name: "tram10.raduga-gorod"
|
||||
state: >
|
||||
{% set s = 'sensor.bustime_10_sereb_a' %}
|
||||
{% set e = 'sensor.bustime_10_sereb_sb' %}
|
||||
|
||||
{% set sereb_time = states(s) %}
|
||||
{% set end_time = states(e) %}
|
||||
|
||||
{% set has_end = end_time not in ['unknown','unavailable',''] %}
|
||||
{% set has_sereb = sereb_time not in ['unknown','unavailable',''] %}
|
||||
|
||||
{% if has_end %}
|
||||
{% set now_ts = now() %}
|
||||
{% set end_ts = today_at(end_time) %}
|
||||
{% set delta = (end_ts - now_ts).total_seconds() / 60 %}
|
||||
{% if delta < -720 %}
|
||||
{% set end_ts = end_ts + timedelta(days=1) %}
|
||||
{% endif %}
|
||||
{% set diff = ((end_ts - now_ts).total_seconds() / 60) | round(0) %}
|
||||
{% endif %}
|
||||
|
||||
🚌 10 | Сельская Б: {{ end_time if has_end else 'нет данных' }}{% if has_end %} ({{ diff }} мин){% endif %} | Ближ: {{ sereb_time if has_sereb else 'нет данных' }}
|
||||
|
||||
#сенсор показывющий время до остановки кузбассэнерго в сторону радуги 🚌 10 | нет данных
|
||||
- sensor:
|
||||
- name: "tram10.gorod-raduga"
|
||||
state: >
|
||||
{% set s = 'sensor.bustime_10_kuzbass' %}
|
||||
|
||||
{% set route = state_attr(s,'name') or '10' %}
|
||||
{% set stop_time = states(s) %}
|
||||
{% set has_time = stop_time not in ['unknown','unavailable',''] %}
|
||||
|
||||
{% if has_time %}
|
||||
{% set now_ts = now() %}
|
||||
{% set stop_ts = today_at(stop_time) %}
|
||||
{% set delta = (stop_ts - now_ts).total_seconds() / 60 %}
|
||||
|
||||
{# если ушло сильно в минус — значит это уже завтра #}
|
||||
{% if delta < -720 %}
|
||||
{% set stop_ts = stop_ts + timedelta(days=1) %}
|
||||
{% endif %}
|
||||
|
||||
{% set diff = ((stop_ts - now_ts).total_seconds() / 60) | round(0) %}
|
||||
{% endif %}
|
||||
|
||||
🚌 {{ route }} | {{ stop_time if has_time else 'нет данных' }}{% if has_time %} ({{ diff }} мин){% endif %}
|
||||
|
||||
#сенсор проверки, что осталось от 3 до 1 минуты до остановки сельская больница трамвая 10, используется в tg|ntf|tram10_rad-gor_<20m
|
||||
|
||||
- sensor:
|
||||
- name: "tram10.raduga<3m"
|
||||
state: >
|
||||
{% set t = states('sensor.bustime_10_sereb_sb') %}
|
||||
{% if t in ['unknown','unavailable',''] %}
|
||||
false
|
||||
{% else %}
|
||||
{% set now_ts = now() %}
|
||||
{% set arr = today_at(t) %}
|
||||
{% if arr < now_ts %}
|
||||
{% set arr = arr + timedelta(days=1) %}
|
||||
{% endif %}
|
||||
{% set diff = ((arr - now_ts).total_seconds() / 60) %}
|
||||
{{ 1 <= diff <= 4 }}
|
||||
{% endif %}
|
||||
|
||||
#сенсоры сравнения координат автобуса и остановки sensor.bus34_stop_ub, используется в tg|ntf|bus34_ub_check
|
||||
#34
|
||||
- sensor:
|
||||
- name: "bus34_stop_ub_gps_true"
|
||||
state: >
|
||||
{% set lat1 = state_attr('sensor.bus34_stop_univ','latitude') %}
|
||||
{% set lon1 = state_attr('sensor.bus34_stop_univ','longitude') %}
|
||||
|
||||
{% set lat2 = state_attr('sensor.bustime_34_univ','y') %}
|
||||
{% set lon2 = state_attr('sensor.bustime_34_univ','x') %}
|
||||
|
||||
{% if lat2 and lon2 %}
|
||||
{{ distance(lat1, lon1, lat2, lon2) <= 0.02 }}
|
||||
{% else %}
|
||||
false
|
||||
{% endif %}
|
||||
|
||||
#10
|
||||
- sensor:
|
||||
- name: "tram10_stop_kemdor_gps_true"
|
||||
state: >
|
||||
{% set lat1 = state_attr('sensor.tram10_stop_kemdor','latitude') %}
|
||||
{% set lon1 = state_attr('sensor.tram10_stop_kemdor','longitude') %}
|
||||
|
||||
{% set lat2 = state_attr('sensor.bustime_10_kemdor','y') %}
|
||||
{% set lon2 = state_attr('sensor.bustime_10_kemdor','x') %}
|
||||
|
||||
{% if lat2 and lon2 %}
|
||||
{{ distance(lat1, lon1, lat2, lon2) <= 0.2 }}
|
||||
{% else %}
|
||||
false
|
||||
{% endif %}
|
||||
|
||||
|
||||
#Сенсор с координатами
|
||||
#34
|
||||
- sensor:
|
||||
- name: "bus34_stop_univ"
|
||||
state: "ok"
|
||||
attributes:
|
||||
latitude: 55.344968
|
||||
longitude: 86.127703
|
||||
|
||||
|
||||
#10
|
||||
#34
|
||||
- sensor:
|
||||
- name: "tram10_stop_kemdor"
|
||||
state: "ok"
|
||||
attributes:
|
||||
latitude: 55.348193
|
||||
longitude: 86.061649
|
||||
|
||||
|
||||
|
||||
automation:
|
||||
#####################################10#########################################
|
||||
##############################10Радуга-Город####################################
|
||||
|
||||
###########################запуск автоматизации#################################
|
||||
|
||||
- alias: tg|ntf|tram10_rad-gor_ask_run
|
||||
description: ""
|
||||
mode: single
|
||||
triggers:
|
||||
- trigger: time
|
||||
at: "22:00:00"
|
||||
weekday:
|
||||
- mon
|
||||
- tue
|
||||
- wed
|
||||
- thu
|
||||
- sun
|
||||
action:
|
||||
- action: input_datetime.set_datetime
|
||||
metadata: {}
|
||||
target:
|
||||
entity_id: input_datetime.tram10_r_g_enable_time
|
||||
data:
|
||||
time: "07:15:00"
|
||||
- action: automation.turn_on
|
||||
metadata: {}
|
||||
target:
|
||||
entity_id: automation.tg_ntf_tram10_rad_gor_20m
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id:
|
||||
- "-1002006010424"
|
||||
message: "🚌 Запустить автоматизацию уведомления трамвая 10?"
|
||||
inline_keyboard:
|
||||
- "▶ Запустить:/tram10_r_g_run, ❌ Не запускать:/tram10_r_g_skip"
|
||||
- '{{''\U0001F552''}}Время:/toggle_bs_r_g_time, {{''\U0001F553''}}Сброс:/toggle_bs_r_g_cancel'
|
||||
|
||||
|
||||
## Управление временем запуска уведомления прихода трамвая 10 радуга-город
|
||||
- id: tg|mn|tram10_start_time_raduga_gorod
|
||||
alias: tg|mn|tram10_start_time_raduga_gorod
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: telegram_callback
|
||||
event_data: {}
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ trigger.event.data.command == '/toggle_bs_r_g_time' }}"
|
||||
sequence:
|
||||
- service: telegram_bot.delete_message
|
||||
data_template:
|
||||
message_id: "{{ trigger.event.data.message.message_id }}"
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
message: &msg_bs_t10_r_g |
|
||||
{{'\U0001F30A'}}Выбор времени начала уведомлений: {{ states('input_datetime.tram10_r_g_enable_time') }}
|
||||
|
||||
inline_keyboard: &keyb_bs_t10_r_g
|
||||
- '{{''\U0001F556''}}7:00:/toggle_bs_r_g_time7, {{''\U0001F557''}}8:00:/toggle_bs_r_g_time8'
|
||||
- "▶ Запустить:/tram10_r_g_run, ❌ Не запускать:/tram10_r_g_skip"
|
||||
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ trigger.event.data.command == '/toggle_bs_r_g_time7' }}"
|
||||
sequence:
|
||||
- service: input_datetime.set_datetime
|
||||
data:
|
||||
time: "07:00:00"
|
||||
target:
|
||||
entity_id: input_datetime.tram10_r_g_enable_time
|
||||
- delay:
|
||||
milliseconds: 500
|
||||
- service: telegram_bot.answer_callback_query
|
||||
data:
|
||||
callback_query_id: "{{ trigger.event.data.id }}"
|
||||
message: |
|
||||
{{"\U0001F4AC"}} Время установлено на 7:00
|
||||
- service: telegram_bot.delete_message
|
||||
data_template:
|
||||
message_id: "{{ trigger.event.data.message.message_id }}"
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
message: *msg_bs_t10_r_g
|
||||
inline_keyboard: *keyb_bs_t10_r_g
|
||||
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ trigger.event.data.command == '/toggle_bs_r_g_time8' }}"
|
||||
sequence:
|
||||
- service: input_datetime.set_datetime
|
||||
data:
|
||||
time: "08:00:00"
|
||||
target:
|
||||
entity_id: input_datetime.tram10_r_g_enable_time
|
||||
- delay:
|
||||
milliseconds: 500
|
||||
- service: telegram_bot.answer_callback_query
|
||||
data:
|
||||
callback_query_id: "{{ trigger.event.data.id }}"
|
||||
message: |
|
||||
{{"\U0001F4AC"}} Время установлено на 8:00
|
||||
- service: telegram_bot.delete_message
|
||||
data_template:
|
||||
message_id: "{{ trigger.event.data.message.message_id }}"
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
message: *msg_bs_t10_r_g
|
||||
inline_keyboard: *keyb_bs_t10_r_g
|
||||
|
||||
|
||||
- alias: tg|tram10_rad_gor_run
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: telegram_callback
|
||||
event_data:
|
||||
data: "/tram10_r_g_run"
|
||||
|
||||
action:
|
||||
- service: automation.turn_on
|
||||
target:
|
||||
entity_id: automation.tg_ntf_tram10_rad_gor_20m
|
||||
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id:
|
||||
- "-1002006010424"
|
||||
message: "✅ Автоматизация трамвая 10 включена"
|
||||
|
||||
|
||||
- alias: tg|tram10_rad_gor_skip
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: telegram_callback
|
||||
event_data:
|
||||
command: "/tram10_r_g_skip"
|
||||
action:
|
||||
- action: automation.turn_off
|
||||
metadata: {}
|
||||
target:
|
||||
entity_id: automation.tg_ntf_tram10_rad_gor_20m
|
||||
data:
|
||||
stop_actions: true
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id:
|
||||
- "-1002006010424"
|
||||
message: "❌Оповещения трамвая 10 Радуга-Город отключены"
|
||||
inline_keyboard:
|
||||
- "▶ Запустить:/tram10_r_g_run"
|
||||
|
||||
|
||||
|
||||
- alias: tg|ntf|tram10_rad-gor_<20m
|
||||
description: ""
|
||||
mode: single
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- sensor.tram10_raduga_3m
|
||||
from:
|
||||
- "False"
|
||||
to:
|
||||
- "True"
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 0
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{{ now().strftime('%H:%M') >=
|
||||
states('input_datetime.tram10_r_g_enable_time')[0:5] }}
|
||||
actions:
|
||||
- action: telegram_bot.send_message
|
||||
metadata: {}
|
||||
data:
|
||||
chat_id:
|
||||
- "-1002006010424"
|
||||
message: >-
|
||||
🚌 10 будет ~ {{ states('sensor.bustime_10_sereb_a') }}, следующий ~ {%
|
||||
set t = states('sensor.bustime_10_sereb_sb') %}{% if t in
|
||||
['unknown','unavailable',''] %}нет данных{% else %}{% set base =
|
||||
today_at(t) %}{% set plus = base + timedelta(minutes=10) %}{{
|
||||
plus.strftime('%H:%M') }}{% endif %}
|
||||
- action: automation.turn_off
|
||||
metadata: {}
|
||||
target:
|
||||
entity_id: automation.tg_ntf_tram10_rad_gor_20m
|
||||
data:
|
||||
stop_actions: false
|
||||
- delay:
|
||||
hours: 0
|
||||
minutes: 3
|
||||
seconds: 0
|
||||
milliseconds: 0
|
||||
- action: automation.turn_on
|
||||
metadata: {}
|
||||
target:
|
||||
entity_id: automation.tg_ntf_tram10_rad_gor_20m
|
||||
data: {}
|
||||
|
||||
|
||||
- alias: tg|ntf|tram10_rad-gor_<20m_off
|
||||
description: ""
|
||||
mode: single
|
||||
triggers:
|
||||
- trigger: zone
|
||||
entity_id: device_tracker.google_maps_108918666344169166438
|
||||
zone: zone.transport_raduga
|
||||
event: leave
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: automation.tg_ntf_tram10_rad_gor_20m
|
||||
state:
|
||||
- "on"
|
||||
actions:
|
||||
- action: automation.turn_off
|
||||
metadata: {}
|
||||
target:
|
||||
entity_id: automation.tg_ntf_tram10_rad_gor_20m
|
||||
data:
|
||||
stop_actions: true
|
||||
- action: telegram_bot.send_message
|
||||
metadata: {}
|
||||
data:
|
||||
chat_id:
|
||||
- "-1002006010424"
|
||||
message: >-
|
||||
Вы покинули зону уведомлений транспорта на радуге - автоматизация
|
||||
отключена
|
||||
|
||||
##############################10Город-Радуга####################################
|
||||
|
||||
- alias: tg|ntf|tram10_kemdor_check
|
||||
description: ""
|
||||
mode: single
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- sensor.bus34_stop_ub_gps_true
|
||||
from: null
|
||||
to:
|
||||
- "True"
|
||||
conditions: []
|
||||
actions:
|
||||
- action: telegram_bot.send_message
|
||||
metadata: {}
|
||||
data:
|
||||
chat_id:
|
||||
- "-1002006010424"
|
||||
message: 🚌 34 проехал юбилейный
|
||||
|
||||
#####################################34#########################################
|
||||
#################################город-радуга###################################
|
||||
|
||||
- alias: tg|ntf|bus34_ub_check
|
||||
description: ""
|
||||
mode: single
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- sensor.tram10_stop_kemdor_gps_true
|
||||
from: null
|
||||
to:
|
||||
- "True"
|
||||
conditions: []
|
||||
actions:
|
||||
- action: telegram_bot.send_message
|
||||
metadata: {}
|
||||
data:
|
||||
chat_id:
|
||||
- "-1002006010424"
|
||||
message: 🚌 10 проехал кемдор
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,268 @@
|
||||
dishwasher:
|
||||
|
||||
# инпут для ввода времени отложенного старта
|
||||
input_datetime:
|
||||
dishwasher_startinrelative:
|
||||
name: INPT|dishwasher_startinrelative
|
||||
has_date: false
|
||||
has_time: true
|
||||
|
||||
input_boolean:
|
||||
dishwasher_needs_unloading:
|
||||
name: Нужно разобрать посуду
|
||||
icon: mdi:dishwasher
|
||||
|
||||
script:
|
||||
dw_start_select_program:
|
||||
alias: dw_start_select_program_relative
|
||||
sequence:
|
||||
- action: homeconnect_ws.start_program
|
||||
data:
|
||||
device_id: 0166c54489231f7edaf804c02ab6a652
|
||||
start_in:
|
||||
hours: "{{ state_attr('input_datetime.dishwasher_startinrelative', 'hour') }}"
|
||||
minutes: "{{ state_attr('input_datetime.dishwasher_startinrelative', 'minute') }}"
|
||||
seconds: "{{ state_attr('input_datetime.dishwasher_startinrelative', 'second') }}"
|
||||
|
||||
dw_stop_program:
|
||||
alias: dw_stop_program
|
||||
sequence:
|
||||
- action: button.press
|
||||
target:
|
||||
entity_id: button.bosch_dishwasher_abort
|
||||
- service: input_datetime.set_datetime
|
||||
data:
|
||||
time: "00:00:00"
|
||||
target:
|
||||
entity_id: input_datetime.dishwasher_startinrelative
|
||||
|
||||
dw_install_auto_45_65_extradry_extrarinse:
|
||||
alias: dw_install_auto_45_65_extradry_extrarinse
|
||||
sequence:
|
||||
- service: select.select_option
|
||||
data:
|
||||
entity_id: select.bosch_dishwasher_selected_program
|
||||
option: dishcare_dishwasher_program_auto2
|
||||
|
||||
dw_install_quick_65_extradry_extrarinse:
|
||||
alias: dw_install_quick_65_extradry_extrarinse
|
||||
sequence:
|
||||
- service: select.select_option
|
||||
data:
|
||||
entity_id: select.bosch_dishwasher_selected_program
|
||||
option: dishcare_dishwasher_program_quick65
|
||||
|
||||
dw_install_int_70_extradry_extrarinse:
|
||||
alias: dw_install_int_70_extradry_extrarinse
|
||||
sequence:
|
||||
- service: select.select_option
|
||||
data:
|
||||
entity_id: select.bosch_dishwasher_selected_program
|
||||
option: dishcare_dishwasher_program_intensiv70
|
||||
|
||||
dw_install_eco_50_extradry_extrarinse:
|
||||
alias: dw_install_eco_50_extradry_extrarinse
|
||||
sequence:
|
||||
- service: select.select_option
|
||||
data:
|
||||
entity_id: select.bosch_dishwasher_selected_program
|
||||
option: dishcare_dishwasher_program_eco50
|
||||
|
||||
dw_install_care:
|
||||
alias: dw_install_care
|
||||
sequence:
|
||||
- service: select.select_option
|
||||
data:
|
||||
entity_id: select.bosch_dishwasher_selected_program
|
||||
option: dishcare_dishwasher_program_machinecare
|
||||
|
||||
automation:
|
||||
|
||||
# ==========================================
|
||||
# --- СБРОС ТАЙМЕРА ПРИ СТАРТЕ ---
|
||||
# ==========================================
|
||||
- id: dw_refresh_inp_dttm_dw
|
||||
alias: "dw|refresh_inp_dttm_dw"
|
||||
description: "Сброс времени отложенного старта"
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.bosch_dishwasher_operation_state
|
||||
from: null
|
||||
to: "Run"
|
||||
- platform: state
|
||||
entity_id: sensor.bosch_dishwasher_operation_state
|
||||
from: null
|
||||
to: "DelayedStart"
|
||||
action:
|
||||
- service: input_datetime.set_datetime
|
||||
data:
|
||||
time: "00:00:00"
|
||||
target:
|
||||
entity_id: input_datetime.dishwasher_startinrelative
|
||||
|
||||
# ==========================================
|
||||
# --- УВЕДОМЛЕНИЕ О ЗАВЕРШЕНИИ И РАЗБОРЕ ---
|
||||
# ==========================================
|
||||
- id: ntf_tg_dw_end_wash
|
||||
alias: "ntf|tg|dw|end_wash"
|
||||
description: "Уведомление о завершении мойки с проверкой открытия дверцы"
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.bosch_dishwasher_operation_state
|
||||
from: "Run"
|
||||
to: "Finished"
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.dishwasher_needs_unloading
|
||||
|
||||
- repeat:
|
||||
sequence:
|
||||
# Отправляем уведомление в обе группы!
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id:
|
||||
- -1002006010424
|
||||
- -1003233671944
|
||||
message: "✅ <b>Мойка посуды завершена!</b> Необходимо разобрать её."
|
||||
parse_mode: html
|
||||
inline_keyboard:
|
||||
- '🌊 Посудомойка:/dw_control'
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
# Ждем открытия дверцы до 3 часов
|
||||
- wait_for_trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.bosch_dishwasher_door
|
||||
to: "on"
|
||||
timeout: "03:00:00"
|
||||
continue_on_timeout: true
|
||||
|
||||
# Если дверцу открыли
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.bosch_dishwasher_door
|
||||
state: "on"
|
||||
sequence:
|
||||
- delay: "00:01:00"
|
||||
# Проверяем, что она всё ещё открыта (посуду разбирают)
|
||||
- condition: state
|
||||
entity_id: binary_sensor.bosch_dishwasher_door
|
||||
state: "on"
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id:
|
||||
- -1002006010424
|
||||
- -1003233671944
|
||||
message: "🎉 <b>Посудомойка успешно разобрана!</b>"
|
||||
parse_mode: html
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.dishwasher_needs_unloading
|
||||
until:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.bosch_dishwasher_door
|
||||
state: "on"
|
||||
for:
|
||||
minutes: 1
|
||||
|
||||
# ==========================================
|
||||
# --- КОМАНДА: УСТАНОВКА ТАЙМЕРА (/time) ---
|
||||
# ==========================================
|
||||
- id: dw_install_time_startinrelative
|
||||
alias: "dw|install_time_startinrelative"
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: telegram_command
|
||||
event_data:
|
||||
command: "/time"
|
||||
- platform: event
|
||||
event_type: telegram_command
|
||||
event_data:
|
||||
command: "/time@ha_dddennnisss_bot"
|
||||
action:
|
||||
- choose:
|
||||
# Вариант 1: формат HH:MM (например /time 14:30)
|
||||
- conditions: >
|
||||
{{ trigger.event.data.args is defined and
|
||||
trigger.event.data.args | length > 0 and
|
||||
':' in trigger.event.data.args[0] }}
|
||||
sequence:
|
||||
- variables:
|
||||
time_parts: "{{ trigger.event.data.args[0].split(':') }}"
|
||||
- service: input_datetime.set_datetime
|
||||
data:
|
||||
time: "{{ '%02d:%02d:00' | format(time_parts[0] | int, time_parts[1] | int) }}"
|
||||
target:
|
||||
entity_id: input_datetime.dishwasher_startinrelative
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
message: "✅ Отложенный запуск через <b>{{ '%02d:%02d' | format(time_parts[0] | int, time_parts[1] | int) }}</b>"
|
||||
parse_mode: html
|
||||
inline_keyboard:
|
||||
- '▶️ Старт программы:/toggle_dw_start, ❌ Сброс пуска:/toggle_dw_delay_clear'
|
||||
- '🔙 Меню:/menu_back, 🌊 Посудомойка:/dw_control'
|
||||
|
||||
# Вариант 2: только минуты (например /time 45)
|
||||
- conditions: >
|
||||
{{ trigger.event.data.args is defined and
|
||||
trigger.event.data.args | length > 0 and
|
||||
trigger.event.data.args[0] | int(default=0) > 0 and
|
||||
':' not in trigger.event.data.args[0] }}
|
||||
sequence:
|
||||
- variables:
|
||||
minutes_only: "{{ trigger.event.data.args[0] | int }}"
|
||||
target_hour: "{{ (minutes_only // 60) % 24 }}"
|
||||
target_minute: "{{ minutes_only % 60 }}"
|
||||
- service: input_datetime.set_datetime
|
||||
data:
|
||||
time: "{{ '%02d:%02d:00' | format(target_hour, target_minute) }}"
|
||||
target:
|
||||
entity_id: input_datetime.dishwasher_startinrelative
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
message: "✅ Отложенный запуск через <b>{{ '%02d:%02d' | format(target_hour, target_minute) }}</b>"
|
||||
parse_mode: html
|
||||
inline_keyboard:
|
||||
- '▶️ Старт программы:/toggle_dw_start, ❌ Сброс пуска:/toggle_dw_delay_clear'
|
||||
- '🔙 Меню:/menu_back, 🌊 Посудомойка:/dw_control'
|
||||
|
||||
# Ошибка: неверный формат
|
||||
default:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
message: "⚠️ Укажите время в правильном формате:\n<code>/time 14:30</code> (часы:минуты)\nили\n<code>/time 45</code> (только минуты)"
|
||||
parse_mode: html
|
||||
|
||||
# ==========================================
|
||||
# --- УВЕДОМЛЕНИЕ: МАЛО СОЛИ ---
|
||||
# ==========================================
|
||||
- id: ntf_tg_dw_salt_off
|
||||
alias: "ntf|tg|dw_salt_off"
|
||||
description: "Каждые 6 часов уведомлять, если соль закончилась"
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
hours: "/6"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.bosch_dishwasher_salt
|
||||
state: "nearly_empty"
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id:
|
||||
- -1002006010424
|
||||
- -1003233671944
|
||||
parse_mode: html
|
||||
message: |
|
||||
🧂❌ <b>Внимание!</b> Соль в посудомоечной машине почти закончилась.
|
||||
Пожалуйста, пополните резервуар как можно скорее.
|
||||
inline_keyboard:
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
@@ -0,0 +1,202 @@
|
||||
fun:
|
||||
|
||||
####################Таймеры###############################
|
||||
timer:
|
||||
vent_work:
|
||||
name: Вытяжка в ванной – время работы
|
||||
duration: "00:20:00"
|
||||
|
||||
vent_cooldown:
|
||||
name: Вытяжка в ванной – время отдыха
|
||||
duration: "01:00:00"
|
||||
|
||||
####################Автоматизации###############################
|
||||
|
||||
automation:
|
||||
|
||||
- alias: Вытяжка в ванной – умное включение
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.datchik_temperatury_i_vlazhnosti_vanna_humidity
|
||||
above: 50
|
||||
|
||||
- platform: state
|
||||
entity_id: binary_sensor.datchik_prisutstviia_vannaia_presence
|
||||
to: "on"
|
||||
for: "00:10:00"
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: timer.vent_cooldown
|
||||
state: "idle"
|
||||
|
||||
- condition: or
|
||||
conditions:
|
||||
# Лето и влажность > 50
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ now().month in [6,7,8] }}"
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.datchik_temperatury_i_vlazhnosti_vanna_humidity
|
||||
above: 50
|
||||
|
||||
# Не лето и влажность > 60
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ now().month not in [6,7,8] }}"
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.datchik_temperatury_i_vlazhnosti_vanna_humidity
|
||||
above: 60
|
||||
|
||||
# Или присутствие
|
||||
- condition: state
|
||||
entity_id: binary_sensor.datchik_prisutstviia_vannaia_presence
|
||||
state: "on"
|
||||
|
||||
action:
|
||||
- service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.rele_zerkalo_i_ventiliatsiia_l2
|
||||
|
||||
- alias: Вытяжка в ванной – старт таймера при включении
|
||||
mode: restart
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: switch.rele_zerkalo_i_ventiliatsiia_l2
|
||||
to: "on"
|
||||
|
||||
action:
|
||||
- service: timer.start
|
||||
target:
|
||||
entity_id: timer.vent_work
|
||||
|
||||
- alias: Вытяжка в ванной – выключение и cooldown
|
||||
mode: restart
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: timer.finished
|
||||
event_data:
|
||||
entity_id: timer.vent_work
|
||||
|
||||
action:
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.rele_zerkalo_i_ventiliatsiia_l2
|
||||
|
||||
- service: timer.start
|
||||
target:
|
||||
entity_id: timer.vent_cooldown
|
||||
|
||||
|
||||
- alias: Вытяжка в ванной – периодическая проверка влажности
|
||||
mode: single
|
||||
trigger:
|
||||
# После перезапуска Home Assistant
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
# Периодическая проверка каждые 5 минут
|
||||
- platform: time_pattern
|
||||
minutes: "/5"
|
||||
|
||||
condition:
|
||||
# Вентиляция сейчас выключена
|
||||
- condition: state
|
||||
entity_id: switch.rele_zerkalo_i_ventiliatsiia_l2
|
||||
state: "off"
|
||||
|
||||
# Таймер отдыха закончился
|
||||
- condition: state
|
||||
entity_id: timer.vent_cooldown
|
||||
state: "idle"
|
||||
|
||||
# Влажность выше порога по сезонам
|
||||
- condition: or
|
||||
conditions:
|
||||
|
||||
# Лето → >50%
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ now().month in [6,7,8] }}"
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.datchik_temperatury_i_vlazhnosti_vanna_humidity
|
||||
above: 50
|
||||
|
||||
# Не лето → >60%
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ now().month not in [6,7,8] }}"
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.datchik_temperatury_i_vlazhnosti_vanna_humidity
|
||||
above: 60
|
||||
|
||||
action:
|
||||
- service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.rele_zerkalo_i_ventiliatsiia_l2
|
||||
|
||||
|
||||
- alias: Вытяжка в ванной – резкий рост влажности
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.datchik_temperatury_i_vlazhnosti_vanna_humidity
|
||||
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{% if trigger.from_state is none or trigger.to_state is none %}
|
||||
false
|
||||
{% else %}
|
||||
{% set from_s = trigger.from_state.state %}
|
||||
{% set to_s = trigger.to_state.state %}
|
||||
{% if from_s in ['unknown','unavailable','none','']
|
||||
or to_s in ['unknown','unavailable','none',''] %}
|
||||
false
|
||||
{% else %}
|
||||
{{ (to_s | float - from_s | float) >= 15 }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
action:
|
||||
- choose:
|
||||
|
||||
# Вытяжка уже работает → +10 минут
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: switch.rele_zerkalo_i_ventiliatsiia_l2
|
||||
state: "on"
|
||||
sequence:
|
||||
- variables:
|
||||
remaining: "{{ state_attr('timer.vent_work','remaining') }}"
|
||||
|
||||
- service: timer.start
|
||||
target:
|
||||
entity_id: timer.vent_work
|
||||
data:
|
||||
duration: >
|
||||
{% if remaining is none %}
|
||||
00:10:00
|
||||
{% else %}
|
||||
{{ (as_timedelta(remaining) + timedelta(minutes=10)) }}
|
||||
{% endif %}
|
||||
|
||||
# Вытяжка выключена → включить на 20 минут (игнор cooldown)
|
||||
default:
|
||||
- service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.rele_zerkalo_i_ventiliatsiia_l2
|
||||
|
||||
- service: timer.start
|
||||
target:
|
||||
entity_id: timer.vent_work
|
||||
data:
|
||||
duration: "00:20:00"
|
||||
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
intercom:
|
||||
shell_command:
|
||||
update_goodline_token: "python3 /config/scripts/update_goodline_token.py {{ code }}"
|
||||
open_goodline_door: 'curl -s -X GET "https://api-video.goodline.info/ords/mobile/onlinedozor/gates/Kemerovo_Serebryanyy_bor_4a_Podezd_1/open-door" -H "token: $(cat /config/scripts/goodline_token.txt)" -H "origin: https://video.online-dozor.ru" -H "referer: https://video.online-dozor.ru/" -H "user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" -H "accept: application/json, text/plain, */*"'
|
||||
|
||||
command_line:
|
||||
- sensor:
|
||||
name: "Goodline Camera URL"
|
||||
unique_id: goodline_cam_url
|
||||
command: "python3 /config/scripts/get_camera.py"
|
||||
scan_interval: 300
|
||||
|
||||
template:
|
||||
- sensor:
|
||||
- name: "Расстояние до подъезда"
|
||||
unique_id: distance_to_intercom
|
||||
unit_of_measurement: "м"
|
||||
state: >
|
||||
{{ distance('device_tracker.google_maps_108918666344169166438', 'zone.intercom') | multiply(1000) | round(0) }}
|
||||
icon: mdi:map-marker-distance
|
||||
|
||||
- name: "Дистанция (Телефон)"
|
||||
unique_id: distance_to_intercom_phone
|
||||
unit_of_measurement: "м"
|
||||
state: >
|
||||
{{ distance('device_tracker.cph2573_2', 'zone.intercom') | multiply(1000) | round(0) }}
|
||||
icon: mdi:cellphone-marker
|
||||
|
||||
input_boolean:
|
||||
intercom_auto_open:
|
||||
name: "Автооткрытие двери"
|
||||
icon: mdi:door-open
|
||||
|
||||
automation:
|
||||
# ==========================================
|
||||
# 1. ПЕРЕХВАТ СМС (Работает ВСЕГДА)
|
||||
# ==========================================
|
||||
- id: catch_onlinedozor_sms_webhook
|
||||
alias: "sms|catch_onlinedozor_code"
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: webhook
|
||||
webhook_id: "goodline_sms_hook"
|
||||
allowed_methods: [POST]
|
||||
local_only: true
|
||||
action:
|
||||
- variables:
|
||||
sms_code: "{{ trigger.json.text | regex_findall_index('[0-9]{4}') }}"
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: "🔑 <b>Код:</b> <code>{{ sms_code }}</code>"
|
||||
- service: shell_command.update_goodline_token
|
||||
data:
|
||||
code: "{{ sms_code }}"
|
||||
|
||||
# ==========================================
|
||||
# 2. ВКЛЮЧЕНИЕ ТОЧНОГО GPS (Только если Авто ВКЛ)
|
||||
# ==========================================
|
||||
- id: turn_on_high_accuracy_at_zone
|
||||
alias: "gps|turn_on_at_home_high_zone"
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.cph2573_2
|
||||
zone: zone.gps_home_high
|
||||
event: enter
|
||||
- platform: state
|
||||
entity_id: input_boolean.intercom_auto_open
|
||||
to: "on"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.intercom_auto_open
|
||||
state: "on"
|
||||
- condition: zone
|
||||
entity_id: device_tracker.cph2573_2
|
||||
zone: zone.gps_home_high
|
||||
- condition: template
|
||||
value_template: "{{ not is_state('binary_sensor.oneplus12_high_accuracy_mode', 'on') }}"
|
||||
action:
|
||||
- service: notify.mobile_app_oneplus12
|
||||
data:
|
||||
message: "command_high_accuracy_mode"
|
||||
data:
|
||||
command: "turn_on"
|
||||
ttl: 0
|
||||
priority: high
|
||||
|
||||
# ==========================================
|
||||
# 3. АВТООТКРЫТИЕ ДВЕРИ (Тройное с кнопками)
|
||||
# ==========================================
|
||||
- id: auto_open_at_intercom_zone
|
||||
alias: "intercom|open_at_zone"
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.cph2573_2
|
||||
zone: zone.intercom
|
||||
event: enter
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.intercom_auto_open
|
||||
state: "on"
|
||||
- condition: template
|
||||
value_template: "{{ this.attributes.last_triggered == none or (now() - this.attributes.last_triggered).total_seconds() > 300 }}"
|
||||
action:
|
||||
# Цикл открытия двери: 3 раза с интервалом 7 секунд
|
||||
- repeat:
|
||||
count: 7
|
||||
sequence:
|
||||
- service: shell_command.open_goodline_door
|
||||
# Ждем 7 секунд перед следующим открытием (кроме последнего раза)
|
||||
- condition: template
|
||||
value_template: "{{ repeat.index < 3 }}"
|
||||
- delay:
|
||||
seconds: 5
|
||||
|
||||
# Уведомление с кнопками управления
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
target: -1002006010424
|
||||
parse_mode: html
|
||||
message: "🏠 <b>Зона INTERCOM достигнута!</b>\nДверь открыта 3 раза с интервалом 7 сек."
|
||||
inline_keyboard:
|
||||
- "🔔 Домофон:/intercom_menu"
|
||||
- "🏠 Главное меню:/menu_back"
|
||||
|
||||
# Выключение точного GPS для экономии заряда
|
||||
- service: notify.mobile_app_oneplus12
|
||||
data:
|
||||
message: "command_high_accuracy_mode"
|
||||
data:
|
||||
command: "turn_off"
|
||||
ttl: 0
|
||||
priority: high
|
||||
|
||||
# ==========================================
|
||||
# 4. ВЫКЛЮЧЕНИЕ GPS ПРИ ВЫХОДЕ (Работает ВСЕГДА для экономии заряда)
|
||||
# ==========================================
|
||||
- id: turn_off_high_accuracy_on_leave
|
||||
alias: "gps|turn_off_on_leave"
|
||||
trigger:
|
||||
- platform: zone
|
||||
entity_id: device_tracker.cph2573_2
|
||||
zone: zone.gps_home_high
|
||||
event: leave
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.oneplus12_high_accuracy_mode
|
||||
state: "on"
|
||||
action:
|
||||
- service: notify.mobile_app_oneplus12
|
||||
data:
|
||||
message: "command_high_accuracy_mode"
|
||||
data:
|
||||
command: "turn_off"
|
||||
ttl: 0
|
||||
priority: high
|
||||
@@ -0,0 +1,659 @@
|
||||
notifications_telegram:
|
||||
|
||||
#таймеры для уведомлений
|
||||
#стиралка
|
||||
timer:
|
||||
timer_cool_washer:
|
||||
name: "Таймер времени охлаждения белья в стиралке"
|
||||
duration: '04:00:00'
|
||||
|
||||
|
||||
automation:
|
||||
|
||||
#автоматизация таймеров для уведомлений
|
||||
#стиралка
|
||||
- alias: tmr|wshr|cool_duration_on
|
||||
description: Запуск таймера продолжительности охлаждения белья
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- sensor.stiralnaia_mashina_s_gorizontalnoi_zagruzkoi_run_state
|
||||
from: Завершено
|
||||
to: Охлаждение
|
||||
conditions: []
|
||||
actions:
|
||||
- action: timer.start
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: timer.timer_cool_washer
|
||||
mode: single
|
||||
|
||||
- alias: tmr|wshr|cool_duration_off
|
||||
description: Остановить таймер продолжительности охлаждения белья
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- sensor.stiralnaia_mashina_s_gorizontalnoi_zagruzkoi_run_state
|
||||
from: Охлаждение
|
||||
to: null
|
||||
conditions: []
|
||||
actions:
|
||||
- action: timer.finish
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: timer.timer_cool_washer
|
||||
mode: single
|
||||
|
||||
|
||||
################################################################################
|
||||
#home_assistant
|
||||
|
||||
- id: ntf|ha_start_message
|
||||
alias: ntf|ha_start_message
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
- delay:
|
||||
hours: 0
|
||||
minutes: 1
|
||||
seconds: 15
|
||||
milliseconds: 0
|
||||
- action: telegram_bot.send_message
|
||||
data:
|
||||
# ЗАМЕНЕНО: target -> chat_id
|
||||
chat_id: -1002006010424
|
||||
message: |
|
||||
{{"\U0001F567"}} Зафиксирован запуск HA в {{ states('sensor.time') }} {{"\U0001F567"}}
|
||||
|
||||
{{'\U0001F30D'}}Состояние proxmox:
|
||||
|
||||
{{'\U0001F321'}}CPU | {{'\U000023EB'}}CPU | {{'\U0001F4DD'}} RAM
|
||||
{{ states ('sensor.proxmox_cpu_temperature') }} {{"\U00002103"}} | {{ states ('sensor.node_pr_cpu_used') | round(2)}} % | {{ states ('sensor.node_pr_memory_used') | round(2) }} GB
|
||||
{{'\U0001F4BD'}}Disk |{{'\U000023F1'}}UpTime
|
||||
{{ states ('sensor.node_pr_disk_used_percentage') | round(2) }} % | {% set s = (as_timestamp (now()) -as_timestamp(states('sensor.node_pr_last_boot')))|int(0) %}{{ '{:d}д {:02d}:{:02d}'.format (s // 86400, s % 86400 // 3600, s % 3600 // 60, s % 60) }}
|
||||
{{"\U0001F4BF"}}Smb | {{"\U0001F4FA"}}Win | {{"\U0001F4FA"}}lmp-trcr | {{"\U0001F4FA"}}ngnix
|
||||
{{ states ('binary_sensor.lxc_docker_101_status') }}|{{ states ('binary_sensor.qemu_wni10forjob_105_status') }}|{{ states ('binary_sensor.qemu_lampa_traccar_102_status') }}|{{ states ('binary_sensor.lxc_nginxproxymanager_108_status') }}
|
||||
inline_keyboard:
|
||||
- '{{''\U000021A9''}} Главное меню:/menu_back , {{''\U000021AA''}} Proxmox:/prxmx_control'
|
||||
- '{{''\U0001F5D1''}} Прочитано:/menu_hide'
|
||||
|
||||
|
||||
- id: ntf|send_auto_weather
|
||||
alias: ntf|send_auto_weather
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: "07:20:00"
|
||||
- platform: time
|
||||
at: "17:15:00"
|
||||
enabled: true
|
||||
condition:
|
||||
- condition: time
|
||||
weekday:
|
||||
- mon
|
||||
- tue
|
||||
- wed
|
||||
- thu
|
||||
- fri
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
target: [6265196444, 102879274]
|
||||
message: |
|
||||
{{"\U0001F308"}} Погода:
|
||||
|
||||
{{"\U0001FA9F"}}За окном: {%- set current = states('sensor.openweathermap_weather_code')|int %} {%- set conditions={'Туман \U0001F32B': [701, 741], 'Гроза \U0001F329': [210, 211, 212, 221], 'Дождь/Гроза \U000026C8': [200, 201, 202, 230, 231, 232], 'Облачно \U000026C5': [801, 802, 803, 804], 'Дождь \U00002614': [504, 314, 502, 503, 522, 300, 301, 302, 310, 311, 312, 313, 500, 501, 520, 521, 906], 'Снег \U00002744': [600, 601, 602, 611, 612, 620, 621, 622], 'Снег с дождём \U00002614\U00002744': [511, 615, 616], 'Ясно \U00002600': [800], 'Ветер \U0001F4A8': [905, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961], 'Внимание \U000026A0': [711, 721, 731, 751, 761, 762, 771, 900, 901, 962, 903, 904] } %} {%- for condition, value in conditions.items() %} {%- if current in value %} {{- " "+condition}} {%- endif %} {%- endfor %}
|
||||
{{"\U0001F321"}}Температура: {{- " "+state_attr('weather.openweathermap','temperature')|string }} {{"\U00002103"}}
|
||||
{{"\U0001F4A8"}}Ветер: {{ state_attr('weather.openweathermap', 'wind_speed') | float }} км/ч {%- if state_attr('weather.openweathermap', 'wind_speed') | float < 1 %} - Штиль {%- elif state_attr('weather.openweathermap', 'wind_speed') | float < 5 %} - Тихий {%- elif state_attr('weather.openweathermap', 'wind_speed') | float < 11 %} - Легкий {%- elif state_attr('weather.openweathermap', 'wind_speed') | float< 19 %} - Слабый {%- elif state_attr('weather.openweathermap', 'wind_speed') | float < 28 %} - Умеренный {%- elif state_attr('weather.openweathermap','wind_speed') | float < 38 %} - Свежий {%- elif state_attr('weather.openweathermap', 'wind_speed') | float < 49 %} - Сильный {%- elif state_attr('weather.openweathermap', 'wind_speed') | float < 61 %} - Крепкий {%- elif state_attr('weather.openweathermap', 'wind_speed') |float < 74 %} - Очень крепкий {%- elif state_attr('weather.openweathermap', 'wind_speed') | float < 88 %} - Шторм {%- elif state_attr('weather.openweathermap', 'wind_speed') | float < 102 %} - Сильный шторм {%- elif state_attr('weather.openweathermap', 'wind_speed') |float < 117 %} - Жестокий шторм {%- elif state_attr('weather.openweathermap', 'wind_speed') | float > 117 %} - Ураган {%- endif %}
|
||||
⚠ PM10: {{states ('sensor.narodmon_particulate_matter')}} мкг/м
|
||||
|
||||
⌚ Почасовой прогноз:
|
||||
|
||||
{{state_attr('sensor.forecast_hour','datetime0')|as_timestamp()|timestamp_custom('%d.%m|%H:%M')}}
|
||||
{% set c = state_attr('sensor.forecast_hour','condition0') %}
|
||||
{%- if c == 'clear-night' %}🌟
|
||||
{%- elif c == 'cloudy' %}☁️
|
||||
{%- elif c == 'exceptional' %}⚠️
|
||||
{%- elif c == 'fog' %}🌫
|
||||
{%- elif c == 'hail' %}☄
|
||||
{%- elif c == 'lightning' %}⚡️
|
||||
{%- elif c == 'lightning-rainy' %}⛈
|
||||
{%- elif c == 'partlycloudy' %}⛅️
|
||||
{%- elif c == 'pouring' %}⛈
|
||||
{%- elif c == 'rainy' %}☔
|
||||
{%- elif c == 'snowy' %}❄️
|
||||
{%- elif c == 'snowy-rainy' %}❄️/☔ С
|
||||
{%- elif c == 'sunny' %}☀️
|
||||
{%- elif c == 'windy' %}💨
|
||||
{%- else%} Не определено {%endif%} {{state_attr('sensor.forecast_hour','temperature0')}}°C, {{state_attr('sensor.forecast_hour','wind_speed0')}} км/ч, ☔ {{state_attr('sensor.forecast_hour','precipitation_probability0')}} %
|
||||
{{state_attr('sensor.forecast_hour','datetime1')|as_timestamp()|timestamp_custom('%d.%m|%H:%M')}}
|
||||
{% set c = state_attr('sensor.forecast_hour','condition1') %}
|
||||
{%- if c == 'clear-night' %}🌟
|
||||
{%- elif c == 'cloudy' %}☁️
|
||||
{%- elif c == 'exceptional' %}⚠️
|
||||
{%- elif c == 'fog' %}🌫
|
||||
{%- elif c == 'hail' %}☄
|
||||
{%- elif c == 'lightning' %}⚡️
|
||||
{%- elif c == 'lightning-rainy' %}⛈ М
|
||||
{%- elif c == 'partlycloudy' %}⛅️
|
||||
{%- elif c == 'pouring' %}⛈
|
||||
{%- elif c == 'rainy' %}☔
|
||||
{%- elif c == 'snowy' %}❄️
|
||||
{%- elif c == 'snowy-rainy' %}❄️/☔ Сн
|
||||
{%- elif c == 'sunny' %}☀️
|
||||
{%- elif c == 'windy' %}💨
|
||||
{%- else%} Не определено {%endif%} {{state_attr('sensor.forecast_hour','temperature1')}}°C, {{state_attr('sensor.forecast_hour','wind_speed1')}} км/ч, ☔ {{state_attr('sensor.forecast_hour','precipitation_probability1')}} %
|
||||
{{state_attr('sensor.forecast_hour','datetime2')|as_timestamp()|timestamp_custom('%d.%m|%H:%M')}}
|
||||
{% set c = state_attr('sensor.forecast_hour','condition2') %}
|
||||
{%- if c == 'clear-night' %}🌟
|
||||
{%- elif c == 'cloudy' %}☁️
|
||||
{%- elif c == 'exceptional' %}⚠️
|
||||
{%- elif c == 'fog' %}🌫
|
||||
{%- elif c == 'hail' %}☄
|
||||
{%- elif c == 'lightning' %}⚡️
|
||||
{%- elif c == 'lightning-rainy' %}⛈ М
|
||||
{%- elif c == 'partlycloudy' %}⛅️
|
||||
{%- elif c == 'pouring' %}⛈
|
||||
{%- elif c == 'rainy' %}☔
|
||||
{%- elif c == 'snowy' %}❄️
|
||||
{%- elif c == 'snowy-rainy' %}❄️/☔ Сн
|
||||
{%- elif c == 'sunny' %}☀️
|
||||
{%- elif c == 'windy' %}💨
|
||||
{%- else%} Не определено {%endif%} {{state_attr('sensor.forecast_hour','temperature2')}}°C, {{state_attr('sensor.forecast_hour','wind_speed2')}} км/ч, ☔ {{state_attr('sensor.forecast_hour','precipitation_probability2')}} %
|
||||
{{state_attr('sensor.forecast_hour','datetime3')|as_timestamp()|timestamp_custom('%d.%m|%H:%M')}}
|
||||
{% set c = state_attr('sensor.forecast_hour','condition3') %}
|
||||
{%- if c == 'clear-night' %}🌟
|
||||
{%- elif c == 'cloudy' %}☁️
|
||||
{%- elif c == 'exceptional' %}⚠️
|
||||
{%- elif c == 'fog' %}🌫
|
||||
{%- elif c == 'hail' %}☄
|
||||
{%- elif c == 'lightning' %}⚡️
|
||||
{%- elif c == 'lightning-rainy' %}⛈
|
||||
{%- elif c == 'partlycloudy' %}⛅️
|
||||
{%- elif c == 'pouring' %}⛈
|
||||
{%- elif c == 'rainy' %}☔
|
||||
{%- elif c == 'snowy' %}❄️
|
||||
{%- elif c == 'snowy-rainy' %}❄️/☔
|
||||
{%- elif c == 'sunny' %}☀️
|
||||
{%- elif c == 'windy' %}💨
|
||||
{%- else%} Не определено {%endif%} {{state_attr('sensor.forecast_hour','temperature3')}}°C, {{state_attr('sensor.forecast_hour','wind_speed3')}} км/ч, ☔ {{state_attr('sensor.forecast_hour','precipitation_probability3')}} %
|
||||
{{state_attr('sensor.forecast_hour','datetime4')|as_timestamp()|timestamp_custom('%d.%m|%H:%M')}}
|
||||
{% set c = state_attr('sensor.forecast_hour','condition4') %}
|
||||
{%- if c == 'clear-night' %}🌟
|
||||
{%- elif c == 'cloudy' %}☁️
|
||||
{%- elif c == 'exceptional' %}⚠️
|
||||
{%- elif c == 'fog' %}🌫
|
||||
{%- elif c == 'hail' %}☄
|
||||
{%- elif c == 'lightning' %}⚡️
|
||||
{%- elif c == 'lightning-rainy' %}⛈ и
|
||||
{%- elif c == 'partlycloudy' %}⛅️
|
||||
{%- elif c == 'pouring' %}⛈
|
||||
{%- elif c == 'rainy' %}☔
|
||||
{%- elif c == 'snowy' %}❄️
|
||||
{%- elif c == 'snowy-rainy' %}❄️/☔
|
||||
{%- elif c == 'sunny' %}☀️
|
||||
{%- elif c == 'windy' %}💨
|
||||
{%- else%} Не определено {%endif%} {{state_attr('sensor.forecast_hour','temperature4')}}°C, {{state_attr('sensor.forecast_hour','wind_speed4')}} км/ч, ☔ {{state_attr('sensor.forecast_hour','precipitation_probability4')}} %
|
||||
{{state_attr('sensor.forecast_hour','datetime5')|as_timestamp()|timestamp_custom('%d.%m|%H:%M')}}
|
||||
{% set c = state_attr('sensor.forecast_hour','condition5') %}
|
||||
{%- if c == 'clear-night' %}🌟
|
||||
{%- elif c == 'cloudy' %}☁️
|
||||
{%- elif c == 'exceptional' %}⚠️
|
||||
{%- elif c == 'fog' %}🌫
|
||||
{%- elif c == 'hail' %}☄
|
||||
{%- elif c == 'lightning' %}⚡️
|
||||
{%- elif c == 'lightning-rainy' %}⛈
|
||||
{%- elif c == 'partlycloudy' %}⛅️
|
||||
{%- elif c == 'pouring' %}⛈
|
||||
{%- elif c == 'rainy' %}☔
|
||||
{%- elif c == 'snowy' %}❄️
|
||||
{%- elif c == 'snowy-rainy' %}❄️/☔ Сн
|
||||
{%- elif c == 'sunny' %}☀️
|
||||
{%- elif c == 'windy' %}💨
|
||||
{%- else%} Не определено {%endif%} {{state_attr('sensor.forecast_hour','temperature5')}}°C, {{state_attr('sensor.forecast_hour','wind_speed5')}} км/ч, ☔ {{state_attr('sensor.forecast_hour','precipitation_probability5')}} %
|
||||
{{state_attr('sensor.forecast_hour','datetime6')|as_timestamp()|timestamp_custom('%d.%m|%H:%M')}}
|
||||
{% set c = state_attr('sensor.forecast_hour','condition6') %}
|
||||
{%- if c == 'clear-night' %}🌟
|
||||
{%- elif c == 'cloudy' %}☁️
|
||||
{%- elif c == 'exceptional' %}⚠️
|
||||
{%- elif c == 'fog' %}🌫
|
||||
{%- elif c == 'hail' %}☄
|
||||
{%- elif c == 'lightning' %}⚡️
|
||||
{%- elif c == 'lightning-rainy' %}⛈
|
||||
{%- elif c == 'partlycloudy' %}⛅️
|
||||
{%- elif c == 'pouring' %}⛈
|
||||
{%- elif c == 'rainy' %}☔
|
||||
{%- elif c == 'snowy' %}❄️
|
||||
{%- elif c == 'snowy-rainy' %}❄️/☔
|
||||
{%- elif c == 'sunny' %}☀️
|
||||
{%- elif c == 'windy' %}💨
|
||||
{%- else%} Не определено {%endif%} {{state_attr('sensor.forecast_hour','temperature4')}}°C, {{state_attr('sensor.forecast_hour','wind_speed6')}} км/ч, ☔ {{state_attr('sensor.forecast_hour','precipitation_probability6')}} %
|
||||
{{state_attr('sensor.forecast_hour','datetime7')|as_timestamp()|timestamp_custom('%d.%m|%H:%M')}}
|
||||
{% set c = state_attr('sensor.forecast_hour','condition7') %}
|
||||
{%- if c == 'clear-night' %}🌟
|
||||
{%- elif c == 'cloudy' %}☁️
|
||||
{%- elif c == 'exceptional' %}⚠️
|
||||
{%- elif c == 'fog' %}🌫
|
||||
{%- elif c == 'hail' %}☄
|
||||
{%- elif c == 'lightning' %}⚡️
|
||||
{%- elif c == 'lightning-rainy' %}⛈
|
||||
{%- elif c == 'partlycloudy' %}⛅️
|
||||
{%- elif c == 'pouring' %}⛈
|
||||
{%- elif c == 'rainy' %}☔
|
||||
{%- elif c == 'snowy' %}❄️
|
||||
{%- elif c == 'snowy-rainy' %}❄️/☔ С
|
||||
{%- elif c == 'sunny' %}☀️
|
||||
{%- elif c == 'windy' %}💨
|
||||
{%- else%} Не определено {%endif%} {{state_attr('sensor.forecast_hour','temperature7')}}°C, {{state_attr('sensor.forecast_hour','wind_speed7')}} км/ч, ☔ {{state_attr('sensor.forecast_hour','precipitation_probability7')}} %
|
||||
{{state_attr('sensor.forecast_hour','datetime8')|as_timestamp()|timestamp_custom('%d.%m|%H:%M')}}
|
||||
{% set c = state_attr('sensor.forecast_hour','condition8') %}
|
||||
{%- if c == 'clear-night' %}🌟
|
||||
{%- elif c == 'cloudy' %}☁️
|
||||
{%- elif c == 'exceptional' %}⚠️
|
||||
{%- elif c == 'fog' %}🌫
|
||||
{%- elif c == 'hail' %}☄
|
||||
{%- elif c == 'lightning' %}⚡️
|
||||
{%- elif c == 'lightning-rainy' %}⛈
|
||||
{%- elif c == 'partlycloudy' %}⛅️
|
||||
{%- elif c == 'pouring' %}⛈
|
||||
{%- elif c == 'rainy' %}☔
|
||||
{%- elif c == 'snowy' %}❄️
|
||||
{%- elif c == 'snowy-rainy' %}❄️/☔
|
||||
{%- elif c == 'sunny' %}☀️
|
||||
{%- elif c == 'windy' %}💨
|
||||
{%- else%} Не определено {%endif%} {{state_attr('sensor.forecast_hour','temperature8')}}°C, {{state_attr('sensor.forecast_hour','wind_speed8')}} км/ч, ☔ {{state_attr('sensor.forecast_hour','precipitation_probability8')}} %
|
||||
{{state_attr('sensor.forecast_hour','datetime9')|as_timestamp()|timestamp_custom('%d.%m|%H:%M')}}
|
||||
{% set c = state_attr('sensor.forecast_hour','condition9') %}
|
||||
{%- if c == 'clear-night' %}🌟
|
||||
{%- elif c == 'cloudy' %}☁️
|
||||
{%- elif c == 'exceptional' %}⚠️
|
||||
{%- elif c == 'fog' %}🌫
|
||||
{%- elif c == 'hail' %}☄
|
||||
{%- elif c == 'lightning' %}⚡️
|
||||
{%- elif c == 'lightning-rainy' %}⛈
|
||||
{%- elif c == 'partlycloudy' %}⛅️
|
||||
{%- elif c == 'pouring' %}⛈
|
||||
{%- elif c == 'rainy' %}☔
|
||||
{%- elif c == 'snowy' %}❄️
|
||||
{%- elif c == 'snowy-rainy' %}❄️/☔
|
||||
{%- elif c == 'sunny' %}☀️
|
||||
{%- elif c == 'windy' %}💨
|
||||
{%- else%} Не определено {%endif%} {{state_attr('sensor.forecast_hour','temperature9')}}°C, {{state_attr('sensor.forecast_hour','wind_speed9')}} км/ч, ☔ {{state_attr('sensor.forecast_hour','precipitation_probability9')}} %
|
||||
{{state_attr('sensor.forecast_hour','datetime10')|as_timestamp()|timestamp_custom('%d.%m|%H:%M')}}
|
||||
{% set c = state_attr('sensor.forecast_hour','condition10') %}
|
||||
{%- if c == 'clear-night' %}🌟
|
||||
{%- elif c == 'cloudy' %}☁️
|
||||
{%- elif c == 'exceptional' %}⚠️
|
||||
{%- elif c == 'fog' %}🌫
|
||||
{%- elif c == 'hail' %}☄
|
||||
{%- elif c == 'lightning' %}⚡️
|
||||
{%- elif c == 'lightning-rainy' %}⛈
|
||||
{%- elif c == 'partlycloudy' %}⛅️
|
||||
{%- elif c == 'pouring' %}⛈
|
||||
{%- elif c == 'rainy' %}☔
|
||||
{%- elif c == 'snowy' %}❄️
|
||||
{%- elif c == 'snowy-rainy' %}❄️/☔
|
||||
{%- elif c == 'sunny' %}☀️
|
||||
{%- elif c == 'windy' %}💨
|
||||
{%- else%} Не определено {%endif%} {{state_attr('sensor.forecast_hour','temperature10')}}°C, {{state_attr('sensor.forecast_hour','wind_speed10')}} км/ч, ☔ {{state_attr('sensor.forecast_hour','precipitation_probability10')}} %
|
||||
{{state_attr('sensor.forecast_hour','datetime11')|as_timestamp()|timestamp_custom('%d.%m|%H:%M')}}
|
||||
{% set c = state_attr('sensor.forecast_hour','condition11') %}
|
||||
{%- if c == 'clear-night' %}🌟
|
||||
{%- elif c == 'cloudy' %}☁️
|
||||
{%- elif c == 'exceptional' %}⚠️
|
||||
{%- elif c == 'fog' %}🌫
|
||||
{%- elif c == 'hail' %}☄
|
||||
{%- elif c == 'lightning' %}⚡️
|
||||
{%- elif c == 'lightning-rainy' %}⛈
|
||||
{%- elif c == 'partlycloudy' %}⛅️
|
||||
{%- elif c == 'pouring' %}⛈
|
||||
{%- elif c == 'rainy' %}☔
|
||||
{%- elif c == 'snowy' %}❄️
|
||||
{%- elif c == 'snowy-rainy' %}❄️/☔
|
||||
{%- elif c == 'sunny' %}☀️
|
||||
{%- elif c == 'windy' %}💨
|
||||
{%- else%} Не определено {%endif%} {{state_attr('sensor.forecast_hour','temperature11')}}°C, {{state_attr('sensor.forecast_hour','wind_speed11')}} км/ч, ☔ {{state_attr('sensor.forecast_hour','precipitation_probability11')}} %
|
||||
inline_keyboard:
|
||||
- '{{"\U0001F553"}} Почасовой прогноз:/wthr_h_control, {{''\U0001F5D3''}} Ежедневный прогноз:/wthr_d_control'
|
||||
- '{{''\U000021A9''}} Главное меню:/menu_back , {{''\U000021AA''}} Обновить:/wthr_control'
|
||||
- '{{''\U0001F5D1''}} Прочитано:/menu_hide'
|
||||
|
||||
################################################################################
|
||||
#торренты
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
#стиральная машина
|
||||
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
#Термопот
|
||||
|
||||
################################################################################
|
||||
#Прихожая
|
||||
- alias: ntf|door_open
|
||||
description: ""
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.e4aaec3747b2_contact
|
||||
from: "off"
|
||||
to: "on"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.0x00158d000707efdf_motion
|
||||
state: "off"
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
metadata: {}
|
||||
data:
|
||||
message: "{{\"\\U0001F567\"}} Входная дверь открыта {{ states('sensor.time') }} "
|
||||
inline_keyboard:
|
||||
- '{{''\U000021A9''}} Главное меню:/menu_back , {{''\U0001F5D1''}} Прочитано:/menu_hide'
|
||||
|
||||
- alias: ntf|door_lock
|
||||
description: ""
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.e4aaec3747b2_contact
|
||||
from: "on"
|
||||
to: "off"
|
||||
condition: []
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
metadata: {}
|
||||
data:
|
||||
message: "{{\"\\U0001F567\"}} Входная дверь закрыта {{ states('sensor.time') }} "
|
||||
|
||||
inline_keyboard:
|
||||
- '{{''\U000021A9''}} Главное меню:/menu_back , {{''\U0001F5D1''}} Прочитано:/menu_hide'
|
||||
|
||||
|
||||
- alias: ntf|door_open_5min
|
||||
description: ""
|
||||
mode: single
|
||||
triggers:
|
||||
- entity_id:
|
||||
- binary_sensor.e4aaec3747b2_contact
|
||||
from: null
|
||||
to: "on"
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 3
|
||||
seconds: 0
|
||||
trigger: state
|
||||
conditions: []
|
||||
actions:
|
||||
- repeat:
|
||||
sequence:
|
||||
- metadata: {}
|
||||
data:
|
||||
message: >-
|
||||
{{"\U00002757"}} Входная дверь открыта больше 5
|
||||
минут{{"\U00002757"}} {{ states('sensor.time') }}
|
||||
inline_keyboard:
|
||||
- '{{''\U000021A9''}} Отмена уведомления:/toggle_lb_off_door'
|
||||
- '{{''\U000021A9''}} Главное меню:/menu_back , {{''\U0001F5D1''}} Прочитано:/menu_hide'
|
||||
action: telegram_bot.send_message
|
||||
- delay:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 30
|
||||
milliseconds: 0
|
||||
while:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.e4aaec3747b2_contact
|
||||
state: "on"
|
||||
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
#Ванная
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
#ping
|
||||
|
||||
#nem.dddennnisss.ru
|
||||
- alias: ntf|connect_down_nem.dddennnisss.ru
|
||||
description: ""
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.nem_dddennnisss_ru
|
||||
from: "on"
|
||||
to: "off"
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 3
|
||||
seconds: 0
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.day_time
|
||||
state: "on"
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
target:
|
||||
- 102879274
|
||||
inline_keyboard:
|
||||
- >-
|
||||
{{'\U000021A9'}} Главное меню:/menu_back , {{'\U0001F5D1'}}
|
||||
Прочитано:/menu_hide
|
||||
message: Пропал коннект до nem.dddennnisss.ru
|
||||
|
||||
#nem.dddennnisss.ru
|
||||
- alias: ntf|connect_up_nem.dddennnisss.ru
|
||||
description: ""
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.nem_dddennnisss_ru
|
||||
from: "off"
|
||||
to: "on"
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 3
|
||||
seconds: 0
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.day_time
|
||||
state: "on"
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
target:
|
||||
- 102879274
|
||||
inline_keyboard:
|
||||
- >-
|
||||
{{'\U000021A9'}} Главное меню:/menu_back , {{'\U0001F5D1'}}
|
||||
Прочитано:/menu_hide
|
||||
message: Поднялся коннект до nem.dddennnisss.ru
|
||||
|
||||
#176.222.54.79
|
||||
- alias: ntf|connect_down_176.222.54.79
|
||||
description: ""
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.176_222_54_79
|
||||
from: "on"
|
||||
to: "off"
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 1
|
||||
seconds: 30
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.day_time
|
||||
state: "on"
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
target:
|
||||
- 102879274
|
||||
inline_keyboard:
|
||||
- >-
|
||||
{{'\U000021A9'}} Главное меню:/menu_back , {{'\U0001F5D1'}}
|
||||
Прочитано:/menu_hide
|
||||
message: Пропал коннект до 176.222.54.79
|
||||
|
||||
- alias: ntf|connect_up_176.222.54.79
|
||||
description: ""
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.176_222_54_79
|
||||
from: "off"
|
||||
to: "on"
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 3
|
||||
seconds: 0
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.day_time
|
||||
state: "on"
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
target:
|
||||
- 102879274
|
||||
inline_keyboard:
|
||||
- >-
|
||||
{{'\U000021A9'}} Главное меню:/menu_back , {{'\U0001F5D1'}}
|
||||
Прочитано:/menu_hide
|
||||
message: Поднялся коннект до 176.222.54.79
|
||||
|
||||
################################################################################
|
||||
#Датчики протечки
|
||||
#Обнаружена протечка
|
||||
#noname датчик
|
||||
- alias: ntf|water_leak_noname_on
|
||||
description: ""
|
||||
mode: single
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- binary_sensor.0xa4c1386278c84377_water_leak
|
||||
from: "off"
|
||||
to: "on"
|
||||
conditions: []
|
||||
actions:
|
||||
- action: telegram_bot.send_message
|
||||
data:
|
||||
target:
|
||||
- 102879274
|
||||
inline_keyboard:
|
||||
- >-
|
||||
{{'\U000021A9'}} Главное меню:/menu_back , {{'\U0001F5D1'}}
|
||||
Прочитано:/menu_hide
|
||||
message: Обнаружена протечка! Датчик noname
|
||||
|
||||
- alias: ntf|water_leak_noname_off
|
||||
description: ""
|
||||
mode: single
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- binary_sensor.0xa4c1386278c84377_water_leak
|
||||
from: "on"
|
||||
to: "off"
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 1
|
||||
seconds: 0
|
||||
conditions: []
|
||||
actions:
|
||||
- action: telegram_bot.send_message
|
||||
data:
|
||||
target:
|
||||
- 102879274
|
||||
inline_keyboard:
|
||||
- >-
|
||||
{{'\U000021A9'}} Главное меню:/menu_back , {{'\U0001F5D1'}}
|
||||
Прочитано:/menu_hide
|
||||
message: Протечка устранена! Датчик noname
|
||||
- action: notify.mobile_app_m2007j3sg
|
||||
metadata: {}
|
||||
data:
|
||||
title: Датчик noname
|
||||
message: "Протечка устранена!"
|
||||
|
||||
#aqara
|
||||
- alias: ntf|water_leak_aqara_on
|
||||
description: ""
|
||||
mode: single
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- binary_sensor.0x00158d000af3c1dd_water_leak
|
||||
from: "off"
|
||||
to: "on"
|
||||
conditions: []
|
||||
actions:
|
||||
- action: telegram_bot.send_message
|
||||
data:
|
||||
target:
|
||||
- 102879274
|
||||
inline_keyboard:
|
||||
- >-
|
||||
{{'\U000021A9'}} Главное меню:/menu_back , {{'\U0001F5D1'}}
|
||||
Прочитано:/menu_hide
|
||||
message: Обнаружена протечка! Датчик aqara
|
||||
- action: notify.mobile_app_m2007j3sg
|
||||
metadata: {}
|
||||
data:
|
||||
title: Датчик aqara
|
||||
message: "Обнаружена протечка!"
|
||||
|
||||
- alias: ntf|water_leak_aqara_off
|
||||
description: ""
|
||||
mode: single
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- binary_sensor.0x00158d000af3c1dd_water_leak
|
||||
from: "on"
|
||||
to: "off"
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 1
|
||||
seconds: 0
|
||||
conditions: []
|
||||
actions:
|
||||
- action: telegram_bot.send_message
|
||||
data:
|
||||
target:
|
||||
- 102879274
|
||||
inline_keyboard:
|
||||
- >-
|
||||
{{'\U000021A9'}} Главное меню:/menu_back , {{'\U0001F5D1'}}
|
||||
Прочитано:/menu_hide
|
||||
message: Протечка устранена! Датчик aqara
|
||||
- action: notify.mobile_app_m2007j3sg
|
||||
metadata: {}
|
||||
data:
|
||||
title: Датчик aqara
|
||||
message: "Протечка устранена!"
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
router:
|
||||
|
||||
shell_command:
|
||||
get_connect_accept_ips: ssh -i /config/.ssh/id_rsa_openwrt -o UserKnownHostsFile=/config/.ssh/known_hosts root@192.168.1.1 /root/get_connect_accept_ips.sh
|
||||
add_ip_to_connect_accept: >
|
||||
ssh -i /config/.ssh/id_rsa_openwrt
|
||||
-o UserKnownHostsFile=/config/.ssh/known_hosts
|
||||
root@192.168.1.1 /root/add_ip_connect_accept.sh {{ ip }}
|
||||
wrt_ca_on: >
|
||||
ssh -i /config/.ssh/id_rsa_openwrt
|
||||
-o UserKnownHostsFile=/config/.ssh/known_hosts
|
||||
root@192.168.1.1 /root/on_off_connect_accept.sh on
|
||||
|
||||
wrt_ca_off: >
|
||||
ssh -i /config/.ssh/id_rsa_openwrt
|
||||
-o UserKnownHostsFile=/config/.ssh/known_hosts
|
||||
root@192.168.1.1 /root/on_off_connect_accept.sh off
|
||||
|
||||
wrt_wol_sd: >
|
||||
ssh -i /config/.ssh/id_rsa_openwrt
|
||||
-o UserKnownHostsFile=/config/.ssh/known_hosts
|
||||
root@192.168.1.1 '
|
||||
etherwake -i br-lan D8:D0:90:2B:29:93 ;
|
||||
etherwake -i br-lan 00:E0:4C:75:2C:C2 ;
|
||||
etherwake -i br-lan 00:E0:4C:FE:20:50
|
||||
'
|
||||
|
||||
automation:
|
||||
|
||||
- alias: ntf|tg|wrt_ip
|
||||
description: Получает IP-адреса из ipset connect_accept на OpenWRT и отправляет их в Telegram
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: telegram_command
|
||||
event_data:
|
||||
command: '/wrt_ip'
|
||||
- platform: event
|
||||
event_type: telegram_command
|
||||
event_data:
|
||||
command: '/wrt_ip@ha_dddennnisss_bot'
|
||||
action:
|
||||
- service: shell_command.get_connect_accept_ips
|
||||
response_variable: wrt_ips
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
message: >
|
||||
connect-accept:
|
||||
|
||||
{{ wrt_ips.stdout | default('Нет данных') }}
|
||||
mode: single
|
||||
|
||||
- alias: tg|wrt_ip_add
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: telegram_command
|
||||
event_data:
|
||||
command: /wrt_ip_add
|
||||
action:
|
||||
- variables:
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
ip_arg: "{{ trigger.event.data.args | join(' ') }}"
|
||||
- service: shell_command.add_ip_to_connect_accept
|
||||
data:
|
||||
ip: "{{ ip_arg }}"
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
message: "IP {{ ip_arg }} добавлен в connect-accept"
|
||||
parse_mode: none
|
||||
|
||||
- alias: tg|wrt_off_connect_accept
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: telegram_command
|
||||
event_data:
|
||||
command: /wrt_ca_off
|
||||
action:
|
||||
- variables:
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
- service: shell_command.wrt_ca_off
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
message: "connect-accept отключён"
|
||||
|
||||
- alias: tg|wrt_on_connect_accept
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: telegram_command
|
||||
event_data:
|
||||
command: /wrt_ca_on
|
||||
action:
|
||||
- variables:
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
- service: shell_command.wrt_ca_on
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
message: "connect-accept включён"
|
||||
@@ -0,0 +1,304 @@
|
||||
scooter:
|
||||
|
||||
sensor:
|
||||
- platform: rest
|
||||
name: "Traccar Daily Distance"
|
||||
resource: "https://gps.dddennnisss.ru/api/reports/summary"
|
||||
headers:
|
||||
Authorization: "Bearer RzBFAiEA7kYylJY3l1TFjpbLP9E38CbvtV5eIteHN-f2Urj96NgCIBF800289eJIbaiOgQ4C4Jhlc7yYM1sGR2SO2Kk1M-q5eyJ1IjoxLCJlIjoiMjAyOS0xMi0zMFQxNzowMDowMC4wMDArMDA6MDAifQ"
|
||||
Content-Type: "application/json"
|
||||
params:
|
||||
deviceId: 1
|
||||
type: distance
|
||||
from: "{{ now().replace(hour=0, minute=0, second=0, microsecond=0).isoformat() }}"
|
||||
to: "{{ now().isoformat() }}"
|
||||
json_attributes_path: "$[0]"
|
||||
json_attributes:
|
||||
- distance
|
||||
- averageSpeed
|
||||
- maxSpeed
|
||||
- startTime
|
||||
- endTime
|
||||
value_template: "{{ value_json[0].distance | float / 1000 | round(2) }}"
|
||||
unit_of_measurement: "км"
|
||||
scan_interval: 60
|
||||
|
||||
template:
|
||||
|
||||
- sensor:
|
||||
- name: "Самокат Пробег Сегодня"
|
||||
unique_id: "scooter_daily_distance_formatted"
|
||||
state: >
|
||||
{{ states('sensor.traccar_daily_distance') | float | round(2) }}
|
||||
unit_of_measurement: "км"
|
||||
icon: mdi:map-marker-distance
|
||||
|
||||
- name: "Самокат Максимальная Скорость"
|
||||
unique_id: "scooter_max_speed_kmh"
|
||||
state: >
|
||||
{% set max_speed_knots = state_attr('sensor.traccar_daily_distance', 'maxSpeed') | float %}
|
||||
{{ (max_speed_knots * 1.852) | round(2) }}
|
||||
unit_of_measurement: "км/ч"
|
||||
icon: mdi:speedometer
|
||||
attributes:
|
||||
speed_in_knots: "{{ state_attr('sensor.traccar_daily_distance', 'maxSpeed') | round(2) }}"
|
||||
calculation: "{{ state_attr('sensor.traccar_daily_distance', 'maxSpeed') | float }} узлов × 1.852 = {{ (state_attr('sensor.traccar_daily_distance', 'maxSpeed') | float * 1.852) | round(2) }} км/ч"
|
||||
|
||||
- name: "Самокат Начало Поездки"
|
||||
unique_id: "scooter_start_time_local"
|
||||
state: >
|
||||
{% set start_time = state_attr('sensor.traccar_daily_distance', 'startTime') %}
|
||||
{% if start_time %}
|
||||
{{ as_timestamp(start_time) | timestamp_custom('%H:%M') }}
|
||||
{% else %}
|
||||
Неизвестно
|
||||
{% endif %}
|
||||
icon: mdi:clock-start
|
||||
attributes:
|
||||
utc_time: "{{ state_attr('sensor.traccar_daily_distance', 'startTime') }}"
|
||||
local_time: >
|
||||
{% set start_time = state_attr('sensor.traccar_daily_distance', 'startTime') %}
|
||||
{% if start_time %}
|
||||
{{ as_timestamp(start_time) | timestamp_custom('%H:%M (%d.%m.%Y)') }}
|
||||
{% endif %}
|
||||
|
||||
- name: "Самокат Конец Поездки"
|
||||
unique_id: "scooter_end_time_local"
|
||||
state: >
|
||||
{% set end_time = state_attr('sensor.traccar_daily_distance', 'endTime') %}
|
||||
{% if end_time %}
|
||||
{{ as_timestamp(end_time) | timestamp_custom('%H:%M') }}
|
||||
{% else %}
|
||||
Активно
|
||||
{% endif %}
|
||||
icon: mdi:clock-end
|
||||
attributes:
|
||||
utc_time: "{{ state_attr('sensor.traccar_daily_distance', 'endTime') }}"
|
||||
local_time: >
|
||||
{% set end_time = state_attr('sensor.traccar_daily_distance', 'endTime') %}
|
||||
{% if end_time %}
|
||||
{{ as_timestamp(end_time) | timestamp_custom('%H:%M (%d.%m.%Y)') }}
|
||||
{% endif %}
|
||||
|
||||
- name: "Самокат Время в Дороге"
|
||||
unique_id: "scooter_trip_duration"
|
||||
state: >
|
||||
{% set start_time = state_attr('sensor.traccar_daily_distance', 'startTime') %}
|
||||
{% set end_time = state_attr('sensor.traccar_daily_distance', 'endTime') %}
|
||||
{% if start_time and end_time %}
|
||||
{% set duration = (as_timestamp(end_time) - as_timestamp(start_time)) / 3600 %}
|
||||
{{ duration | round(1) }}
|
||||
{% else %}
|
||||
0
|
||||
{% endif %}
|
||||
unit_of_measurement: "ч"
|
||||
icon: mdi:timer
|
||||
|
||||
- binary_sensor:
|
||||
- name: "scooter_gps_data_fresh"
|
||||
unique_id: scooter_gps_data_fresh
|
||||
state: >-
|
||||
{% set scooter_updated = now() - states.device_tracker.samokat_dddennnisss.last_updated %}
|
||||
{% set you_updated = now() - states.device_tracker.google_maps_108918666344169166438.last_updated %}
|
||||
{{ scooter_updated.total_seconds() < 180 and you_updated.total_seconds() < 180 }}
|
||||
device_class: connectivity
|
||||
attributes:
|
||||
scooter_last_updated: >-
|
||||
{{ (states.device_tracker.samokat_dddennnisss.last_updated + timedelta(hours=7)).strftime('%Y-%m-%d %H:%M:%S') }}
|
||||
dddennnisss_last_updated: >-
|
||||
{{ (states.device_tracker.google_maps_108918666344169166438.last_updated + timedelta(hours=7)).strftime('%Y-%m-%d %H:%M:%S') }}
|
||||
scooter_age_seconds: >-
|
||||
{{ (now() - states.device_tracker.samokat_dddennnisss.last_updated).total_seconds() | round(0) }}
|
||||
dddennnisss_age_seconds: >-
|
||||
{{ (now() - states.device_tracker.google_maps_108918666344169166438.last_updated).total_seconds() | round(0) }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
input_boolean:
|
||||
scooter_protection_active:
|
||||
name: scooter_protection_active
|
||||
initial: off
|
||||
|
||||
|
||||
automation:
|
||||
- alias: ntf|tg|scooter_protection_activate
|
||||
id: scooter_protection_activate
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: template
|
||||
value_template: >-
|
||||
{% set lat1 = state_attr('device_tracker.google_maps_108918666344169166438', 'latitude') %}
|
||||
{% set lon1 = state_attr('device_tracker.google_maps_108918666344169166438', 'longitude') %}
|
||||
{% set lat2 = state_attr('device_tracker.samokat_dddennnisss', 'latitude') %}
|
||||
{% set lon2 = state_attr('device_tracker.samokat_dddennnisss', 'longitude') %}
|
||||
{% if lat1 and lon1 and lat2 and lon2 %}
|
||||
{{ distance(lat1, lon1, lat2, lon2) > 0.05 }}
|
||||
{% else %}
|
||||
false
|
||||
{% endif %}
|
||||
for:
|
||||
minutes: 4
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.scooter_protection_active
|
||||
state: 'off'
|
||||
# - condition: not
|
||||
# conditions:
|
||||
# - condition: state
|
||||
# entity_id: device_tracker.samokat_dddennnisss
|
||||
# state: 'home'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.samokat_dddennnisss_motion
|
||||
state: 'off'
|
||||
for:
|
||||
minutes: 2
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{% set scooter_updated = now() - states.device_tracker.samokat_dddennnisss.last_updated %}
|
||||
{% set you_updated = now() - states.device_tracker.google_maps_108918666344169166438.last_updated %}
|
||||
{{ scooter_updated.total_seconds() < 180 and you_updated.total_seconds() < 180 }}
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.scooter_protection_active
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: >-
|
||||
⚠️ Самокат поставлен в режим защиты!
|
||||
|
||||
📈 Скорость: {{ states('sensor.samokat_dddennnisss_speed') }} км/ч
|
||||
🏃♂️ Движение: {% if is_state('binary_sensor.samokat_dddennnisss_motion', 'on') %}Да{% else %}Нет{% endif %}
|
||||
{% if is_state('input_boolean.scooter_protection_active', 'on') %}🔐 Включена блокировка{% else %}🔒 Отключена блокировка{% endif %}
|
||||
|
||||
🛰️ GPS данные свежие: {% if is_state('binary_sensor.scooter_gps_data_fresh', 'on') %}Да ✅{% else %}Нет ❌{% endif %}
|
||||
⏳ Геоданные самоката: {{ (state_attr('binary_sensor.scooter_gps_data_fresh', 'scooter_age_seconds') or 0) | int }} сек
|
||||
⏳ Геоданные ddd: {{ (state_attr('binary_sensor.scooter_gps_data_fresh', 'dddennnisss_age_seconds') or 0) | int }} сек
|
||||
📍 Расстояние до самоката: {{
|
||||
distance(
|
||||
state_attr('device_tracker.google_maps_108918666344169166438', 'latitude'),
|
||||
state_attr('device_tracker.google_maps_108918666344169166438', 'longitude'),
|
||||
state_attr('device_tracker.samokat_dddennnisss', 'latitude'),
|
||||
state_attr('device_tracker.samokat_dddennnisss', 'longitude')
|
||||
) | round(2)
|
||||
}} км.
|
||||
|
||||
|
||||
inline_keyboard:
|
||||
- '🔓 Снять защиту:/sc_r_unlocked'
|
||||
- '🛴 Самокат:/sc_control, ↩️ Меню:/menu_back'
|
||||
|
||||
|
||||
|
||||
- id: tg|mn|scooter_protection_deactivate
|
||||
alias: tg|scooter_protection_deactivate
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: telegram_callback
|
||||
event_data: {}
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: '{{ trigger.event.data.command == "/sc_r_unlocked" }}'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.scooter_protection_active
|
||||
- service: telegram_bot.answer_callback_query
|
||||
data:
|
||||
callback_query_id: "{{ trigger.event.data.id }}"
|
||||
message: "Защита самоката снята."
|
||||
show_alert: false
|
||||
- service: telegram_bot.delete_message
|
||||
data_template:
|
||||
message_id: '{{ trigger.event.data.message.message_id }}'
|
||||
chat_id: '{{ trigger.event.data.chat_id }}'
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: '{{ trigger.event.data.chat_id }}'
|
||||
message: "✅ Защита самоката успешно снята."
|
||||
inline_keyboard:
|
||||
- '🔓 Включить защиту:/sc_r_locked'
|
||||
- '{{''\U0001F6F4''}} Самокат:/sc_control, {{''\U000021A9''}} Меню:/menu_back'
|
||||
|
||||
|
||||
- id: tg|mn|scooter_protection_activate
|
||||
alias: tg|scooter_protection_activate
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: telegram_callback
|
||||
event_data: {}
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: '{{ trigger.event.data.command == "/sc_r_locked" }}'
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.scooter_protection_active
|
||||
- service: telegram_bot.answer_callback_query
|
||||
data:
|
||||
callback_query_id: "{{ trigger.event.data.id }}"
|
||||
message: "Защита самоката включена."
|
||||
show_alert: false
|
||||
- service: telegram_bot.delete_message
|
||||
data_template:
|
||||
message_id: '{{ trigger.event.data.message.message_id }}'
|
||||
chat_id: '{{ trigger.event.data.chat_id }}'
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: '{{ trigger.event.data.chat_id }}'
|
||||
message: "✅ Защита самоката успешно включена."
|
||||
inline_keyboard:
|
||||
- '🔓 Снять защиту:/sc_r_unlocked'
|
||||
- '{{''\U0001F6F4''}} Самокат:/sc_control, {{''\U000021A9''}} Меню:/menu_back'
|
||||
|
||||
- alias: ntf|tg|scooter_protection_alert
|
||||
id: ntf_tg_scooter_protection_alert
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: template
|
||||
value_template: >
|
||||
{{
|
||||
is_state('binary_sensor.samokat_dddennnisss_motion', 'on') and
|
||||
(states('sensor.samokat_dddennnisss_speed') | float > 5.0) and
|
||||
is_state('input_boolean.scooter_protection_active', 'on')
|
||||
}}
|
||||
for:
|
||||
seconds: 40
|
||||
condition:
|
||||
# - condition: template
|
||||
# value_template: >
|
||||
# {{ (as_timestamp(now()) - as_timestamp(states.binary_sensor.samokat_dddennnisss_motion.last_changed)) > 15 }}
|
||||
# - condition: template
|
||||
# value_template: >
|
||||
# {{ (as_timestamp(now()) - as_timestamp(states.sensor.samokat_dddennnisss_speed.last_changed)) > 15 }}
|
||||
action:
|
||||
- repeat:
|
||||
while:
|
||||
- condition: state
|
||||
entity_id: input_boolean.scooter_protection_active
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message: >
|
||||
🚨 Внимание! Самокат движется со скоростью {{ states('sensor.samokat_dddennnisss_speed') }} км/ч.
|
||||
Защита активна.
|
||||
inline_keyboard:
|
||||
- '🔓 Снять защиту:/sc_r_unlocked'
|
||||
- '{{''\U0001F6F4''}} Самокат:/sc_control, {{''\U000021A9''}} Меню:/menu_back'
|
||||
- delay: '00:00:30'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
add_sensors:
|
||||
|
||||
template:
|
||||
|
||||
########################
|
||||
#room
|
||||
|
||||
- sensor:
|
||||
- default_entity_id: sensor.all_motion
|
||||
name: Движение в квартире
|
||||
state: '{{ (is_state(''sensor.0xa4c13834741ffdf4_presence_state'', ''presence'')
|
||||
or is_state(''sensor.0xa4c1387cda74958b_presence_state'', ''presence'') or is_state(''binary_sensor.0x00158d000707efdf_motion'',
|
||||
''on'') or is_state(''sensor.room_motion'', ''True''))}}'
|
||||
|
||||
|
||||
- default_entity_id: sensor.room_motion
|
||||
name: Движение в комнате
|
||||
state: '{{ (is_state(''binary_sensor.54ef44e32e91_motion'', ''on'') or is_state(''binary_sensor.54ef44e327ba_motion'',
|
||||
''on'') or is_state(''binary_sensor.54ef44e45e59_motion'', ''on''))}}'
|
||||
|
||||
|
||||
- default_entity_id: sensor.where_people
|
||||
name: Пристуствие людей в квартире
|
||||
state: '{{ is_state(''device_tracker.google_maps_108918666344169166438'', ''home'')
|
||||
or is_state(''device_tracker.google_maps_118311730364158481019'', ''home'')}}'
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
steamdeck:
|
||||
shell_command:
|
||||
steamdeck_reboot: 'ssh -i /config/ssh/id_ed25519 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@192.168.1.185 "reboot"'
|
||||
steamdeck_sleep: 'ssh -i /config/ssh/id_ed25519 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@192.168.1.185 "systemctl suspend"'
|
||||
steamdeck_gamemode: 'ssh -i /config/ssh/id_ed25519 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null deck@192.168.1.185 "steamos-session-select gamescope"'
|
||||
steamdeck_desktop: 'ssh -i /config/ssh/id_ed25519 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null deck@192.168.1.185 "steamos-session-select plasma-x11-persistent"'
|
||||
steamdeck_mode: >
|
||||
ssh -o StrictHostKeyChecking=no -i /config/ssh/id_ed25519 root@192.168.1.185 '
|
||||
if pgrep -x gamescope >/dev/null; then
|
||||
echo gaming
|
||||
else
|
||||
echo desktop
|
||||
fi
|
||||
'
|
||||
|
||||
|
||||
|
||||
sensor:
|
||||
- platform: rest
|
||||
name: SteamDeck System Info
|
||||
resource: http://192.168.1.185:5050/status
|
||||
method: GET
|
||||
value_template: "{{ value_json.cpu.usage_percent }}"
|
||||
json_attributes:
|
||||
- cpu
|
||||
- memory
|
||||
- disk
|
||||
- temperature_c
|
||||
- uptime_seconds
|
||||
- os
|
||||
- os_version
|
||||
- hostname
|
||||
scan_interval: 60
|
||||
template:
|
||||
- sensor:
|
||||
# CPU
|
||||
- default_entity_id: sensor.steamdeck_cpu_logical
|
||||
name: SteamDeck CPU Logical Cores
|
||||
state: '{{ state_attr(''sensor.steamdeck_system_info'', ''cpu'')[''cores_logical'']}}'
|
||||
- default_entity_id: sensor.steamdeck_cpu_physical
|
||||
name: SteamDeck CPU Physical Cores
|
||||
state: '{{ state_attr(''sensor.steamdeck_system_info'', ''cpu'')[''cores_physical'']}}'
|
||||
- unit_of_measurement: '%'
|
||||
default_entity_id: sensor.steamdeck_cpu_usage
|
||||
name: SteamDeck CPU Usage
|
||||
state: '{{ state_attr(''sensor.steamdeck_system_info'', ''cpu'')[''usage_percent'']| round(1) }}'
|
||||
|
||||
# RAM
|
||||
- unit_of_measurement: GB
|
||||
default_entity_id: sensor.steamdeck_ram_total
|
||||
name: SteamDeck RAM Total
|
||||
state: '{{ (state_attr(''sensor.steamdeck_system_info'', ''memory'')[''total'']/ 1024**3) | round(1) }}'
|
||||
- unit_of_measurement: GB
|
||||
default_entity_id: sensor.steamdeck_ram_used
|
||||
name: SteamDeck RAM Used
|
||||
state: '{{ (state_attr(''sensor.steamdeck_system_info'', ''memory'')[''used'']/ 1024**3) | round(1) }}'
|
||||
- unit_of_measurement: GB
|
||||
default_entity_id: sensor.steamdeck_ram_free
|
||||
name: SteamDeck RAM Free
|
||||
state: '{{ (state_attr(''sensor.steamdeck_system_info'', ''memory'')[''free'']/ 1024**3) | round(1) }}'
|
||||
- unit_of_measurement: '%'
|
||||
default_entity_id: sensor.steamdeck_ram_usage
|
||||
name: SteamDeck RAM Usage
|
||||
state: '{{ state_attr(''sensor.steamdeck_system_info'', ''memory'')[''usage_percent'']| round(1) }}'
|
||||
|
||||
# Внутренний диск
|
||||
- unit_of_measurement: GB
|
||||
default_entity_id: sensor.steamdeck_disk_internal_total
|
||||
name: SteamDeck Disk Internal Total
|
||||
state: '{{ (state_attr(''sensor.steamdeck_system_info'', ''disk'')[''internal''][''total'']/ 1024**3) | round(1) }}'
|
||||
- unit_of_measurement: GB
|
||||
default_entity_id: sensor.steamdeck_disk_internal_used
|
||||
name: SteamDeck Disk Internal Used
|
||||
state: '{{ (state_attr(''sensor.steamdeck_system_info'', ''disk'')[''internal''][''used'']/ 1024**3) | round(1) }}'
|
||||
- unit_of_measurement: GB
|
||||
default_entity_id: sensor.steamdeck_disk_internal_free
|
||||
name: SteamDeck Disk Internal Free
|
||||
state: '{{ (state_attr(''sensor.steamdeck_system_info'', ''disk'')[''internal''][''free'']/ 1024**3) | round(1) }}'
|
||||
- unit_of_measurement: '%'
|
||||
default_entity_id: sensor.steamdeck_disk_internal_usage
|
||||
name: SteamDeck Disk Internal Usage
|
||||
state: '{{ state_attr(''sensor.steamdeck_system_info'', ''disk'')[''internal''][''percent'']
|
||||
| round(1) }}'
|
||||
|
||||
# SD-карта
|
||||
- unit_of_measurement: GB
|
||||
default_entity_id: sensor.steamdeck_disk_sd_total
|
||||
name: SteamDeck Disk SD Total
|
||||
state: '{{ (state_attr(''sensor.steamdeck_system_info'', ''disk'')[''sdcard''][''total'']/ 1024**3) | round(1) }}'
|
||||
- unit_of_measurement: GB
|
||||
default_entity_id: sensor.steamdeck_disk_sd_used
|
||||
name: SteamDeck Disk SD Used
|
||||
state: '{{ (state_attr(''sensor.steamdeck_system_info'', ''disk'')[''sdcard''][''used'']/ 1024**3) | round(1) }}'
|
||||
- unit_of_measurement: GB
|
||||
default_entity_id: sensor.steamdeck_disk_sd_free
|
||||
name: SteamDeck Disk SD Free
|
||||
state: '{{ (state_attr(''sensor.steamdeck_system_info'', ''disk'')[''sdcard''][''free'']/ 1024**3) | round(1) }}'
|
||||
- unit_of_measurement: '%'
|
||||
default_entity_id: sensor.steamdeck_disk_sd_usage
|
||||
name: SteamDeck Disk SD Usage
|
||||
state: '{{ state_attr(''sensor.steamdeck_system_info'', ''disk'')[''sdcard''][''percent'']| round(1) }}'
|
||||
|
||||
# Температуры
|
||||
- unit_of_measurement: °C
|
||||
default_entity_id: sensor.steamdeck_temp_edge
|
||||
name: SteamDeck Temperature Edge
|
||||
state: '{{ state_attr(''sensor.steamdeck_system_info'', ''temperature_c'')[''edge'']}}'
|
||||
- unit_of_measurement: °C
|
||||
default_entity_id: sensor.steamdeck_temp_composite
|
||||
name: SteamDeck Temperature Composite
|
||||
state: '{{ state_attr(''sensor.steamdeck_system_info'', ''temperature_c'')[''Composite'']}}'
|
||||
- unit_of_measurement: °C
|
||||
default_entity_id: sensor.steamdeck_temp_battery
|
||||
name: SteamDeck Temperature Battery
|
||||
state: '{{ state_attr(''sensor.steamdeck_system_info'', ''temperature_c'')[''BatteryTemp''] }}'
|
||||
- unit_of_measurement: °C
|
||||
default_entity_id: sensor.steamdeck_temp_wifi
|
||||
name: SteamDeck Temperature WiFi
|
||||
state: '{{ state_attr(''sensor.steamdeck_system_info'', ''temperature_c'')[''ath11k_hwmon'']}}'
|
||||
|
||||
# Аптайм
|
||||
- unit_of_measurement: s
|
||||
default_entity_id: sensor.steamdeck_uptime_seconds
|
||||
name: SteamDeck Uptime Seconds
|
||||
state: '{{ state_attr(''sensor.steamdeck_system_info'', ''uptime_seconds'') |int }}'
|
||||
- default_entity_id: sensor.steamdeck_uptime_human
|
||||
name: SteamDeck Uptime
|
||||
state: "{% set s = state_attr('sensor.steamdeck_system_info', 'uptime_seconds')| int %} {% set h = s // 3600 %} {% set m = (s % 3600) // 60 %} {% set d = h// 24 %} {% if d > 0 %}\n {{ d }}д {{ h % 24 }}ч {{ m }}м\n{% else %}\n {{h }}ч {{ m }}м\n{% endif %}"
|
||||
|
||||
input_text:
|
||||
telegram_message_id:
|
||||
name: Telegram message ID
|
||||
max: 10
|
||||
|
||||
automation:
|
||||
- alias: tg|wrt_wol_steamdeck
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: telegram_command
|
||||
event_data:
|
||||
command: /wrt_wol_sd
|
||||
action:
|
||||
- variables:
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
- service: shell_command.wrt_wol_sd
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
message: "steamdeck разбужен"
|
||||
parse_mode: ""
|
||||
|
||||
- alias: tg|mn|status_sd_update
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
minutes: "/1" # запуск каждые 1 минуту
|
||||
action:
|
||||
- service: telegram_bot.edit_message
|
||||
data:
|
||||
chat_id: -1002006010424
|
||||
message_id: 5767
|
||||
message: >
|
||||
🎮: {% if is_state('binary_sensor.steamdeck', 'on') %}🟢 {% else %}🔴 {% endif %}
|
||||
🖧: {{ states('sensor.qemu_haos10_5_100_cpu_used') | round(1) }}% |🌡️ {{ states('sensor.proxmox_cpu_temperature') }}°C
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,192 @@
|
||||
sensor_chek_lighton_presencenone:
|
||||
###################################################################################
|
||||
template:
|
||||
|
||||
# Сенсоры автоотключения света
|
||||
# Сенсор автоотключения света ванна
|
||||
- binary_sensor:
|
||||
- name: "Сенсор вкл свет без движения ванная"
|
||||
unique_id: sensor_vkl_svet_bez_dvizheniia_vannaia
|
||||
icon: >-
|
||||
{% if is_state("binary_sensor.sensor_vkl_svet_bez_dvizheniia_vannaia", "on") %}
|
||||
mdi:timer
|
||||
{% else %}
|
||||
mdi:timer-off
|
||||
{% endif %}
|
||||
state: >-
|
||||
{{ (is_state('light.yeelink_ceilc_cc51_light', 'on') or
|
||||
is_state('light.yeelink_ceilc_cc51_ambient_light', 'on') or
|
||||
is_state('switch.rele_zerkalo_i_ventiliatsiia_l1', 'on')) and
|
||||
states('binary_sensor.datchik_prisutstviia_vannaia_presence') in ['off', 'unavailable', 'unknown'] }}
|
||||
|
||||
# Сенсор автоотключения света кухня
|
||||
- name: "Сенсор вкл свет без движения кухня"
|
||||
unique_id: sensor_vkl_svet_bez_dvizheniia_kukhnia
|
||||
icon: >-
|
||||
{% if is_state("binary_sensor.sensor_vkl_svet_bez_dvizheniia_kukhnia", "on") %}
|
||||
mdi:timer
|
||||
{% else %}
|
||||
mdi:timer-off
|
||||
{% endif %}
|
||||
state: >-
|
||||
{{ (is_state('light.yeelink_ceilc_ff3a_light', 'on') or
|
||||
is_state('light.yeelink_ceilc_ff3a_ambient_light', 'on')) and
|
||||
states('binary_sensor.datchik_prisutstviia_kukhnia_presence') in ['off', 'unavailable', 'unknown'] }}
|
||||
|
||||
# Сенсор автоотключения света коридор
|
||||
- name: "Сенсор вкл свет без движения коридор"
|
||||
unique_id: sensor_vkl_svet_bez_dvizheniia_koridor
|
||||
icon: "{{ 'mdi:timer' if this.state == 'on' else 'mdi:timer-off' }}"
|
||||
state: >-
|
||||
{{ (is_state('switch.glavnyi_vykliuchatel_prikhozhaia_left', 'on') or
|
||||
is_state('switch.glavnyi_vykliuchatel_prikhozhaia_right', 'on')) and
|
||||
states('binary_sensor.datchik_dvizheniia_prikhozhaia_occupancy') in ['off', 'unavailable', 'unknown'] }}
|
||||
|
||||
# Сенсор автоотключения света комната
|
||||
- name: "Сенсор вкл свет без движения комната"
|
||||
unique_id: sensor_vkl_svet_bez_dvizheniia_komnata
|
||||
icon: >-
|
||||
{% if is_state("binary_sensor.sensor_vkl_svet_bez_dvizheniia_komnata", "on") %}
|
||||
mdi:timer
|
||||
{% else %}
|
||||
mdi:timer-off
|
||||
{% endif %}
|
||||
state: >-
|
||||
{{ is_state('light.yeelink_ceiling19_d85c_light', 'on') and
|
||||
states('binary_sensor.54ef44e327ba_motion') in ['off', 'unavailable', 'unknown'] and
|
||||
states('binary_sensor.54ef44e45e59_motion') in ['off', 'unavailable', 'unknown'] and
|
||||
states('binary_sensor.54ef44e32e91_motion') in ['off', 'unavailable', 'unknown'] }}
|
||||
###################################################################################
|
||||
timer:
|
||||
timer_lighton_presencenone_bathroom:
|
||||
name: "Таймер вкл свет без движения ванная"
|
||||
duration: '00:05:00'
|
||||
timer_lighton_presencenone_kitchen:
|
||||
name: "Таймер вкл свет без движения кухня"
|
||||
duration: '00:05:00'
|
||||
timer_lighton_presencenone_lobby:
|
||||
name: "Таймер вкл свет без движения коридор"
|
||||
duration: '00:10:00'
|
||||
timer_lighton_presencenone_room:
|
||||
name: "Таймер вкл свет без движения комната"
|
||||
duration: '01:00:00'
|
||||
###################################################################################
|
||||
automation:
|
||||
|
||||
# Таймер автоотключения \ /homeassistant/includes/packages/controls_light.yaml
|
||||
|
||||
###################################################################################
|
||||
# Сброс таймера при выключении
|
||||
|
||||
# Сброс таймера при выключении ванная
|
||||
- alias: timer_lighton_presencenone_bathroom_off
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.sensor_vkl_svet_bez_dvizheniia_vannaia
|
||||
to: 'off'
|
||||
action:
|
||||
- service: timer.cancel
|
||||
target:
|
||||
entity_id: timer.timer_lighton_presencenone_bathroom
|
||||
|
||||
# Сброс таймера при выключении кухня
|
||||
- alias: timer_lighton_presencenone_kitchen_off
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.sensor_vkl_svet_bez_dvizheniia_kukhnia
|
||||
to: 'off'
|
||||
action:
|
||||
- service: timer.cancel
|
||||
target:
|
||||
entity_id: timer.timer_lighton_presencenone_kitchen
|
||||
|
||||
# Сброс таймера при выключении коридор
|
||||
- alias: timer_lighton_presencenone_lobby_off
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.sensor_vkl_svet_bez_dvizheniia_koridor
|
||||
to: 'off'
|
||||
action:
|
||||
- service: timer.cancel
|
||||
target:
|
||||
entity_id: timer.timer_lighton_presencenone_lobby
|
||||
|
||||
# Сброс таймера при выключении комната
|
||||
- alias: timer_lighton_presencenone_room_off
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.sensor_vkl_svet_bez_dvizheniia_komnata
|
||||
to: 'off'
|
||||
action:
|
||||
- service: timer.cancel
|
||||
target:
|
||||
entity_id: timer.timer_lighton_presencenone_room
|
||||
|
||||
###################################################################################
|
||||
# Старт таймеров при старте системы
|
||||
|
||||
# Старт таймеров при старте системы ванна
|
||||
- alias: Старт таймера ванная при старте системы
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.datchik_prisutstviia_vannaia_presence
|
||||
state: "off"
|
||||
action:
|
||||
- service: timer.start
|
||||
target:
|
||||
entity_id: timer.timer_lighton_presencenone_bathroom
|
||||
data: {}
|
||||
|
||||
# Старт таймеров при старте системы кухня
|
||||
- alias: Старт таймера кухня при старте системы
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.datchik_prisutstviia_kukhnia_presence
|
||||
state: "off"
|
||||
action:
|
||||
- service: timer.start
|
||||
target:
|
||||
entity_id: timer.timer_lighton_presencenone_kitchen
|
||||
data: {}
|
||||
|
||||
# Старт таймеров при старте системы коридор
|
||||
- alias: Старт таймера коридор при старте системы
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.datchik_dvizheniia_prikhozhaia_occupancy
|
||||
state: "off"
|
||||
action:
|
||||
- service: timer.start
|
||||
target:
|
||||
entity_id: timer.timer_lighton_presencenone_lobby
|
||||
|
||||
# Старт таймеров при старте системы комната
|
||||
- alias: Старт таймера комната при старте системы
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.54ef44e327ba_motion
|
||||
state: "off"
|
||||
action:
|
||||
- service: timer.start
|
||||
target:
|
||||
entity_id: timer.timer_lighton_presencenone_room
|
||||
|
||||
###################################################################################
|
||||
|
||||
# Автоматизация отключения света по таймеру \ /homeassistant/includes/packages/controls_light.yaml
|
||||
@@ -0,0 +1,160 @@
|
||||
transmission:
|
||||
|
||||
# ==========================================
|
||||
# --- СЕНСОРЫ ДЛЯ ПАРСИНГА ФАЙЛОВ ---
|
||||
# ==========================================
|
||||
command_line:
|
||||
- sensor:
|
||||
name: tr_file_list
|
||||
# Добавлена поддержка UTF-8 и правильная обработка кириллицы
|
||||
command: >-
|
||||
python3 -c 'import json, os; f="/config/tr_list_files.txt"; data={"file_list": [l.strip() for l in open(f, encoding="utf-8") if l.strip()]} if os.path.exists(f) else {"file_list": []}; print(json.dumps(data, ensure_ascii=False))'
|
||||
value_template: "{{ value_json.file_list | length if value_json is defined else 0 }}"
|
||||
json_attributes:
|
||||
- file_list
|
||||
scan_interval: 60
|
||||
|
||||
automation:
|
||||
|
||||
# Обновление списка файлов в фоне
|
||||
- id: tr_refresh_file_list
|
||||
alias: "tr|refresh_file_list"
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
minutes: "/1"
|
||||
action:
|
||||
- service: shell_command.tr_files
|
||||
data: {}
|
||||
|
||||
# ==========================================
|
||||
# --- КОМАНДА: ПОЛУЧИТЬ ФАЙЛЫ (/getfiles) ---
|
||||
# ==========================================
|
||||
- id: ntf_tg_tr_send_url_file_list
|
||||
alias: "ntf|tg|tr|send_url_file_list"
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: telegram_command
|
||||
event_data:
|
||||
command: '/getfiles'
|
||||
- platform: event
|
||||
event_type: telegram_command
|
||||
event_data:
|
||||
command: '/getfiles@ha_dddennnisss_bot'
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
# ИСПРАВЛЕНО: Для send_message нужно использовать target!
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
parse_mode: html
|
||||
disable_web_page_preview: true
|
||||
message: >
|
||||
{% set base_url = "https://smb.dddennnisss.ru/files/share/downloads/" %}
|
||||
{% set files = state_attr('sensor.tr_file_list', 'file_list') %}
|
||||
|
||||
{% if files is none or files | length == 0 %}
|
||||
😔 <b>Нет файлов для скачивания</b>
|
||||
(Проверьте наличие файлов в /config/tr_list_files.txt)
|
||||
{% else %}
|
||||
📥 <b>Ссылки для скачивания:</b>
|
||||
{% for file in files | reject('equalto', 'incomplete') | reject('equalto', 'unknown') %}
|
||||
📄 <code>{{ file }}</code>
|
||||
{{ base_url }}{{ file | urlencode }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
inline_keyboard:
|
||||
- '⬇️ Меню торрентов:/tr_control'
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
# ==========================================
|
||||
# --- УВЕДОМЛЕНИЕ: СТАРТ ЗАГРУЗКИ ---
|
||||
# ==========================================
|
||||
- id: ntf_transm_torrents_start_download
|
||||
alias: "ntf|transm_torrents_start_download"
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: transmission_started_torrent
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id:
|
||||
- -1002006010424
|
||||
- -1003233671944
|
||||
parse_mode: html
|
||||
message: |
|
||||
▶️ <b>Старт загрузки торрента!</b>
|
||||
|
||||
📄 Название: <code>{{ trigger.event.data.name }}</code>
|
||||
inline_keyboard:
|
||||
- '⬇️ Статус торрентов:/tr_control'
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
# ==========================================
|
||||
# --- УВЕДОМЛЕНИЕ: ОКОНЧАНИЕ ЗАГРУЗКИ ---
|
||||
# ==========================================
|
||||
- id: ntf_torrents_complect_download
|
||||
alias: "ntf|torrents_complect_download"
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: transmission_downloaded_torrent
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id:
|
||||
- -1002006010424
|
||||
- -1003233671944
|
||||
parse_mode: html
|
||||
message: |
|
||||
✅ <b>Загрузка завершена!</b>
|
||||
|
||||
📄 Название: <code>{{ trigger.event.data.name }}</code>
|
||||
inline_keyboard:
|
||||
- '📥 Получить ссылки:/getfiles'
|
||||
- '⬇️ Статус торрентов:/tr_control'
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
|
||||
# ==========================================
|
||||
# --- КОМАНДА: ДОБАВИТЬ ТОРРЕНТ (/add) ---
|
||||
# ==========================================
|
||||
- id: tg_add_torrents_transm_magnet
|
||||
alias: "tg|add_torrents_transm_magnet"
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: telegram_command
|
||||
event_data:
|
||||
command: '/add'
|
||||
- platform: event
|
||||
event_type: telegram_command
|
||||
event_data:
|
||||
command: '/add@ha_dddennnisss_bot'
|
||||
action:
|
||||
- variables:
|
||||
torrent_link: "{{ trigger.event.data.args | join(' ') }}"
|
||||
- choose:
|
||||
# Если ссылку не передали
|
||||
- conditions: "{{ torrent_link | length == 0 }}"
|
||||
sequence:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
parse_mode: html
|
||||
message: "⚠️ <b>Ошибка:</b> Вы не указали ссылку.\nИспользуйте формат:\n<code>/add magnet:?xt=urn:...</code>"
|
||||
|
||||
default:
|
||||
- service: transmission.add_torrent
|
||||
data:
|
||||
torrent: "{{ torrent_link }}"
|
||||
entry_id: "01JJCHRKJJ0GE2K3N9G4K20CB6"
|
||||
download_path: ""
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
parse_mode: html
|
||||
message: |
|
||||
🔄 <b>Пытаюсь добавить торрент:</b>
|
||||
|
||||
<code>{{ torrent_link | truncate(100, true, '...') }}</code>
|
||||
inline_keyboard:
|
||||
- '⬇️ Статус торрентов:/tr_control'
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
@@ -0,0 +1,437 @@
|
||||
# взято тут https://sprut.ai/article/odin-iz-variantov-upravleniya-pylesosom-1c-stytj01zhm-dreame-vacuum-mc1808-iz-home-assistant
|
||||
select_vacuum_clean_rooms:
|
||||
|
||||
xiaomi_miot:
|
||||
language: ru
|
||||
translations:
|
||||
# Global dictionary
|
||||
'强劲': 'Турбо'
|
||||
'标准': 'Стандартный'
|
||||
'节能': 'Средний'
|
||||
'关': 'Бесшумный'
|
||||
'低': 'Низкий'
|
||||
'中': 'Средний'
|
||||
'高': 'Высокий'
|
||||
'Sweep': 'Пылесос'
|
||||
'Sweep And Mop': 'Пылесос и влажная уборка'
|
||||
'Mop': 'Влажная уборка'
|
||||
'Global': 'Авто'
|
||||
'Edge': 'Очистка углов'
|
||||
'Point': 'Точечная'
|
||||
'Remote': 'Дистанционная'
|
||||
'Mi Robot Vacuum-Mop 2 Lite Robot Cleaner Режим': 'Режим уборки'
|
||||
'Mi Robot Vacuum-Mop 2 Lite Robot Cleaner Sweep Type': 'Вид уборки'
|
||||
'Mi Robot Vacuum-Mop 2 Lite sweep water_state': 'Уровень воды'
|
||||
'starting': 'Начало уборки'
|
||||
'charger disconnected': 'Зарядное устройство отключено'
|
||||
'idle': 'Ожидание'
|
||||
'remote control active': 'Включено управление через пульт'
|
||||
'cleaning': 'Уборка'
|
||||
'returning home': 'Возвращение на базу'
|
||||
'manual mode': 'Ручной режим'
|
||||
'charging': 'Зарядка'
|
||||
'charging problem': 'Проблема с зарядкой'
|
||||
'paused': 'Пауза'
|
||||
'spot cleaning': 'Уборка точки'
|
||||
'error': 'Ошибка'
|
||||
'shutting down': 'Выключение'
|
||||
'updating': 'Обновление'
|
||||
'docking': 'Остановка у базы'
|
||||
'going to target': 'Направление до точки'
|
||||
'zoned cleaning': 'Уборка зоны'
|
||||
'segment cleaning': 'Уборка'
|
||||
'emptying the bin': 'Очистка бака'
|
||||
'charging complete': 'Зарядка завершена'
|
||||
'device offline': 'Устройство не в сети'
|
||||
'Sweeping and Mopping': 'Пылесосит и моет полы'
|
||||
|
||||
#======================================================================================================================
|
||||
input_boolean:
|
||||
|
||||
room_vacuum:
|
||||
name: "Комната уборка"
|
||||
lobby_vacuum:
|
||||
name: "Прихожая уборка"
|
||||
hallway_vacuum:
|
||||
name: "Коридор уборка"
|
||||
bathroom_vacuum:
|
||||
name: "Ванная уборка"
|
||||
kitchen_vacuum:
|
||||
name: "Кухня уборка"
|
||||
|
||||
#======================================================================================================================
|
||||
group:
|
||||
all_rooms_for_vac_clean:
|
||||
name: All rooms for vacuum clean
|
||||
entities:
|
||||
- input_boolean.room_vacuum
|
||||
- input_boolean.lobby_vacuum
|
||||
- input_boolean.hallway_vacuum
|
||||
- input_boolean.bathroom_vacuum
|
||||
- input_boolean.kitchen_vacuum
|
||||
|
||||
#======================================================================================================================
|
||||
|
||||
template:
|
||||
# Сенсор просматривает нашу группу на предмет включенных input boolean,
|
||||
# затем забирает их названия, записывает их в строку, разделяя запятой,
|
||||
# и, наконец, заменяет каждое имя в списке соотвестовующим набором цифр в квадратных скобках.
|
||||
- sensor:
|
||||
- default_entity_id: sensor.select_rooms_for_clean
|
||||
icon: mdi:vacuum
|
||||
name: Выбранные комнаты для пылесоса
|
||||
state: "{% set room = expand('group.all_rooms_for_vac_clean') | selectattr('state',
|
||||
'eq', 'on') | map(attribute='entity_id') | list | join(',') | replace('input_boolean.room_vacuum','[3,1,3,3,1]')
|
||||
| replace('input_boolean.lobby_vacuum','[2,1,3,3,1]') | replace('input_boolean.hallway_vacuum','[5,1,3,3,1]')
|
||||
| replace('input_boolean.bathroom_vacuum','[1,1,3,3,1]') | replace('input_boolean.kitchen_vacuum','[4,1,3,3,1]')
|
||||
%}\n {\"selects\":[{{room}}]}"
|
||||
|
||||
# Сенсор выаода можности всасывания для обходя ограничения редактора карточки
|
||||
- default_entity_id: sensor.select_vacuum_fan_speed
|
||||
icon: mdi:vacuum
|
||||
name: Выбранная мощность всасывания
|
||||
state: '{{ state_attr(''vacuum.dreame_mc1808_044c_robot_cleaner_2'', ''fan_speed'')}}'
|
||||
|
||||
# Сенсор выаода уровня воды для обходя ограничения редактора карточки
|
||||
- default_entity_id: sensor.select_water_vacum
|
||||
icon: mdi:vacuum
|
||||
name: Выбранный уровень воды
|
||||
state: '{{ state_attr(''vacuum.stytj01zhm'', ''water_level'')}}'
|
||||
|
||||
# Сенсор состояния бака с водой
|
||||
- default_entity_id: sensor.vacuum_water_box
|
||||
icon: mdi:vacuum
|
||||
name: Сенсор состояния бака с водой
|
||||
state: '{{state_attr(''vacuum.dreame_mc1808_044c_robot_cleaner_2'',''clean.water_box'')}}'
|
||||
|
||||
#======================================================================================================================
|
||||
#Скрипт запуска уборки
|
||||
script:
|
||||
clean_select_rooms:
|
||||
alias: VCM|Убрать выбранные комнаты
|
||||
sequence:
|
||||
- service: xiaomi_miot.call_action
|
||||
data_template:
|
||||
entity_id: vacuum.dreame_mc1808_044c_robot_cleaner_2
|
||||
siid: 18
|
||||
aiid: 1
|
||||
params:
|
||||
- piid: 1
|
||||
value: 18
|
||||
- "{{ {'piid':21, 'value': states('sensor.select_rooms_for_clean') } }}"
|
||||
force_params: true
|
||||
#Условия по кторым утсанавливается мощность всасывания и полива
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.select_vacuum_fan_speed
|
||||
state: Турбо
|
||||
sequence:
|
||||
- service: script.set_fanspeed_vacum_turbo
|
||||
metadata: {}
|
||||
data: {}
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.select_vacuum_fan_speed
|
||||
state: Средний
|
||||
sequence:
|
||||
- service: script.set_fanspeed_vacum_strong
|
||||
data: {}
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.select_vacuum_fan_speed
|
||||
state: Стандартный
|
||||
sequence:
|
||||
- service: script.set_fanspeed_vacum_standart
|
||||
data: {}
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.select_vacuum_fan_speed
|
||||
state: Тихий
|
||||
sequence:
|
||||
- service: script.set_fanspeed_vacum_silent
|
||||
data: {}
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.select_water_vacum
|
||||
state: Low
|
||||
sequence:
|
||||
- service: script.set_water_vacum_low
|
||||
data: {}
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.select_water_vacum
|
||||
state: Med
|
||||
sequence:
|
||||
- service: script.set_water_vacum_middle
|
||||
data: {}
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.select_water_vacum
|
||||
state: High
|
||||
sequence:
|
||||
- service: script.set_water_vacum_hight
|
||||
data: {}
|
||||
|
||||
# Смена уровня воды
|
||||
set_water_vacum_hight:
|
||||
alias: VCM|Смена уровня воды пылесос высокий
|
||||
sequence:
|
||||
- service: xiaomi_miot.set_miot_property
|
||||
metadata: {}
|
||||
data:
|
||||
entity_id: vacuum.dreame_mc1808_044c_robot_cleaner_2
|
||||
siid: 18
|
||||
piid: 20
|
||||
value: 3
|
||||
|
||||
set_water_vacum_middle:
|
||||
alias: VCM|Смена уровня воды пылесос средний
|
||||
sequence:
|
||||
- service: xiaomi_miot.set_miot_property
|
||||
metadata: {}
|
||||
data:
|
||||
entity_id: vacuum.dreame_mc1808_044c_robot_cleaner_2
|
||||
siid: 18
|
||||
piid: 20
|
||||
value: 2
|
||||
|
||||
set_water_vacum_low:
|
||||
alias: VCM|Смена уровня воды пылесос низкий
|
||||
sequence:
|
||||
- service: xiaomi_miot.set_miot_property
|
||||
metadata: {}
|
||||
data:
|
||||
entity_id: vacuum.dreame_mc1808_044c_robot_cleaner_2
|
||||
siid: 18
|
||||
piid: 20
|
||||
value: 1
|
||||
|
||||
# Смена мощности всасывания
|
||||
|
||||
set_fanspeed_vacum_silent:
|
||||
alias: VCM|Смена мощности всасывания пылесос бесшумный
|
||||
sequence:
|
||||
- service: xiaomi_miot.set_miot_property
|
||||
metadata: {}
|
||||
data:
|
||||
entity_id: vacuum.dreame_mc1808_044c_robot_cleaner_2
|
||||
siid: 18
|
||||
piid: 6
|
||||
value: 0
|
||||
|
||||
set_fanspeed_vacum_standart:
|
||||
alias: VCM|Смена мощности всасывания пылесос стандартный
|
||||
sequence:
|
||||
- service: xiaomi_miot.set_miot_property
|
||||
metadata: {}
|
||||
data:
|
||||
entity_id: vacuum.dreame_mc1808_044c_robot_cleaner_2
|
||||
siid: 18
|
||||
piid: 6
|
||||
value: 1
|
||||
|
||||
set_fanspeed_vacum_strong:
|
||||
alias: VCM|Смена мощности всасывания пылесос интенсивный
|
||||
sequence:
|
||||
- service: xiaomi_miot.set_miot_property
|
||||
metadata: {}
|
||||
data:
|
||||
entity_id: vacuum.dreame_mc1808_044c_robot_cleaner_2
|
||||
siid: 18
|
||||
piid: 6
|
||||
value: 2
|
||||
|
||||
set_fanspeed_vacum_turbo:
|
||||
alias: VCM|Смена мощности всасывания пылесос турбо
|
||||
sequence:
|
||||
- service: xiaomi_miot.set_miot_property
|
||||
metadata: {}
|
||||
data:
|
||||
entity_id: vacuum.dreame_mc1808_044c_robot_cleaner_2
|
||||
siid: 18
|
||||
piid: 6
|
||||
value: 3
|
||||
|
||||
#======================================================================================================================
|
||||
# автоматизацию, которая сбрасывает булеаны после окончания уборки
|
||||
automation:
|
||||
- alias: 'VCM|reset_select_rooms'
|
||||
id: Reset select rooms
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: vacuum.dreame_mc1808_044c_robot_cleaner_2
|
||||
to: 'docked'
|
||||
condition: []
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.room_vacuum
|
||||
- input_boolean.lobby_vacuum
|
||||
- input_boolean.hallway_vacuum
|
||||
- input_boolean.bathroom_vacuum
|
||||
- input_boolean.kitchen_vacuum
|
||||
|
||||
- alias: VCM|button_start_clean
|
||||
description: ""
|
||||
trigger:
|
||||
- platform: device
|
||||
domain: mqtt
|
||||
device_id: 975fb5853727f1fa4279bac09fd7fb6b
|
||||
type: action
|
||||
subtype: hold_right
|
||||
discovery_id: 0x00158d0006c6bca8 action_hold_right
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: vacuum.dreame_mc1808_044c_robot_cleaner_2
|
||||
state: docked
|
||||
- condition: state
|
||||
entity_id: vacuum.dreame_mc1808_044c_robot_cleaner_2
|
||||
state: idle
|
||||
action:
|
||||
- device_id: 885672257bd73c7492a4ba8b72b83699
|
||||
domain: vacuum
|
||||
entity_id: f9d147842b81972de04c1be4dfd368f3
|
||||
type: clean
|
||||
mode: single
|
||||
|
||||
- alias: VCM|button_stop_clean
|
||||
description: ""
|
||||
trigger:
|
||||
- platform: device
|
||||
domain: mqtt
|
||||
device_id: 975fb5853727f1fa4279bac09fd7fb6b
|
||||
type: action
|
||||
subtype: hold_right
|
||||
discovery_id: 0x00158d0006c6bca8 action_hold_right
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: vacuum.dreame_mc1808_044c_robot_cleaner_2
|
||||
state: cleaning
|
||||
- condition: state
|
||||
entity_id: vacuum.dreame_mc1808_044c_robot_cleaner_2
|
||||
state: error
|
||||
- condition: state
|
||||
entity_id: vacuum.dreame_mc1808_044c_robot_cleaner_2
|
||||
state: paused
|
||||
action:
|
||||
- device_id: 885672257bd73c7492a4ba8b72b83699
|
||||
domain: vacuum
|
||||
entity_id: f9d147842b81972de04c1be4dfd368f3
|
||||
type: dock
|
||||
mode: single
|
||||
|
||||
#======================================================================================================================
|
||||
# Уведомления Telegram
|
||||
#======================================================================================================================
|
||||
- alias: "ntf|tg|VCM|clean_water_box_off"
|
||||
id: telegram_ntf_vcm_water_box
|
||||
description: "Напоминание о неснятом баке с водой"
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.vacuum_water_box
|
||||
to: "1"
|
||||
for:
|
||||
hours: 1
|
||||
minutes: 0
|
||||
seconds: 0
|
||||
action:
|
||||
- repeat:
|
||||
sequence:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
target: -1002006010424
|
||||
message: |
|
||||
💧 ❗ Напоминание: Снимите бак с водой с пылесоса!
|
||||
Он установлен уже более часа.
|
||||
inline_keyboard:
|
||||
- '🌀 Управление пылесосом:/vcm_control'
|
||||
- '🔙 Главное меню:/menu_back, 🗑️ Прочитано:/menu_hide'
|
||||
- delay:
|
||||
hours: 3
|
||||
while:
|
||||
- condition: state
|
||||
entity_id: sensor.vacuum_water_box
|
||||
state: "1"
|
||||
|
||||
- alias: "ntf|tg|VCM|vacuum_clean_finish"
|
||||
id: telegram_ntf_vcm_finish
|
||||
description: "Уведомление об окончании уборки"
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: vacuum.dreame_mc1808_044c_robot_cleaner_2
|
||||
from: 'cleaning'
|
||||
to: 'returning'
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
target: -1002006010424
|
||||
message: |
|
||||
✅ Пылесос завершил уборку
|
||||
|
||||
🕒 Завершена в: {{ states('sensor.time') }}
|
||||
⏱️ Затрачено времени: {{ state_attr('vacuum.stytj01zhm', 'cleaning_time') | default(0) }} мин
|
||||
🏠 Убрано: {{ state_attr('vacuum.stytj01zhm', 'cleaning_area') | default(0) }} м²
|
||||
🔋 Заряд: {{ state_attr('vacuum.dreame_mc1808_044c_robot_cleaner_2', 'battery_level') | default(0) }}%
|
||||
|
||||
{% if state_attr('vacuum.dreame_mc1808_044c_robot_cleaner_2', 'clean.water_box') | int(0) == 1 %}
|
||||
💧 ❗ Внимание: Бак с водой всё ещё установлен!
|
||||
{% else %}
|
||||
💧 Бак с водой: Снят
|
||||
{% endif %}
|
||||
inline_keyboard:
|
||||
- '🌀 Управление пылесосом:/vcm_control, 🔙 Главное меню:/menu_back'
|
||||
- '🗑️ Прочитано:/menu_hide'
|
||||
|
||||
- alias: "ntf|tg|VCM|vacuum_error"
|
||||
id: telegram_ntf_vcm_error
|
||||
description: "Уведомление об ошибке пылесоса"
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: vacuum.dreame_mc1808_044c_robot_cleaner_2
|
||||
to: 'error'
|
||||
action:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
target: -1002006010424
|
||||
message: |
|
||||
{%- set raw = state_attr('vacuum.dreame_mc1808_044c_robot_cleaner_2', 'vacuum.fault') -%}
|
||||
{%- set code = raw | int(0) if raw not in ['unknown', 'unavailable', None] else 0 -%}
|
||||
{%- set errors = {
|
||||
0: 'Нет ошибки',
|
||||
1: 'Пылесос подняли (на весу)',
|
||||
2: 'Щётка заблокирована',
|
||||
3: 'Ошибка мотора щётки',
|
||||
4: 'Колесо заблокировано',
|
||||
5: 'Ошибка датчиков высоты',
|
||||
6: 'Ошибка колеса',
|
||||
7: 'Ошибка контейнера для пыли',
|
||||
8: 'Ошибка лидара (вращение сенсора)',
|
||||
9: 'Ошибка бампера (столкновение)',
|
||||
10: 'Ошибка навигации',
|
||||
11: 'Ошибка зарядки',
|
||||
12: 'Что-то намоталось на основную щётку',
|
||||
13: 'Ошибка батареи',
|
||||
14: 'Ошибка Wi-Fi модуля',
|
||||
15: 'Ошибка бака с водой',
|
||||
16: 'Ошибка привода'
|
||||
} -%}
|
||||
|
||||
{%- if code == 0 -%}
|
||||
✅ Ошибка пылесоса устранена
|
||||
{%- else -%}
|
||||
❗ Ошибка пылесоса: {{ errors.get(code, 'Неизвестная ошибка (код ' ~ raw ~ ')') }}
|
||||
{%- endif %}
|
||||
inline_keyboard:
|
||||
- '🌀 Управление пылесосом:/vcm_control, 🔙 Главное меню:/menu_back'
|
||||
- '🗑️ Прочитано:/menu_hide'
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user