AutomationDataset/artemevk/artemevk_automations.yaml

2687 lines
80 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

- id: '1716476299336'
alias: doorbell
description: doorbell
trigger:
- platform: state
entity_id:
- sensor.doorbell_button_action
condition: []
action:
- service: switch.turn_on
target:
entity_id: switch.balcony_light_switch_left
data: {}
mode: restart
- id: '1716476565706'
alias: doorbell
description: ''
trigger:
- platform: state
entity_id:
- sensor.doorbell_button_action
condition: []
action:
- service: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.balcony_light_switch_left
mode: restart
- id: balcony_white_light_toggle
alias: balcony_white_light_toggle
triggers:
- domain: mqtt
device_id: 3153a1e8b94626dd8c88fafc91f23faa
type: action
subtype: 3_single
trigger: device
- domain: mqtt
device_id: 3153a1e8b94626dd8c88fafc91f23faa
type: action
subtype: 3_double
trigger: device
- domain: mqtt
device_id: 3153a1e8b94626dd8c88fafc91f23faa
type: action
subtype: 3_hold
trigger: device
action:
- service: light.toggle
entity_id: light.balcony_one_bulb
- id: balcony_rgb_light_toggle
alias: balcony_rgb_light_toggle
triggers:
- domain: mqtt
device_id: 3153a1e8b94626dd8c88fafc91f23faa
type: action
subtype: 4_single
trigger: device
- domain: mqtt
device_id: 3153a1e8b94626dd8c88fafc91f23faa
type: action
subtype: 4_double
trigger: device
- domain: mqtt
device_id: 3153a1e8b94626dd8c88fafc91f23faa
type: action
subtype: 4_hold
trigger: device
action:
- service: light.toggle
entity_id: light.balcony_two_bulbs
- id: balcony_auto_mode_light_init
alias: balcony_auto_mode_light_init
trigger:
- platform: time
at: '12:32:00'
condition:
- condition: state
entity_id: input_boolean.balcony_auto_mode_light
state: 'off'
action:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.balcony_auto_mode_light
- id: balcony_light_on
alias: balcony_light_on
trigger:
- platform: state
entity_id: binary_sensor.balcony_motion_occupancy
to: 'on'
conditions:
- condition: and
conditions:
- condition: template
value_template: '{{ state_attr(''sun.sun'', ''elevation'') < 0 }}'
- condition: state
entity_id: input_boolean.balcony_auto_mode_light
state: 'on'
actions:
- action: light.turn_on
target:
entity_id:
- light.balcony_one_bulb
- light.balcony_two_bulbs
- id: balcony_light_off
alias: balcony_light_off
triggers:
- trigger: state
entity_id:
- binary_sensor.balcony_motion_occupancy
to: 'off'
for:
minutes: 5
- trigger: state
entity_id:
- light.balcony_one_bulb
- light.balcony_two_bulbs
to: 'on'
for:
minutes: 15
conditions:
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.balcony_motion_occupancy
state: 'off'
for:
minutes: 4
- condition: state
entity_id: input_boolean.balcony_auto_mode_light
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: light.balcony_one_bulb
state: 'on'
- condition: state
entity_id: light.balcony_two_bulbs
state: 'on'
actions:
- action: light.turn_off
target:
entity_id:
- light.balcony_one_bulb
- light.balcony_two_bulbs
- id: apply_scene
alias: apply_scene
initial_state: true
trigger:
- platform: state
entity_id: input_select.scenes
action:
- service: scene.turn_on
data_template:
entity_id: scene.{{trigger.to_state.state}}
transition: 2
- id: childrens_room_change_scene
alias: childrens_room_change_scene
initial_state: true
trigger:
- platform: state
entity_id: sensor.living_room_scene_switch_action
to: 1_single
condition:
- condition: state
entity_id: light.childrens_room_ceiling_lamp
state: 'on'
action:
service: input_select.select_next
data:
entity_id: input_select.scenes
- id: childrens_room_light_on
alias: childrens_room_light_on
trigger:
platform: state
entity_id: binary_sensor.childrens_room_motion_occupancy
to: 'on'
condition:
- condition: time
after: 09:00:00
before: '21:00:00'
- condition: state
entity_id: input_boolean.childrens_room_resolution_auto_mode_light
state: 'on'
action:
- service: scene.turn_on
target:
entity_id: scene.full
- id: childrens_room_light_off
alias: childrens_room_light_off
trigger:
- platform: state
entity_id:
- binary_sensor.childrens_room_motion_occupancy
to: 'off'
for: 00:03:00
condition:
- condition: state
entity_id: input_boolean.childrens_room_resolution_auto_mode_light
state: 'on'
- condition: time
after: 09:00:00
before: '21:00:00'
- condition: state
entity_id: light.yeelight_s1_child_1
state: 'on'
action:
service: light.turn_off
target:
entity_id: light.childrens_room_ceiling_lamp
- id: childrens_room_light_night_on
alias: childrens_room_light_night_on
trigger:
platform: state
entity_id: binary_sensor.childrens_room_motion_occupancy
to: 'on'
condition:
- condition: time
after: '23:00:00'
before: 06:00:00
- condition: state
entity_id: input_boolean.childrens_room_resolution_auto_mode_light
state: 'on'
action:
- service: scene.turn_on
target:
entity_id: scene.min
- id: childrens_room_light_night_off
alias: childrens_room_light_night_off
trigger:
- platform: state
entity_id:
- binary_sensor.childrens_room_motion_occupancy
to: 'off'
for: 00:00:30
condition:
- condition: state
entity_id: input_boolean.childrens_room_resolution_auto_mode_light
state: 'on'
- condition: time
after: '23:00:00'
before: 06:00:00
- condition: state
entity_id: light.yeelight_s1_child_1
state: 'on'
action:
service: light.turn_off
target:
entity_id: light.childrens_room_ceiling_lamp
- id: childrens_room_light_alarm_clock_on
alias: childrens_room_light_alarm_clock_on
trigger:
platform: time
at: input_datetime.childrens_room_alarm_clock_time
conditions:
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
action:
- service: script.childrens_room_sunrise_start
- id: childrens_room_high_co2_notify
alias: childrens_room_high_co2_notify
mode: single
triggers:
- trigger: numeric_state
entity_id: sensor.childrens_room_air_quality_co2
above: 1000
for: 00:15:00
conditions:
- condition: state
entity_id: person.artemevi
state: home
action:
- service: notify.mobile_app_artemevk
data:
title: CO2
message: Высокая концентрация углекислого газа в детской
data:
url: /lovelace/childrens_room
push:
sound:
name: default
critical: 1
volume: 0.1
- id: water leak
alias: water leak
description: water leak
mode: single
triggers:
- trigger: state
entity_id:
- binary_sensor.toilet_water_leak
to: 'on'
action:
- service: notify.mobile_app_artemevk
data:
title: Протечка!
message: Обнаружена протечка!
data:
url: /lovelace/main
push:
sound:
name: alarm.caf
critical: 1
volume: 1.0
- id: doorbell_call
alias: Дверной звонок
description: ''
mode: restart
triggers:
- domain: mqtt
device_id: ca4306e18a6b6935c1711b36719632d2
type: action
subtype: single
trigger: device
- domain: mqtt
device_id: ca4306e18a6b6935c1711b36719632d2
type: action
subtype: double
trigger: device
- domain: mqtt
device_id: ca4306e18a6b6935c1711b36719632d2
type: action
subtype: hold
trigger: device
condition: []
action:
- service: script.turn_on
target:
entity_id: script.call
- id: smartintercom_accept_call_on
alias: Домофон (включается accept_call)
description: ''
trigger:
- platform: state
entity_id: switch.smartintercom_accept_call
from: 'off'
to: 'on'
condition: []
action:
- service: timer.start
entity_id: timer.smartintercom_wait
mode: single
- id: smartintercom_accept_call_off
alias: Домофон (выключается accept_call)
description: ''
trigger:
- platform: state
entity_id: switch.smartintercom_accept_call
from: 'on'
to: 'off'
condition: []
action:
- service: timer.cancel
entity_id: timer.smartintercom_wait
mode: single
- id: smartintercom_timer_finished
alias: Домофон (обработчик таймера accept_call)
description: ''
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.smartintercom_wait
condition:
- condition: state
entity_id: switch.smartintercom_accept_call
state: 'on'
action:
- service: switch.turn_off
target:
entity_id: switch.smartintercom_accept_call
mode: single
- id: smartintercom_call
alias: SmartIntercom Call
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.smartinteircom_line_detect
from: 'off'
to: 'on'
condition: []
action:
- alias: Define Actions
variables:
action_allow_access: '{{ ''ALLOW_ACCESS_'' ~ context.id }}'
action_allow_delivery: '{{ ''ALLOW_DELIVERY_'' ~ context.id }}'
action_reject_access: '{{ ''REJECT_ACCESS_'' ~ context.id }}'
notification_tag: smartintercom-call-detected
- alias: Send Call Notification
service: notify.mobile_app_artemevk
metadata: {}
data:
title: Домофон
message: Вызов
data:
tag: '{{ notification_tag }}'
url: /lovelace/main
actions:
- action: '{{ action_allow_access }}'
title: Открыть
- action: '{{ action_allow_delivery }}'
title: Открыть курьеру
- action: '{{ action_reject_access }}'
title: Сбросить
destructive: true
enabled: true
- alias: Wait for Notification Response
wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: '{{ action_allow_access }}'
- platform: event
event_type: mobile_app_notification_action
event_data:
action: '{{ action_allow_delivery }}'
- platform: event
event_type: mobile_app_notification_action
event_data:
action: '{{ action_reject_access }}'
timeout:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
continue_on_timeout: false
- choose:
- conditions:
- condition: template
value_template: '{{ wait.trigger.event.data.action == action_allow_access
}}'
sequence:
- service: switch.turn_on
target:
entity_id: switch.smartintercom_accept_call
data: {}
- conditions:
- condition: template
value_template: '{{ wait.trigger.event.data.action == action_allow_delivery
}}'
sequence:
- service: switch.turn_on
target:
entity_id: switch.smartintercom_delivery
data: {}
- conditions:
- condition: template
value_template: '{{ wait.trigger.event.data.action == action_reject_access
}}'
sequence:
- service: switch.turn_on
target:
entity_id: switch.smartintercom_reject_call
data: {}
mode: parallel
max: 5
- id: Сообщение о пересохших цветах
alias: dry_flowers
triggers:
- trigger: time_pattern
hours: /6
conditions:
- and:
- condition: state
entity_id: timer.1m
state: idle
- or:
- condition: numeric_state
entity_id: sensor.palm_soil_moisture
below: 50
- condition: numeric_state
entity_id: sensor.womens_happines_soil_moisture
below: 50
actions:
- action: telegram_bot.send_message
data:
target:
- secret tlg_user1_id
- secret tlg_user2_id
- secret tlg_user5_id
message: "{{\"\\U0001F940\"}} Мы высохли, дайте попить. \n{{- \" \"}}{{\"\\\
U0001F337\"}}: {{ states('sensor.womens_happines_soil_moisture') }}\n{{- \"\
, \"}}{{\"\\U0001F334\"}}: {{ states('sensor.palm_soil_moisture') }}\nВаши\
\ цветы.\n"
- id: Благодарность
alias: wet_flowers
initial_state: true
triggers:
- trigger: numeric_state
entity_id: sensor.palm_soil_moisture
above: 80
- trigger: numeric_state
entity_id: sensor.womens_happines_soil_moisture
above: 80
conditions:
- condition: state
entity_id: timer.1m
state: idle
- condition: numeric_state
entity_id: sensor.palm_soil_moisture
above: 80
- condition: numeric_state
entity_id: sensor.womens_happines_soil_moisture
above: 80
actions:
- action: telegram_bot.send_message
data:
target:
- secret tlg_user1_id
- secret tlg_user2_id
- secret tlg_user5_id
message: '{{"\U0001FAB4"}} Спасибо за то, что полили нас.
{{- " "}}{{"\U0001F337"}}: {{ states(''sensor.womens_happines_soil_moisture'')
}}
{{- ", "}}{{"\U0001F334"}}: {{ states(''sensor.palm_soil_moisture'') }}
Ваши цветы.
'
- id: automatic arming
alias: automatic arming
triggers:
- trigger: template
value_template: '{{ states(''zone.home'') | int == 0 }}'
condition:
not:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_away
actions:
- action: alarm_control_panel.alarm_arm_away
target:
entity_id: alarm_control_panel.home_alarm
- action: script.turn_on
entity_id: script.light_turn_off_all
- id: automatic disarming
alias: automatic disarming
triggers:
- trigger: template
value_template: '{{ states(''zone.home'') | int > 0 }}'
condition:
not:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: disarmed
actions:
- action: alarm_control_panel.alarm_disarm
target:
entity_id: alarm_control_panel.home_alarm
- id: Actions when arming
alias: Actions when arming
triggers:
- trigger: state
entity_id:
- alarm_control_panel.home_alarm
to: arming
actions:
- action: switch.turn_off
entity_id: switch.tapo_c110_43b0_privacy
- action: switch.turn_on
entity_id: switch.tapo_c110_43b0_notifications
- delay: 5
- action: camera.snapshot
data:
filename: /media/hallway_last_snapshot.jpg
target:
entity_id: camera.tapo_c110_43b0_hd_stream
- alias: Actions when alarm is Armed in Away mode
triggers:
- trigger: state
entity_id: alarm_control_panel.home_alarm
to: armed_away
actions:
- action: telegram_bot.send_photo
data:
file: /media/hallway_last_snapshot.jpg
target:
- secret tlg_user1_id
- secret tlg_user2_id
- secret tlg_user5_id
caption: Сигнализация активирована.
disable_notification: true
- action: notify.alarm
data:
title: Охрана
message: Квартира поставлена на охрану.
data:
url: /lovelace/main
importance: high
persistent: true
image: /media/local/hallway_last_snapshot.jpg
content-type: image
- alias: Actions when alarm is Armed in Home mode
triggers:
- trigger: state
entity_id: alarm_control_panel.home_alarm
to: armed_home
actions:
- action: telegram_bot.send_message
data:
disable_notification: true
target:
- secret tlg_user1_id
- secret tlg_user2_id
- secret tlg_user5_id
message: Сигнализация активирована в режима Дома.
title: Охрана
- action: notify.alarm
data:
title: Охрана
message: Сигнализация активирована в режима Дома.
data:
url: /lovelace/main
- alias: Trigger alarm while armed away
triggers:
- trigger: state
entity_id: binary_sensor.door_sensor_contact
to: 'on'
- trigger: state
entity_id: binary_sensor.tapo_c110_43b0_motion_alarm
to: 'on'
- trigger: state
entity_id: binary_sensor.tapo_c110_43b0_noise
to: 'on'
condition:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_away
actions:
action: alarm_control_panel.alarm_trigger
target:
entity_id: alarm_control_panel.home_alarm
- alias: Actions when alarm is in pending status
triggers:
- trigger: state
entity_id: alarm_control_panel.home_alarm
to: pending
actions:
- action: camera.snapshot
target:
entity_id: camera.tapo_c110_43b0_hd_stream
data:
filename: /media/hallway_last_snapshot.jpg
- delay: 2
- action: telegram_bot.send_photo
data:
file: /media/hallway_last_snapshot.jpg
caption: Сигнализация перешла в режим ожидания
target:
- secret tlg_user1_id
- secret tlg_user2_id
- secret tlg_user5_id
- action: notify.alarm
data:
title: Охрана
message: Сигнализация перешла в режим ожидания
data:
url: /lovelace/main
importance: high
persistent: true
vibrationPattern: 100, 1000, 100, 1000, 100
ledColor: red
image: /media/local/hallway_last_snapshot.jpg
content-type: image
push:
sound:
name: alarm.caf
critical: 1
volume: 0.75
actions:
- action: ALARM
title: Sound Alarm
destructive: true
icon: sfsymbols:bell
- action: SILENCE
title: Silence Alarm
icon: sfsymbols:bell.slash
- action: disarmed
title: Снять с охраны
icon: sfsymbols:lock.open
- alias: disarmed
triggers:
- trigger: event
event_type: mobile_app_notification_action
event_data:
action: disarmed
actions:
- action: alarm_control_panel.alarm_disarm
target:
entity_id: alarm_control_panel.home_alarm
- alias: Send notification when alarm triggered
triggers:
- trigger: state
entity_id: alarm_control_panel.home_alarm
to: triggered
actions:
- action: camera.snapshot
target:
entity_id: camera.tapo_c110_43b0_hd_stream
data:
filename: /media/hallway_last_snapshot.jpg
- delay: 2
- action: telegram_bot.send_photo
data:
file: /media/hallway_last_snapshot.jpg
target:
- secret tlg_user1_id
- secret tlg_user2_id
- secret tlg_user5_id
caption: Сработала сигнализация
- action: notify.alarm
data:
title: Охрана
message: Сработала сигнализация
data:
url: /lovelace/main
importance: high
persistent: true
vibrationPattern: 100, 1000, 100, 1000, 100
ledColor: red
image: /media/local/hallway_last_snapshot.jpg
content-type: image
push:
sound:
name: alarm.caf
critical: 1
volume: 1
actions:
- action: ALARM
title: Sound Alarm
destructive: true
icon: sfsymbols:bell
- action: SILENCE
title: Silence Alarm
icon: sfsymbols:bell.slash
- action: disarmed
title: Снять с охраны
icon: sfsymbols:lock.open
- alias: Actions when alarm is Disarmed
triggers:
- trigger: state
entity_id: alarm_control_panel.home_alarm
not_from: arming
to: disarmed
actions:
- action: telegram_bot.send_message
data:
disable_notification: true
target:
- secret tlg_user1_id
- secret tlg_user2_id
- secret tlg_user5_id
message: Квартира снята с охраны.
title: Охрана
- action: notify.alarm
data:
title: Охрана
message: Квартира снята с охраны.
data:
url: /lovelace/main
importance: high
persistent: true
- action: switch.turn_on
entity_id: switch.tapo_c110_43b0_privacy
- action: switch.turn_off
entity_id: switch.tapo_c110_43b0_notifications
- action: select.select_option
target:
entity_id: select.tapo_c110_43b0_automatic_alarm
data:
option: 'off'
- id: l1k3
alias: push_HA_configuration_to_GitHub_repo
initial_state: true
trigger:
- platform: time
at: '23:33:23'
action:
- service: shell_command.push_to_github
- id: start_offline_timer
alias: start_offline_timer
initial_state: true
trigger:
- platform: state
entity_id:
- binary_sensor.ihome_connection
to: 'off'
action:
- service: timer.start
entity_id: timer.ihome_offline
- id: ihome_disconnected
alias: ihome_disconnected
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.ihome_offline
action:
- service: notify.tlg_user1_id
data:
title: '#system'
message: Сервер iHome не отвечает!
- service: notify.mobile_app_artemevk
data:
message: Сервер iHome не отвечает!
- id: cancel_offline_timer
alias: cancel_offline_timer
initial_state: true
trigger:
- platform: state
entity_id:
- binary_sensor.ihome_connection
to: 'on'
action:
- service: timer.cancel
entity_id: timer.ihome_offline
- alias: Telegram bot hello
trigger:
- platform: event
event_type: telegram_command
event_data:
command: /start
action:
- service: telegram_bot.send_message
data_template:
target: '{{ trigger.event.data.user_id }}'
message: 'Добро пожаловать в главное меню. Выберите действие:'
disable_notification: true
inline_keyboard:
- '{{''📋''}}Отчет о системе:/report, {{''🔋''}}Батарейки:/battaries_states'
- '{{''🚨''}}Сигнализация:/alarm_menu, {{''🚪''}}Домофон:/smartintercom'
- alias: Telegram bot main menu
trigger:
- platform: event
event_type: telegram_callback
event_data:
command: /mm
action:
- 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_template:
target: '{{ trigger.event.data.user_id }}'
message: 'Добро пожаловать в главное меню. Выберите действие:'
disable_notification: true
inline_keyboard:
- '{{''📋''}}Отчет о системе:/report, {{''🔋''}}Батарейки:/battaries_states'
- '{{''🚨''}}Сигнализация:/alarm_menu, {{''🚪''}}Домофон:/smartintercom'
- alias: Telegram bot main menu from msg
trigger:
- platform: event
event_type: telegram_command
event_data:
command: /mm
action:
- service: telegram_bot.send_message
data_template:
target: '{{ trigger.event.data.user_id }}'
message: 'Добро пожаловать в главное меню. Выберите действие:'
disable_notification: true
inline_keyboard:
- '{{''📋''}}Отчет о системе:/report, {{''🔋''}}Батарейки:/battaries_states'
- '{{''🚨''}}Сигнализация:/alarm_menu, {{''🚪''}}Домофон:/smartintercom'
- id: Отчет при запуске системы
alias: start_message
initial_state: true
trigger:
- platform: homeassistant
event: start
action:
- service: notify.tlg_user1_id
data:
title: '#system'
message: '{{"\U0001F5A5"}} Зафиксирован запуск. Отчет о состоянии будет через
2 минуты.
'
- service: timer.start
target:
entity_id: timer.1m
- delay: 00:02:00
- service: notify.tlg_user1_id
data:
title: '#system'
message: '{{ states("sensor.report_msg") }}
{{ states(''sensor.batteries_states_msg'') }}
'
- delay: 00:00:02
- service: notify.tlg_user1_id
data:
message: 'Добро пожаловать в главное меню. Выберите действие:'
data:
inline_keyboard:
- '{{''📋''}}Отчет о системе:/report, {{''🔋''}}Батарейки:/battaries_states'
- '{{''🚨''}}Сигнализация:/alarm_menu, {{''🚪''}}Домофон:/smartintercom'
- id: Отчет о системе по запросу
alias: send_report
initial_state: true
trigger:
- platform: event
event_type: telegram_callback
event_data:
command: /report
action:
- 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_template:
target: '{{ trigger.event.data.user_id }}'
title: '#system'
message: '{{ states(''sensor.report_msg'') }}
{{ states(''sensor.batteries_states_msg'') }}
'
disable_notification: true
inline_keyboard:
- '{{''📋''}}Отчет о системе:/report, {{''🔋''}}Батарейки:/battaries_states'
- '{{''🚨''}}Сигнализация:/alarm_menu, {{''🚪''}}Домофон:/smartintercom'
- id: Отчет при потере объектов
alias: send_report_when_objects_are_lost
initial_state: true
trigger:
- platform: state
entity_id: sensor.unavailable_objects
for: 00:03:00
condition:
condition: and
conditions:
- condition: template
value_template: '{{ trigger.to_state.state > trigger.from_state.state }}'
action:
- service: telegram_bot.send_message
data_template:
target: secret tlg_user1_id
message: '{{"\U0000203C"}}Обнаружена новая неисправность
{{ states(''sensor.report_msg'') }}
'
data:
inline_keyboard:
- '{{''📋''}}Отчет о системе:/report, {{''🔋''}}Батарейки:/battaries_states'
- '{{''🚨''}}Сигнализация:/alarm_menu, {{''🚪''}}Домофон:/smartintercom'
- id: Отправить отчет о состоянии батареек
alias: send_battaries_states_msg
initial_state: true
trigger:
- platform: event
event_type: telegram_callback
event_data:
command: /battaries_states
action:
- 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_template:
target: '{{ trigger.event.data.user_id }}'
title: '#system'
disable_notification: true
message: '{{ states(''sensor.batteries_states_msg'') }}
---------------------
childrens room motion - CR2032
living room scene switch - CR2430
balcony motion - 2xCR2450
door sensor - CR1632
palm - 2xAAA, LR03
womens happines - 2xAAA
siren - 2xCR123A
door bell button - CR2032
'
inline_keyboard:
- '{{''📋''}}Отчет о системе:/report, {{''🔋''}}Батарейки:/battaries_states'
- '{{''🚨''}}Сигнализация:/alarm_menu, {{''🚪''}}Домофон:/smartintercom'
- id: Автоматический отчет о состоянии батареек
alias: send_battaries_states_msg_auto
initial_state: true
trigger:
- platform: numeric_state
entity_id: sensor.min_batteries_state
below: 20
action:
- service: telegram_bot.send_message
data_template:
target: secret tlg_user1_id
title: '#system'
message: '{{ states(''sensor.batteries_states_msg'') }}
---------------------
childrens room motion - CR2032
living room scene switch - CR2430
balcony motion - 2xCR2450
door sensor - CR1632
palm - 2xAAA, LR03
womens happines - 2xAAA
siren - 2xCR123A
door bell button - CR2032
toilet water leak - CR2032
'
inline_keyboard:
- '{{''📋''}}Отчет о системе:/report, {{''🔋''}}Батарейки:/battaries_states'
- '{{''🚨''}}Сигнализация:/alarm_menu, {{''🚪''}}Домофон:/smartintercom'
- id: Меню Сигнализация
alias: alarm_menu
initial_state: true
trigger:
- platform: event
event_type: telegram_callback
event_data:
command: /alarm_menu
- platform: event
event_type: telegram_command
event_data:
command: /alarm_menu
action:
- 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_template:
target: '{{ trigger.event.data.user_id }}'
message: '{{ "\n" -}}{{"\U0001F6A8"}} Сигнализация {% if states(''alarm_control_panel.home_alarm'')
== ''disarmed'' %}{{"выкл."}}
{% elif states(''alarm_control_panel.home_alarm'') == ''armed'' %}{{"вкл."}}
{% else %}{{ states(''alarm_control_panel.home_alarm'') }}
{% endif %}
{{ "\n" -}}
'
disable_notification: true
inline_keyboard:
- Вкл.:/turn_on_alarm, Выкл.:/turn_off_alarm
- '{{''📖''}} Главное меню:/mm, {{''🔄''}}Обновить:/alarm_menu'
- id: turn_on_alarm
alias: turn_on_alarm
initial_state: true
trigger:
- platform: event
event_type: telegram_callback
event_data:
command: /turn_on_alarm
condition:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: disarmed
action:
service: alarm_control_panel.alarm_arm_away
data: {}
target:
entity_id: alarm_control_panel.home_alarm
- id: turn_off_alarm
alias: turn_off_alarm
initial_state: true
trigger:
- platform: event
event_type: telegram_callback
event_data:
command: /turn_off_alarm
condition:
condition: template
value_template: '{{ states("alarm_control_panel.home_alarm") = "disarmed" }}'
action:
service: alarm_control_panel.alarm_disarm
data: {}
target:
entity_id: alarm_control_panel.home_alarm
- id: telegram_smartintercom
alias: Telegram (домофон - menu)
description: ''
trigger:
- platform: event
event_type: telegram_command
event_data:
command: /smartintercom
- platform: event
event_type: telegram_callback
event_data:
command: /smartintercom
action:
- 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:
target: '{{ trigger.event.data.user_id }}'
title: '{{"\U0001F6AA"}} Домофон'
message: ''
disable_notification: true
inline_keyboard:
- '{% set mode = states("select.smartintercom_modes") %} {% if mode == "Не активен"
%} {{"\U0001F7E2"}} {% else %} {{"\U0001F534"}} {% endif %} Не активен:/smartintercom_not_active,
{% set mode = states("select.smartintercom_modes") %} {% if mode == "Открывать
всегда" %} {{"\U0001F7E2"}} {% else %} {{"\U0001F534"}} {% endif %} Открывать
всегда:/smartintercom_open_always'
- '{% if is_state("switch.smartintercom_accept_call", "on") %} {{"\U0001F7E2"}}
{% else %} {{"\U0001F534"}} {% endif %} Открыть:/smartintercom_accept_call,
{% set mode = states("select.smartintercom_modes") %} {% if mode == "Сброс
вызова" %} {{"\U0001F7E2"}} {% else %} {{"\U0001F534"}} {% endif %} Сброс
вызова:/smartintercom_reset'
- '{% if is_state("switch.smartintercom_sound", "on") %} {{"\U0001F7E2"}} {%
else %} {{"\U0001F534"}} {% endif %} Звук:/smartintercom_sound, {% if is_state("switch.smartintercom_mute",
"on") %} {{"\U0001F7E2"}} {% else %} {{"\U0001F534"}} {% endif %} Mute:/smartintercom_mute'
- '{{''📖''}} Главное меню:/mm, {{''🔄''}}Обновить:/smartintercom'
- alias: 1st_floor_bedroom_heater_thermostat Set Temperature
trigger:
- platform: state
entity_id: sensor.1st_floor_bedroom_setpoint
action:
- service: climate.set_temperature
target:
entity_id: climate.1st_floor_bedroom_heater_thermostat
data:
temperature: '{{ state_attr(''climate.1st_floor_bedroom_thermostat'', ''temperature'')
}}'
- alias: 1st_floor_bedroom_thermostat Set Temperature
trigger:
- platform: state
entity_id: sensor.1st_floor_bedroom_heater_setpoint
action:
- service: climate.set_temperature
target:
entity_id: climate.1st_floor_bedroom_thermostat
data:
temperature: '{{ state_attr(''climate.1st_floor_bedroom_heater_thermostat'',
''temperature'') }}'
- alias: bathhouse_drying_timer_restart
id: bathhouse_drying_timer_restart
triggers:
- trigger: state
entity_id:
- script.bathhouse_drying_on
actions:
- action: timer.start
data:
duration: '{{ states(''input_number.bathhouse_drying_time'') | int * 60 * 60
}}'
target:
entity_id: timer.bathhouse_drying_timer
- alias: bathhouse_drying_off
id: bathhouse_drying_off
triggers:
- trigger: event
event_type: timer.finished
event_data:
entity_id: timer.bathhouse_drying_timer
actions:
- action: script.turn_on
target:
entity_id: script.bathhouse_drying_off
- id: apply_bathhouse_scene
alias: apply_bathhouse_scene
initial_state: true
triggers:
- trigger: state
entity_id: input_select.bathhouse_scenes
actions:
- action: scene.turn_on
target:
entity_id: scene.{{trigger.to_state.state}}
data:
transition: 2.5
- alias: corridor_light_auto_mode_reset
id: corridor_light_auto_mode_reset
initial_state: true
triggers:
- trigger: numeric_state
entity_id: sun.sun
attribute: elevation
above: -2.0
conditions:
- condition: or
conditions:
- condition: state
entity_id: input_boolean.corridor_light_auto_mode
state: 'off'
- condition: state
entity_id: light.corridor
state: 'on'
actions:
- action: input_boolean.turn_on
target:
entity_id: input_boolean.corridor_light_auto_mode
- action: scene.turn_on
data_template:
entity_id: scene.off_light
transition: 2
- id: apply_scene
alias: apply_scene
initial_state: true
triggers:
- trigger: state
entity_id: input_select.scenes
actions:
- action: scene.turn_on
data_template:
entity_id: scene.{{trigger.to_state.state}}
transition: 2
- id: switch_on_full_corridor_lamps
alias: switch_on_full_corridor_lamps
initial_state: true
triggers:
- trigger: state
entity_id: binary_sensor.open_kitchen_motion_sensor
to: 'on'
- trigger: state
entity_id: binary_sensor.entrance_door_contact
to: 'on'
conditions:
- condition: state
entity_id: input_boolean.corridor_light_auto_mode
state: 'on'
actions:
- action: scene.turn_on
target:
entity_id: scene.full
- alias: start_restart_corridor_light_timer
id: start_restart_corridor_light_timer
triggers:
- trigger: state
entity_id: binary_sensor.open_kitchen_motion_sensor
from: 'on'
to: 'off'
- trigger: state
entity_id: binary_sensor.entrance_door_contact
from: 'on'
to: 'off'
- trigger: state
entity_id: light.corridor
to: 'on'
conditions:
- condition: state
entity_id: input_boolean.corridor_light_auto_mode
state: 'on'
- condition: state
entity_id: light.corridor
state: 'on'
actions:
- action: timer.start
data:
duration: '{{ states(''input_number.corridor_light_limit_minutes'') | int *
60 }}'
target:
entity_id: timer.corridor_light
- alias: switch_off_corridor_lamps
id: switch_off_corridor_lamps
triggers:
- trigger: event
event_type: timer.finished
event_data:
entity_id: timer.corridor_light
conditions:
- condition: state
entity_id: input_boolean.corridor_light_auto_mode
state: 'on'
- condition: state
entity_id: binary_sensor.open_kitchen_motion_sensor
state: 'off'
- condition: state
entity_id: binary_sensor.entrance_door_contact
state: 'off'
- condition: state
entity_id: light.corridor
state: 'on'
actions:
- action: scene.turn_on
target:
entity_id: scene.off_light
- id: water leak
alias: water leak
description: water leak
mode: single
triggers:
- trigger: state
entity_id:
- binary_sensor.toilet_water_leak
to: 'on'
action:
- service: notify.mobile_app_artemevk
data:
title: Протечка
message: Обнаружена протечка
data:
url: /lovelace/main
push:
sound:
name: alarm.caf
critical: 1
volume: 1.0
- id: power_protection
alias: power protection
description: power protection
mode: single
triggers:
- trigger: numeric_state
entity_id:
- sensor.a_power
- sensor.b_power
- sensor.c_power
for:
hours: 0
minutes: 1
seconds: 0
above: 6000
action:
- service: notify.mobile_app_artemevk
data:
title: Потребление электроэнергии
message: '{{ states(''sensor.msg_power_protection'') }}'
data:
url: /lovelace/main
importance: high
persistent: true
vibrationPattern: 100, 1000, 100, 1000, 100
push:
sound:
name: alarm.caf
critical: 1
volume: 0.2
- service: telegram_bot.send_message
data_template:
target: secret tlg_user1_id
title: '#alarm'
message: '{{ states(''sensor.msg_power_protection'') }}'
inline_keyboard:
- Главное меню:/mm
- id: temperature_protection
alias: temperature protection
description: temperature protection
mode: single
triggers:
- trigger: numeric_state
entity_id:
- sensor.1st_floor_bedroom_temperature
- sensor.bathhouse_climate_temperature
- sensor.childrens_room_climate_temperature
- sensor.open_kitchen_temperature
- sensor.second_floor_climate_temperature
- sensor.toilet_climate_temperature
for:
hours: 0
minutes: 5
seconds: 0
below: 5
action:
- service: notify.mobile_app_artemevk
data:
title: Потребление электроэнергии
message: '{{ states(''sensor.msg_temperature_protection'') }}'
data:
url: /lovelace/main
importance: high
persistent: true
vibrationPattern: 100, 1000, 100, 1000, 100
push:
sound:
name: alarm.caf
critical: 1
volume: 0.2
- service: telegram_bot.send_message
data_template:
target: secret tlg_user1_id
title: '#alarm'
message: '{{ states(''sensor.msg_temperature_protection'') }}'
inline_keyboard:
- Главное меню:/mm
- id: Разрешить перевод в режим энергосбережения
alias: eco_mode_resolution_on
initial_state: true
trigger:
- platform: time
at: '15:32:00'
condition:
- condition: state
entity_id: input_boolean.eco_mode_resolution
state: 'off'
action:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.eco_mode_resolution
- id: Уведомление о разрешении перевода в режим энергосбережения
alias: eco_mode_resolution_on_notify
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.eco_mode_resolution
to: 'on'
action:
- service: notify.tlg_user1_id
data:
message: '{{"\U0001F343"}} Разрешен перевод в режим энергосбережения.'
- service: notify.mobile_app_artemevk
data:
message: '{{"\U0001F343"}} Разрешен перевод в режим энергосбережения.'
- id: Уведомление об активировации запрета включения режима энергосбережения
alias: eco_mode_resolution_off_notify
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.eco_mode_resolution
to: 'off'
action:
- service: notify.tlg_user1_id
data:
message: '{{"\U0001F342"}} Активировирован запрет включения режима энергосбережения.'
- service: notify.mobile_app_artemevk
data:
message: '{{"\U0001F342"}} Активировирован запрет включения режима энергосбережения.'
- id: Экономичный режим энергопотребления
alias: economical_power_consumption_mode
initial_state: true
trigger:
- platform: time
at: '23:45:00'
condition:
- condition: state
entity_id: input_boolean.eco_mode_resolution
state: 'on'
- condition: state
entity_id: binary_sensor.eco_mode_status
state: 'off'
- '{{ min([state_attr(''climate.1st_floor_bedroom_heater_thermostat'', ''temperature''),
state_attr(''climate.1st_floor_bedroom_thermostat'', ''temperature''), state_attr(''climate.open_kitchen_heater_thermostat'',
''temperature''), state_attr(''climate.open_kitchen_thermostat'', ''temperature''),
state_attr(''climate.childrens_room_heater_thermostat'', ''temperature'')]) >
7 }}'
action:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.eco_mode_status
- service: climate.set_temperature
target:
entity_id: climate.1st_floor_bedroom_heater_thermostat
data:
temperature: '{{ state_attr(''climate.1st_floor_bedroom_heater_thermostat'',
''temperature'') -2 }}'
- service: climate.set_temperature
target:
entity_id: climate.1st_floor_bedroom_thermostat
data:
temperature: '{{ state_attr(''climate.1st_floor_bedroom_thermostat'', ''temperature'')
-2 }}'
- service: climate.set_temperature
target:
entity_id: climate.open_kitchen_heater_thermostat
data:
temperature: '{{ state_attr(''climate.open_kitchen_heater_thermostat'', ''temperature'')
-2 }}'
- service: climate.set_temperature
target:
entity_id: climate.open_kitchen_thermostat
data:
temperature: '{{ state_attr(''climate.open_kitchen_thermostat'', ''temperature'')
-2 }}'
- service: climate.set_temperature
target:
entity_id: climate.childrens_room_heater_thermostat
data:
temperature: '{{ state_attr(''climate.childrens_room_heater_thermostat'', ''temperature'')
-2 }}'
- service: switch.turn_off
target:
entity_id: switch.water_heater
- id: Стандартный режим энергопотребления
alias: standard_power_consumption_mode
initial_state: true
trigger:
- platform: time
at: 05:30:00
- platform: state
entity_id: input_boolean.eco_mode_resolution
to: 'off'
condition:
- condition: state
entity_id: binary_sensor.eco_mode_status
state: 'on'
action:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.eco_mode_status
- service: climate.set_temperature
target:
entity_id: climate.1st_floor_bedroom_heater_thermostat
data:
temperature: '{{ state_attr(''climate.1st_floor_bedroom_heater_thermostat'',
''temperature'') +2 }}'
- service: climate.set_temperature
target:
entity_id: climate.1st_floor_bedroom_thermostat
data:
temperature: '{{ state_attr(''climate.1st_floor_bedroom_thermostat'', ''temperature'')
+2 }}'
- service: climate.set_temperature
target:
entity_id: climate.open_kitchen_heater_thermostat
data:
temperature: '{{ state_attr(''climate.open_kitchen_heater_thermostat'', ''temperature'')
+2 }}'
- service: climate.set_temperature
target:
entity_id: climate.open_kitchen_thermostat
data:
temperature: '{{ state_attr(''climate.open_kitchen_thermostat'', ''temperature'')
+2 }}'
- service: climate.set_temperature
target:
entity_id: climate.childrens_room_heater_thermostat
data:
temperature: '{{ state_attr(''climate.childrens_room_heater_thermostat'', ''temperature'')
+2 }}'
- service: switch.turn_on
target:
entity_id: switch.water_heater
- id: Управление воротами
alias: gate_step_mode_tlg
triggers:
- trigger: event
event_type: telegram_callback
event_data:
command: /gate_step_mode
- trigger: mqtt
topic: zigbee2mqtt/remote/action
payload: button_4_single
- trigger: mqtt
topic: zigbee2mqtt/remote/action
payload: button_5_single
- trigger: mqtt
topic: zigbee2mqtt/gates_remote/action
payload: 1_single
actions:
- action: script.turn_on
target:
entity_id:
- script.gate_step_mode
- id: Управление калиткой
alias: gate_pedestrian_crossing_tlg
triggers:
- trigger: event
event_type: telegram_callback
event_data:
command: /gate_pedestrian_crossing
- trigger: device
domain: mqtt
device_id: 1483a1bf0791f39b789ccac73cc01fa8
type: action
subtype: button_1_single
- trigger: device
domain: mqtt
device_id: 1483a1bf0791f39b789ccac73cc01fa8
type: action
subtype: button_8_single
- trigger: mqtt
topic: zigbee2mqtt/gates_remote/action
payload: 2_single
actions:
- action: script.turn_on
target:
entity_id:
- script.gate_pedestrian_crossing
- alias: open_kitchen_heater_thermostat Set Temperature
trigger:
- platform: state
entity_id: sensor.open_kitchen_setpoint
action:
- service: climate.set_temperature
target:
entity_id: climate.open_kitchen_heater_thermostat
data:
temperature: '{{ state_attr(''climate.open_kitchen_thermostat'', ''temperature'')
}}'
- alias: open_kitchen_thermostat Set Temperature
trigger:
- platform: state
entity_id: sensor.open_kitchen_heater_setpoint
action:
- service: climate.set_temperature
target:
entity_id: climate.open_kitchen_thermostat
data:
temperature: '{{ state_attr(''climate.open_kitchen_heater_thermostat'', ''temperature'')
}}'
- alias: outdoor_light_auto_mode_reset
id: outdoor_light_auto_mode_reset
initial_state: true
triggers:
- trigger: numeric_state
entity_id: sun.sun
attribute: elevation
above: -2.0
conditions:
- condition: or
conditions:
- condition: state
entity_id: input_boolean.outdoor_light_auto_mode
state: 'off'
- condition: state
entity_id: light.outdoor
state: 'on'
actions:
- action: light.turn_off
target:
entity_id: light.outdoor
- action: input_boolean.turn_on
target:
entity_id: input_boolean.outdoor_light_auto_mode
- alias: switch_on_light_porch
id: switch_on_light_porch
triggers:
- trigger: state
entity_id: binary_sensor.outdoor_motion
to: 'on'
- trigger: template
value_template: '{{ states(''zone.home'') | int > 0 }}'
condition:
- condition: state
entity_id: input_boolean.outdoor_light_auto_mode
state: 'on'
- condition: state
entity_id: light.outdoor
state: 'off'
- condition: state
entity_id: sun.sun
state: below_horizon
actions:
- action: light.turn_on
target:
entity_id: light.outdoor
- alias: start_restart_outdoor_light_timer
id: start_restart_outdoor_light_timer
triggers:
- trigger: state
entity_id: binary_sensor.outdoor_motion
from: 'on'
to: 'off'
- trigger: state
entity_id: light.outdoor
to: 'on'
conditions:
- condition: state
entity_id: input_boolean.outdoor_light_auto_mode
state: 'on'
- condition: state
entity_id: light.outdoor
state: 'on'
actions:
- action: timer.start
data:
duration: '{{ states(''input_number.outdoor_light_limit_minutes'') | int * 60
}}'
target:
entity_id: timer.outdoor_light
- alias: switch_off_light_porch
id: switch_off_light_porch
triggers:
- trigger: event
event_type: timer.finished
event_data:
entity_id: timer.outdoor_light
conditions:
- condition: state
entity_id: input_boolean.outdoor_light_auto_mode
state: 'on'
- condition: state
entity_id: binary_sensor.outdoor_motion
state: 'off'
- condition: state
entity_id: light.outdoor
state: 'on'
actions:
- action: light.turn_off
target:
entity_id: light.outdoor
- alias: motion_notification
id: motion_notification
trigger:
- platform: state
entity_id:
- binary_sensor.cameras_motion
- binary_sensor.porch_motion_protect_occupancy
to: 'on'
condition:
alias: alarm not disarmed
not:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: disarmed
action:
- delay: 3
- service: script.create_photos
- delay: 5
- service: script.send_photos
- service: notify.alarm
data:
title: Охрана
message: Зафиксировано движение
data:
url: /lovelace/security
importance: high
persistent: true
vibrationPattern: 100, 1000, 100, 1000, 100
ledColor: red
image: /media/local/porch_camera_last_snapshot.jpg
content-type: image
push:
sound:
name: default
critical: 1
volume: 0.2
actions:
- action: ALARM
title: Sound Alarm
destructive: true
icon: sfsymbols:bell
- action: SILENCE
title: Silence Alarm
icon: sfsymbols:bell.slash
- id: Напоминание о необходимости снять дом с охраны
alias: reminder_to_disarm_the_house
initial_state: false
trigger:
platform: state
entity_id: device_tracker.artemevk
to: home
condition:
not:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: disarmed
action:
- service: notify.mobile_app_artemevk
data:
title: Охрана
message: Не забудь снять дом с охраны
data:
url: /lovelace/security
importance: high
persistent: true
vibrationPattern: 100, 1000, 100, 1000, 100
push:
sound:
name: default
critical: 1
volume: 0.2
actions:
- action: disarmed
title: Снять с охраны
icon: sfsymbols:lock.open
- id: Напоминание о необходимости снять дом с охраны АПН
alias: reminder_to_disarm_the_house_artemevp
initial_state: false
trigger:
platform: state
entity_id: device_tracker.artemevp
to: home
condition:
not:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: disarmed
action:
- service: notify.mobile_app_artemevp
data:
title: Охрана
message: Не забудь снять дом с охраны
data:
url: /lovelace/security
importance: high
persistent: true
vibrationPattern: 100, 1000, 100, 1000, 100
push:
sound:
name: default
critical: 1
volume: 0.2
actions:
- action: disarmed
title: Снять с охраны
icon: sfsymbols:lock.open
- alias: disarmed
trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: disarmed
action:
- service: alarm_control_panel.alarm_disarm
target:
entity_id: alarm_control_panel.home_alarm
- alias: Trigger alarm while armed away
trigger:
- platform: state
entity_id: binary_sensor.entrance_door_contact
to: 'on'
- platform: state
entity_id: binary_sensor.open_kitchen_motion_sensor
to: 'on'
condition:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_away
action:
service: alarm_control_panel.alarm_trigger
target:
entity_id: alarm_control_panel.home_alarm
- alias: Trigger alarm while armed home
triggers:
- trigger: state
entity_id:
- binary_sensor.porch_motion_protect_occupancy
- binary_sensor.cameras_motion
to: 'on'
conditions:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_home
- condition: state
entity_id: binary_sensor.porch_motion_protect_occupancy
state: 'on'
- condition: state
entity_id: binary_sensor.cameras_motion
state: 'on'
actions:
- action: alarm_control_panel.alarm_trigger
target:
entity_id: alarm_control_panel.home_alarm
- alias: Send notification when alarm triggered
trigger:
- platform: state
entity_id: alarm_control_panel.home_alarm
to: triggered
action:
- service: notify.alarm
data:
title: Охрана
message: Сработала сигнализация
data:
url: /lovelace/security
push:
sound:
name: alarm.caf
critical: 1
volume: 1.0
actions:
- action: ALARM
title: Sound Alarm
destructive: true
icon: sfsymbols:bell
- action: SILENCE
title: Silence Alarm
icon: sfsymbols:bell.slash
- action: disarmed
title: Снять с охраны
icon: sfsymbols:lock.open
- id: automatic arming
alias: automatic arming
trigger:
- platform: template
value_template: '{{ states(''zone.home'') | int == 0 }}'
condition:
not:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_away
action:
- service: alarm_control_panel.alarm_arm_away
target:
entity_id: alarm_control_panel.home_alarm
- id: automatic disarming
alias: automatic disarming
trigger:
- platform: template
value_template: '{{ states(''zone.home'') | int > 0 }}'
condition:
not:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: disarmed
action:
- service: alarm_control_panel.alarm_disarm
target:
entity_id: alarm_control_panel.home_alarm
- id: Create photos when arming
alias: Create photos when arming
triggers:
- trigger: state
entity_id:
- alarm_control_panel.home_alarm
to: arming
actions:
- action: script.create_photos
- id: alarm notify armed
alias: alarm notify armed
trigger:
- platform: state
entity_id: alarm_control_panel.home_alarm
to:
- armed_away
action:
- service: script.send_photos
- service: notify.alarm
data:
title: Охрана
message: Дом поставлен на охрану.
data:
url: /lovelace/security
importance: high
persistent: true
vibrationPattern: 100, 1000, 100, 1000, 100
ledColor: red
image: /media/local/porch_camera_last_snapshot.jpg
content-type: image
- id: alarm notify disarmed
alias: alarm notify disarmed
trigger:
- platform: state
entity_id: alarm_control_panel.home_alarm
not_from:
- arming
- armed_home
to:
- disarmed
action:
- service: notify.alarm
data:
title: Охрана
message: Дом снят с охраны.
data:
url: /lovelace/security
importance: high
persistent: true
vibrationPattern: 100, 1000, 100, 1000, 100
ledColor: red
- id: tlg_action_disarm
alias: tlg_action_disarm
initial_state: true
mode: single
triggers:
- trigger: event
event_type: telegram_callback
event_data:
command: /alarm_disarm
actions:
- action: alarm_control_panel.alarm_disarm
target:
entity_id: alarm_control_panel.home_alarm
- service: telegram_bot.edit_message
data:
chat_id: '{{ trigger.event.data.chat_id }}'
message_id: '{{ trigger.event.data.message.message_id }}'
title: '#охрана'
message: '{{''\U0001F6A8''}} Меню охраны
Текущий режим:
{%- if states(''alarm_control_panel.home_alarm'') == ''disarmed'' %}{{" Нет
охраны"}}
{% elif states(''alarm_control_panel.home_alarm'') == ''armed_home'' %}{{"
Дома"}}
{% elif states(''alarm_control_panel.home_alarm'') == ''armed_away'' %}{{"
Не дома"}}
{% endif -%}
Выберите режим:
'
inline_keyboard:
- Не дома:/alarm_arm_away, Дома:/alarm_arm_home
- Нет охраны:/alarm_disarm
- Главное меню:/mm
- id: tlg_action_arm_home
alias: tlg_action_arm_home
initial_state: true
mode: single
triggers:
- trigger: event
event_type: telegram_callback
event_data:
command: /alarm_arm_home
actions:
- action: alarm_control_panel.alarm_arm_home
target:
entity_id: alarm_control_panel.home_alarm
- service: telegram_bot.edit_message
data:
chat_id: '{{ trigger.event.data.chat_id }}'
message_id: '{{ trigger.event.data.message.message_id }}'
title: '#охрана'
message: '{{''\U0001F6A8''}} Меню охраны
Текущий режим:
{%- if states(''alarm_control_panel.home_alarm'') == ''disarmed'' %}{{" Нет
охраны"}}
{% elif states(''alarm_control_panel.home_alarm'') == ''armed_home'' %}{{"
Дома"}}
{% elif states(''alarm_control_panel.home_alarm'') == ''armed_away'' %}{{"
Не дома"}}
{% endif -%}
Выберите режим:
'
inline_keyboard:
- Не дома:/alarm_arm_away, Дома:/alarm_arm_home
- Нет охраны:/alarm_disarm
- Главное меню:/mm
- id: tlg_action_arm_away
alias: tlg_action_arm_away
initial_state: true
mode: single
triggers:
- trigger: event
event_type: telegram_callback
event_data:
command: /alarm_arm_away
actions:
- action: alarm_control_panel.alarm_arm_away
target:
entity_id: alarm_control_panel.home_alarm
- service: telegram_bot.edit_message
data:
chat_id: '{{ trigger.event.data.chat_id }}'
message_id: '{{ trigger.event.data.message.message_id }}'
title: '#охрана'
message: Команда принята. Время постановки на охрану 30 секунд. Ожидайте подтверждение.
- delay: 31
- service: telegram_bot.edit_message
data:
chat_id: '{{ trigger.event.data.chat_id }}'
message_id: '{{ trigger.event.data.message.message_id }}'
title: '#охрана'
message: '{{''\U0001F6A8''}} Меню охраны
Текущий режим:
{%- if states(''alarm_control_panel.home_alarm'') == ''disarmed'' %}{{" Нет
охраны"}}
{% elif states(''alarm_control_panel.home_alarm'') == ''armed_home'' %}{{"
Дома"}}
{% elif states(''alarm_control_panel.home_alarm'') == ''armed_away'' %}{{"
Не дома"}}
{% endif -%}
Выберите режим:
'
inline_keyboard:
- Не дома:/alarm_arm_away, Дома:/alarm_arm_home
- Нет охраны:/alarm_disarm
- Главное меню:/mm
- id: Сжатие базы
alias: 00_purge_everyday
initial_state: true
trigger:
- platform: time
at: 01:00:00
action:
- service: recorder.purge
data:
keep_days: 5
repack: true
- id: l1k3
alias: push_HA_configuration_to_GitHub_repo
initial_state: true
trigger:
- platform: time
at: '23:23:23'
action:
- service: shell_command.push_to_github
- id: start_offline_timer
alias: start_offline_timer
initial_state: true
trigger:
- platform: state
entity_id:
- binary_sensor.iflat_connection
to: 'off'
action:
- service: timer.start
entity_id: timer.iflat_offline
- id: iflat_disconnected
alias: iflat_disconnected
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.iflat_offline
action:
- service: notify.tlg_user1_id
data:
title: '#system'
message: Сервер iFlat не отвечает!
- service: notify.mobile_app_artemevk
data:
message: Сервер iFlat не отвечает!
- id: cancel_offline_timer
alias: cancel_offline_timer
initial_state: true
trigger:
- platform: state
entity_id:
- binary_sensor.iflat_connection
to: 'on'
action:
- service: timer.cancel
entity_id: timer.iflat_offline
- id: porch_timelapce
alias: porch_timelapce
initial_state: false
trigger:
- platform: time_pattern
minutes: /15
condition:
alias: Time 9~18
condition: time
after: '9:00:00'
before: '18:00:00'
action:
- service: camera.snapshot
target:
entity_id: camera.courtyard_camera_mainstream
data:
filename: /config/tmp/courtyard_camera_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg
- alias: Telegram bot main menu
triggers:
- trigger: event
event_type: telegram_command
event_data:
command: /start
- trigger: event
event_type: telegram_command
event_data:
command: /mm
- trigger: event
event_type: telegram_callback
event_data:
command: /mm
actions:
- action: telegram_bot.send_message
data_template:
target: '{{ trigger.event.data.user_id }}'
message: 'Добро пожаловать в главное меню. Выберите действие:'
inline_keyboard:
- Ворота:/gate_step_mode, Калитка:/gate_pedestrian_crossing
- Отчет о системе:/report, Батарейки:/battaries_states
- Прогноз погоды:/forecast, Погода в доме:/home_climate_report
- Подготовить дом:/prepare_the_house, Вкл. антизамерз.:/antifrost_mode
- Фото:/photo
- '{{''🚨''}} Меню охраны:/alarm_panel'
- alias: Telegram alarm menu
trigger:
- platform: event
event_type: telegram_callback
event_data:
command: /alarm_panel
action:
- service: telegram_bot.delete_message
data:
chat_id: '{{ trigger.event.data.chat_id }}'
message_id: '{{ trigger.event.data.message.message_id }}'
- service: telegram_bot.send_message
data_template:
target: '{{ trigger.event.data.user_id }}'
title: '#охрана'
message: '{{''\U0001F6A8''}} Меню охраны
Текущий режим:
{%- if states(''alarm_control_panel.home_alarm'') == ''disarmed'' %}{{" Нет
охраны"}}
{% elif states(''alarm_control_panel.home_alarm'') == ''armed_home'' %}{{"
Дома"}}
{% elif states(''alarm_control_panel.home_alarm'') == ''armed_away'' %}{{"
Не дома"}}
{% endif -%}
Выберите режим:
'
inline_keyboard:
- Не дома:/alarm_arm_away, Дома:/alarm_arm_home
- Нет охраны:/alarm_disarm
- Главное меню:/mm
- id: Отчет при запуске системы
alias: start_message
initial_state: true
trigger:
- platform: homeassistant
event: start
action:
- service: notify.tlg_user1_id
data:
title: '#system'
message: '{{"\U0001F5A5"}} Зафиксирован запуск. Отчет о состоянии будет через
1 минуту.
'
- delay: 00:01:00
- service: notify.tlg_user1_id
data:
title: '#system'
message: '{{ states(''sensor.msg_report'') }}
{{ states(''sensor.batteries_states_msg'') }}
'
- delay: 00:00:01
- service: notify.tlg_user1_id
data:
message: 'Добро пожаловать в главное меню. Выберите действие:'
data:
inline_keyboard:
- Ворота:/gate_step_mode, Калитка:/gate_pedestrian_crossing
- Отчет о системе:/report, Батарейки:/battaries_states
- Прогноз погоды:/forecast, Погода в доме:/home_climate_report
- Подготовить дом:/prepare_the_house, Вкл. антизамерз.:/antifrost_mode
- Фото:/photo
- id: Отчет о системе по запросу
alias: send_report
initial_state: true
trigger:
- platform: event
event_type: telegram_callback
event_data:
command: /report
- platform: event
event_type: telegram_command
event_data:
command: /report
action:
- service: telegram_bot.delete_message
data:
chat_id: '{{ trigger.event.data.chat_id }}'
message_id: '{{ trigger.event.data.message.message_id }}'
- service: telegram_bot.send_message
data_template:
target: '{{ trigger.event.data.user_id }}'
title: '#system'
message: '{{ states(''sensor.msg_report'') }}
{{ states(''sensor.batteries_states_msg'') }}
'
inline_keyboard:
- Главное меню:/mm
- id: Отправить отчет о состоянии батареек
alias: send_battaries_states_msg
initial_state: true
trigger:
- platform: event
event_type: telegram_callback
event_data:
command: /battaries_states
- platform: numeric_state
entity_id: sensor.min_batteries_state
below: 40
action:
- service: telegram_bot.delete_message
data:
chat_id: '{{ trigger.event.data.chat_id }}'
message_id: '{{ trigger.event.data.message.message_id }}'
- service: telegram_bot.send_message
data_template:
target: '{{ trigger.event.data.user_id }}'
title: '#system'
message: '{{ states(''sensor.batteries_states_msg'') }}
---------------------
entrance door - CR1632
kitchen living room motion - CR2032
childrens room climate - CR2032
porch motion protect - 3xAAA
toilet climate - CR2032
toilet water leak - CR2032
'
inline_keyboard:
- Главное меню:/mm
- id: Отчет при потере объектов
alias: send_report_when_objects_are_lost
initial_state: true
trigger:
- platform: state
entity_id: sensor.unavailable_objects
for: 00:03:00
condition:
condition: and
conditions:
- condition: template
value_template: '{{ trigger.to_state.state > trigger.from_state.state }}'
action:
- service: notify.tlg_user1_id
data:
message: '{{"\U0000203C"}} Обнаружена новая неисправность
{{ states(''sensor.msg_report'') }}
'
data:
inline_keyboard:
- Главное меню:/mm
- id: Фото по запросу
alias: send_photos_tlg
initial_state: true
trigger:
- platform: event
event_type: telegram_callback
event_data:
command: /photo
action:
- service: telegram_bot.delete_message
data:
chat_id: '{{ trigger.event.data.chat_id }}'
message_id: '{{ trigger.event.data.message.message_id }}'
- service: telegram_bot.send_message
data_template:
target: '{{ trigger.event.data.user_id }}'
message: '{{"\U0001F4F8"}} Команда принята. Фотографии будут отправлены через
5 секунд
'
- service: script.create_photos
- delay: 00:00:05
- service: telegram_bot.delete_message
data:
chat_id: '{{ trigger.event.data.chat_id }}'
message_id: last
- service: telegram_bot.send_photo
data:
file: /media/parking_camera_last_snapshot.jpg
target: '{{ trigger.event.data.chat_id }}'
disable_notification: true
- service: telegram_bot.send_photo
data:
file: /media/porch_camera_last_snapshot.jpg
target: '{{ trigger.event.data.chat_id }}'
disable_notification: true
- service: telegram_bot.send_photo
data:
file: /media/courtyard_camera_last_snapshot.jpg
target: '{{ trigger.event.data.chat_id }}'
inline_keyboard:
- Главное меню:/mm
- id: Погода в доме
alias: home_climate_report
initial_state: true
trigger:
- platform: event
event_type: telegram_callback
event_data:
command: /home_climate_report
action:
- service: telegram_bot.delete_message
data:
chat_id: '{{ trigger.event.data.chat_id }}'
message_id: '{{ trigger.event.data.message.message_id }}'
- service: telegram_bot.send_message
data_template:
target: '{{ trigger.event.data.user_id }}'
message: '{{"\U0000231A"}} Отчет за {{ states(''sensor.time_date'') }}
{{ states(''sensor.msg_open_kitchen_climate'') }}
{{ states(''sensor.msg_1st_floor_bedroom_climate'')}}
{{ states(''sensor.msg_childrens_room_climate'')}}
{{ states(''sensor.msg_toilet_climate'')}}
'
inline_keyboard:
- Главное меню:/mm
- id: Подготовить дом тлг
alias: tlg_prepare_the_house
initial_state: true
triggers:
- trigger: event
event_type: telegram_callback
event_data:
command: /prepare_the_house
action:
- service: telegram_bot.delete_message
data:
chat_id: '{{ trigger.event.data.chat_id }}'
message_id: '{{ trigger.event.data.message.message_id }}'
- service: telegram_bot.send_message
data_template:
target: '{{ trigger.event.data.user_id }}'
message: '{{"\U00002668"}} Команда принята. Подтвержение будет через 5 секунд
'
- service: script.turn_on
target:
entity_id:
- script.prepare_the_house
- delay: 00:00:05
- service: telegram_bot.delete_message
data:
chat_id: '{{ trigger.event.data.chat_id }}'
message_id: last
- service: telegram_bot.send_message
data_template:
target: '{{ trigger.event.data.user_id }}'
message: '{{"\U0000231A"}} {{ states(''sensor.time_date'') }}
{{"\U00002668"}} Дом подготавливается.
{{ states(''sensor.msg_open_kitchen_climate'') }}
{{ states(''sensor.msg_1st_floor_bedroom_climate'')}}
{{ states(''sensor.msg_childrens_room_climate'')}}
{{ states(''sensor.msg_toilet_climate'')}}
'
inline_keyboard:
- Главное меню:/mm
- id: Подготовить дом
alias: prepare_the_house
initial_state: true
triggers:
- trigger: time
at: input_datetime.prepare_the_house_dt
actions:
- action: script.turn_on
target:
entity_id:
- script.prepare_the_house
- action: notify.mobile_app_artemevk
data:
title: Отопление
message: Активирована подготовка дома
data:
url: /lovelace/main
- id: Дом в режим антизамерзания
alias: tlg_antifrost_mode
initial_state: true
trigger:
- platform: event
event_type: telegram_callback
event_data:
command: /antifrost_mode
action:
- service: telegram_bot.delete_message
data:
chat_id: '{{ trigger.event.data.chat_id }}'
message_id: '{{ trigger.event.data.message.message_id }}'
- service: telegram_bot.send_message
data_template:
target: '{{ trigger.event.data.user_id }}'
message: '{{"\U00002744"}} Команда принята. Подтвержение будет через 5 секунд
'
- service: script.turn_on
target:
entity_id:
- script.antifrost_mode
- delay: 00:00:05
- service: telegram_bot.delete_message
data:
chat_id: '{{ trigger.event.data.chat_id }}'
message_id: last
- service: telegram_bot.send_message
data_template:
target: '{{ trigger.event.data.user_id }}'
message: '{{"\U0000231A"}} {{ states(''sensor.time_date'') }}
{{"\U00002744"}} Дом переведен в режим антизамерзания.
{{ states(''sensor.msg_open_kitchen_climate'') }}
{{ states(''sensor.msg_1st_floor_bedroom_climate'')}}
{{ states(''sensor.msg_childrens_room_climate'')}}
{{ states(''sensor.msg_toilet_climate'')}}
'
inline_keyboard:
- Главное меню:/mm
- alias: send_morning_climate_report
id: Утренний отчет о погоде
initial_state: true
trigger:
- platform: time
at: 07:30:00
action:
- service: camera.snapshot
target:
entity_id: camera.courtyard_camera_mainstream
data:
filename: /media/courtyard_camera_last_snapshot.jpg
- delay: 5
- service: telegram_bot.send_photo
data:
file: /media/courtyard_camera_last_snapshot.jpg
target:
- secret tlg_user1_id
- secret tlg_user2_id
- secret tlg_user3_id
- secret tlg_user4_id
- secret tlg_user5_id
caption: '{{"\U0001F300"}} Климат отчет за {{ states("sensor.time_date") }}
{{ "\n" -}} {{ "\n" -}}{{"\U0001F3E2"}} *МОСКВА:* {{ "\n" -}}{{"\U0001F321"}}
Температура: {{state_attr("weather.yandex_weather_moscow", "temperature")}}
°C {{ "\n" -}}{{"\U0001F32C"}} Ветер: {{state_attr("weather.yandex_weather_moscow",
"wind_speed")}} м/с {{ "\n" -}}_К {{ as_timestamp(state_attr("weather.yandex_weather_moscow",
"forecast")[1].datetime) | timestamp_custom(''%H:%M'') }} ожидается:_ {{ "\n"
-}}{{"\U0001F321"}} Прогноз: {{state_attr("weather.yandex_weather_moscow",
"forecast")[1].native_temperature}} °C {{ "\n" -}}{{"\U0001F326"}} Условия:
{% if state_attr("weather.yandex_weather_moscow", "forecast")[1].condition
== ''sunny'' %}{{"солнечно"}} {% elif state_attr("weather.yandex_weather_moscow",
"forecast")[1].condition == ''cloudy'' %}{{"облачно"}} {% elif state_attr("weather.yandex_weather_moscow",
"forecast")[1].condition == ''partlycloudy'' %}{{"переменная облачность"}}
{% elif state_attr("weather.yandex_weather_moscow", "forecast")[1].condition
== ''pouring'' %}{{"ливень"}} {% elif state_attr("weather.yandex_weather_moscow",
"forecast")[1].condition == ''rainy'' %}{{"дождь"}} {% elif state_attr("weather.yandex_weather_moscow",
"forecast")[1].condition == ''snowy'' %}{{"снег"}} {% elif state_attr("weather.yandex_weather_moscow",
"forecast")[1].condition == ''clear-night'' %}{{"ясно"}} {% else %}{{ state_attr("weather.yandex_weather_moscow",
"forecast")[1].condition }} {% endif %} {{ "\n" -}} {{ "\n" -}}{{"\U0001F3E1"}}
*МАТВЕЙКОВО:* {{ "\n" -}}{{"\U0001F321"}} Температура: {{state_attr("weather.yandex_weather",
"temperature")}} °C {{ "\n" -}}{{"\U0001F32C"}} Ветер: {{state_attr("weather.yandex_weather",
"wind_speed")}} м/с {{ "\n" -}}_К {{ as_timestamp(state_attr("weather.yandex_weather",
"forecast")[1].datetime) | timestamp_custom(''%H:%M'') }} ожидается:_ {{ "\n"
-}}{{"\U0001F321"}} Прогноз: {{state_attr("weather.yandex_weather", "forecast")[1].native_temperature}}
°C {{ "\n" -}}{{"\U0001F326"}} Условия: {% if state_attr("weather.yandex_weather",
"forecast")[1].condition == ''sunny'' %}{{"солнечно"}} {% elif state_attr("weather.yandex_weather",
"forecast")[1].condition == ''cloudy'' %}{{"облачно"}} {% elif state_attr("weather.yandex_weather",
"forecast")[1].condition == ''partlycloudy'' %}{{"переменная облачность"}}
{% elif state_attr("weather.yandex_weather", "forecast")[1].condition == ''pouring''
%}{{"ливень"}} {% elif state_attr("weather.yandex_weather", "forecast")[1].condition
== ''rainy'' %}{{"дождь"}} {% elif state_attr("weather.yandex_weather", "forecast")[1].condition
== ''snowy'' %}{{"снег"}} {% elif state_attr("weather.yandex_weather", "forecast")[1].condition
== ''clear-night'' %}{{"ясно"}} {% else %}{{ state_attr("weather.yandex_weather",
"forecast")[1].condition }} {% endif %}
'
inline_keyboard:
- Главное меню:/mm
- alias: send_climate_report
id: Отчет о погоде по запросу
initial_state: true
trigger:
- platform: event
event_type: telegram_callback
event_data:
command: /forecast
- platform: event
event_type: telegram_command
event_data:
command: /forecast
action:
- service: telegram_bot.send_message
data_template:
target: '{{ trigger.event.data.user_id }}'
disable_notification: true
title: '#weather'
message: '{{"\U0001F300"}} Ожидайте
'
- service: camera.snapshot
target:
entity_id: camera.courtyard_camera_mainstream
data:
filename: /media/courtyard_camera_last_snapshot.jpg
- delay: 00:00:05
- service: telegram_bot.delete_message
data_template:
message_id: last
chat_id: '{{ trigger.event.data.chat_id }}'
- service: telegram_bot.send_photo
data:
file: /media/courtyard_camera_last_snapshot.jpg
target: '{{ trigger.event.data.user_id }}'
caption: '{{"\U0001F300"}} Климат отчет за {{ states("sensor.time_date") }}
{{ "\n" -}} {{ "\n" -}}{{"\U0001F3E2"}} *МОСКВА:* {{ "\n" -}}{{"\U0001F321"}}
Температура: {{state_attr("weather.yandex_weather_moscow", "temperature")}}
°C {{ "\n" -}}{{"\U0001F32C"}} Ветер: {{state_attr("weather.yandex_weather_moscow",
"wind_speed")}} м/с {{ "\n" -}}_К {{ as_timestamp(state_attr("weather.yandex_weather_moscow",
"forecast")[1].datetime) | timestamp_custom(''%H:%M'') }} ожидается:_ {{ "\n"
-}}{{"\U0001F321"}} Прогноз: {{state_attr("weather.yandex_weather_moscow",
"forecast")[1].native_temperature}} °C {{ "\n" -}}{{"\U0001F326"}} Условия:
{% if state_attr("weather.yandex_weather_moscow", "forecast")[1].condition
== ''sunny'' %}{{"солнечно"}} {% elif state_attr("weather.yandex_weather_moscow",
"forecast")[1].condition == ''cloudy'' %}{{"облачно"}} {% elif state_attr("weather.yandex_weather_moscow",
"forecast")[1].condition == ''partlycloudy'' %}{{"переменная облачность"}}
{% elif state_attr("weather.yandex_weather_moscow", "forecast")[1].condition
== ''pouring'' %}{{"ливень"}} {% elif state_attr("weather.yandex_weather_moscow",
"forecast")[1].condition == ''rainy'' %}{{"дождь"}} {% elif state_attr("weather.yandex_weather_moscow",
"forecast")[1].condition == ''snowy'' %}{{"снег"}} {% elif state_attr("weather.yandex_weather_moscow",
"forecast")[1].condition == ''clear-night'' %}{{"ясно"}} {% else %}{{ state_attr("weather.yandex_weather_moscow",
"forecast")[1].condition }} {% endif %} {{ "\n" -}} {{ "\n" -}}{{"\U0001F3E1"}}
*МАТВЕЙКОВО:* {{ "\n" -}}{{"\U0001F321"}} Температура: {{state_attr("weather.yandex_weather",
"temperature")}} °C {{ "\n" -}}{{"\U0001F32C"}} Ветер: {{state_attr("weather.yandex_weather",
"wind_speed")}} м/с {{ "\n" -}}_К {{ as_timestamp(state_attr("weather.yandex_weather",
"forecast")[1].datetime) | timestamp_custom(''%H:%M'') }} ожидается:_ {{ "\n"
-}}{{"\U0001F321"}} Прогноз: {{state_attr("weather.yandex_weather", "forecast")[1].native_temperature}}
°C {{ "\n" -}}{{"\U0001F326"}} Условия: {% if state_attr("weather.yandex_weather",
"forecast")[1].condition == ''sunny'' %}{{"солнечно"}} {% elif state_attr("weather.yandex_weather",
"forecast")[1].condition == ''cloudy'' %}{{"облачно"}} {% elif state_attr("weather.yandex_weather",
"forecast")[1].condition == ''partlycloudy'' %}{{"переменная облачность"}}
{% elif state_attr("weather.yandex_weather", "forecast")[1].condition == ''pouring''
%}{{"ливень"}} {% elif state_attr("weather.yandex_weather", "forecast")[1].condition
== ''rainy'' %}{{"дождь"}} {% elif state_attr("weather.yandex_weather", "forecast")[1].condition
== ''snowy'' %}{{"снег"}} {% elif state_attr("weather.yandex_weather", "forecast")[1].condition
== ''clear-night'' %}{{"ясно"}} {% else %}{{ state_attr("weather.yandex_weather",
"forecast")[1].condition }} {% endif %}
'
inline_keyboard:
- Главное меню:/mm