Last active
February 19, 2024 20:15
-
-
Save DivanX10/eb2e0a1a79892afccd8335a8766eea37 to your computer and use it in GitHub Desktop.
Home Assistant. Автоматизация. Холодильник. Дверь открыта. Тревога
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Это пример автоматизации для видео Home Assistant. Умный холодильник https://youtu.be/_98k1XfSJnw | |
alias: 'Кухня: Холодильник. Дверь открыта более 5 минут. Тревога (Для примера)' | |
description: >- | |
Если дверь холодильника будет открыта более 5 минут, то будет голосовое | |
предупреждение на шлюзе. | |
trigger: | |
- type: opened | |
platform: device | |
entity_id: binary_sensor.kholodilnik_lg_dver_contact | |
domain: binary_sensor | |
for: | |
hours: 0 | |
minutes: 5 | |
seconds: 0 | |
milliseconds: 0 | |
- platform: template | |
value_template: >- | |
{{ is_state("binary_sensor.kholodilnik_lg_dver_contact", "on") and (now() | |
- states.binary_sensor.kholodilnik_lg_dver_contact.last_changed).seconds > | |
300 }} | |
condition: | |
- condition: template | |
value_template: >- | |
{{ is_state("binary_sensor.kholodilnik_lg_dver_contact", "on") and (now() | |
- states.binary_sensor.kholodilnik_lg_dver_contact.last_changed).seconds > | |
300 }} | |
- condition: state | |
entity_id: switch.kukhnia_kholodilnik_dver_otkryta_trevoga | |
state: 'on' | |
action: | |
- service: script.tts_yandex_station_say | |
data: | |
device: media_player.yandex_station_XXXXXXXX01,media_player.yandex_station_XXXXXXXX02 (указываем свои яндекс колонки) | |
volume: 7 | |
message: Хозяин. Дверь холодильника открыта более 5 минут. Надо закрыть дверь. | |
- wait_for_trigger: | |
- platform: state | |
entity_id: binary_sensor.kholodilnik_lg_dver_contact | |
from: 'on' | |
to: 'off' | |
timeout: '60' | |
- choose: | |
- conditions: | |
- condition: state | |
entity_id: binary_sensor.kholodilnik_lg_dver_contact | |
state: 'on' | |
sequence: | |
- service: automation.trigger | |
target: | |
entity_id: >- | |
automation.kukhnia_kholodilnik_dver_otkryta_bolee_5_minut_trevoga | |
data: {} | |
- conditions: | |
- condition: state | |
entity_id: binary_sensor.kholodilnik_lg_dver_contact | |
state: 'off' | |
sequence: | |
- service: script.tts_yandex_station_say | |
data: | |
device: >- | |
media_player.yandex_station_XXXXXXXX01,media_player.yandex_station_XXXXXXXX02 (указываем свои яндекс колонки) | |
volume: 7 | |
message: Хозяин. Спасибо, что закрыли дверь холодильника. | |
default: [] | |
mode: single |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment