AutomationDataset/F-D-/F-D-_automations.yaml

995 lines
30 KiB
YAML
Raw Permalink 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: '1740563516926'
alias: Я дома
description: ''
triggers:
- trigger: state
entity_id:
- input_boolean.alex
from: 'off'
to: 'on'
conditions: []
actions:
- action: notify.mobile_app_iphone_aleksandr
metadata: {}
data:
message: Я дома
mode: single
- id: '1740563587967'
alias: Я не дома
description: ''
triggers:
- trigger: state
entity_id:
- input_boolean.alex
from: 'on'
to: 'off'
conditions: []
actions:
- action: notify.mobile_app_iphone_aleksandr
metadata: {}
data:
message: Я не дома
mode: single
- id: '1740591093040'
alias: At www5
description: ''
triggers:
- trigger: state
entity_id:
- sensor.iphone_aleksandr_ssid
from: null
to: WWW5
conditions: []
actions:
- action: notify.mobile_app_iphone_aleksandr
metadata: {}
data:
message: At www5
mode: single
- id: '1740591197979'
alias: At lte
description: ''
triggers:
- trigger: state
entity_id:
- sensor.iphone_aleksandr_connection_type
from: null
to: Cellular
conditions: []
actions:
- action: notify.mobile_app_iphone_aleksandr
metadata: {}
data:
message: At LTE
mode: single
- id: '1740494025827'
alias: Левый верхний выключатель кухня зал
description: ''
triggers:
- trigger: mqtt
topic: zigbee2mqtt_1/switch_kitchen_hall/action
payload: single_left
conditions: []
actions:
- action: switch.toggle
metadata: {}
data: {}
target:
entity_id: switch.line_relay_kitchen
mode: single
- id: '1740500687848'
alias: Левый нижний выключатель кухня зал
description: ''
triggers:
- trigger: mqtt
topic: zigbee2mqtt_1/switch_kitchen_hall/action
payload: single_left_down
conditions: []
actions:
- action: switch.toggle
metadata: {}
data: {}
target:
entity_id: switch.lamp_kitchen
mode: single
- id: '1740502482454'
alias: Правый верхний выключатель кухня зал
description: ''
triggers:
- trigger: mqtt
topic: zigbee2mqtt_1/switch_kitchen_hall/action
payload: single_right
conditions: []
actions:
- action: switch.toggle
metadata: {}
data: {}
target:
entity_id: switch.switch_kitchen_hall_right
mode: single
- id: '1740502633327'
alias: Правый нижний выключатель кухня зал
description: ''
triggers:
- trigger: mqtt
topic: zigbee2mqtt_1/switch_kitchen_hall/action
payload: single_right_down
conditions: []
actions:
- action: switch.toggle
metadata: {}
data: {}
target:
entity_id: switch.switch_kitchen_hall_left
mode: single
- id: '1740563516926'
alias: Я дома
description: ''
triggers:
- trigger: state
entity_id:
- input_boolean.alex
from: 'off'
to: 'on'
conditions: []
actions:
- action: notify.mobile_app_iphone_aleksandr
metadata: {}
data:
message: Я дома
mode: single
- id: '1740563587967'
alias: Я не дома
description: ''
triggers:
- trigger: state
entity_id:
- input_boolean.alex
from: 'on'
to: 'off'
conditions: []
actions:
- action: notify.mobile_app_iphone_aleksandr
metadata: {}
data:
message: Я не дома
mode: single
- id: '1740569109550'
alias: Door
description: ''
triggers:
- trigger: state
entity_id:
- binary_sensor.binary_sensor_door_toilet_contact
from: 'on'
to: 'off'
conditions: []
actions:
- action: notify.mobile_app_iphone_aleksandr
metadata: {}
data:
message: Дверь закрыта
mode: single
- id: '1740591093040'
alias: At www5
description: ''
triggers:
- trigger: state
entity_id:
- sensor.iphone_aleksandr_ssid
from: null
to: WWW5
conditions: []
actions:
- action: notify.mobile_app_iphone_aleksandr
metadata: {}
data:
message: At www_5
mode: single
- id: '1740591197979'
alias: At lte
description: ''
triggers:
- trigger: state
entity_id:
- sensor.iphone_aleksandr_connection_type
from: null
to: Cellular
conditions: []
actions:
- action: notify.mobile_app_iphone_aleksandr
metadata: {}
data:
message: At LTE
mode: single
- id: '1740677018186'
alias: Свет в ванной
description: ''
triggers:
- trigger: state
entity_id:
- binary_sensor.motion_bath_occupancy
from: null
to: 'on'
conditions:
- condition: state
entity_id: binary_sensor.door_bath_contact
state: 'off'
actions:
- action: notify.mobile_app_iphone_aleksandr
metadata: {}
data:
message: В ванной включить свет
mode: single
- id: '1740919441609'
alias: Test template
description: ''
triggers:
- trigger: template
value_template: "{{ is_state('binary_sensor.0x54ef441000118375_occupancy', 'off')\
\ \n and is_state('light.0x54ef44100035a3eb', 'on')\n}}"
for:
hours: 0
minutes: 0
seconds: 5
conditions: []
actions: []
mode: single
- id: imitacia_pricutstvia_vkluchit_svet
alias: Имитация присутствия включить свет
triggers:
- trigger: sun
event: sunset
- trigger: time
at: '14:00:00'
conditions:
- condition: state
entity_id: input_boolean.presence_simulation
state: 'on'
actions:
- parallel:
- sequence:
- delay:
minutes: "{{ \n range(states('input_number. min_minutes_presence_simulation_light_switch'),\
\ \n 'input_number. max_minutes_presence_simulation_light_switch') |\
\ random \n}}"
- action: switch.turn_on
entity_id: switch.switch_kitchen_hall_left
- sequence:
- delay:
minutes: "{{ \n range(states('input_number. min_minutes_presence_simulation_light_switch'),\
\ \n 'input_number. max_minutes_presence_simulation_light_switch') |\
\ random \n}}"
- action: light.turn_on
entity_id: light.lamp_kitchen
- sequence:
- delay:
minutes: "{{ \n range(states('input_number. min_minutes_presence_simulation_light_switch'),\
\ \n 'input_number. max_minutes_presence_simulation_light_switch') |\
\ random \n}}"
- action: light.turn_on
entity_id: light.lamp_big_bedroom_marina_white
data:
brightness: 254
color_temp: 4300
- sequence:
- delay:
minutes: "{{ \n range(states('input_number. min_minutes_presence_simulation_light_switch'),\
\ \n 'input_number. max_minutes_presence_simulation_light_switch') |\
\ random \n}}"
- action: light.turn_on
entity_id: light.lamp_bedroom_andrey_white
data:
brightness: 254
color_temp: 4300
- id: imitacia_pricutstvia_vykluchit_svet
alias: Имитация присутствия выключить свет
triggers:
- trigger: time
at: '21:00:00'
conditions:
- condition: state
entity_id: input_boolean.presence_simulation
state: 'on'
actions:
- parallel:
- sequence:
- delay:
minutes: "{{ \n range(states('input_number. min_minutes_presence_simulation_light_switch'),\
\ \n 'input_number. max_minutes_presence_simulation_light_switch') |\
\ random \n}}"
- action: switch.turn_off
entity_id: switch.switch_kitchen_hall_left
- sequence:
- delay:
minutes: "{{ \n range(states('input_number. min_minutes_presence_simulation_light_switch'),\
\ \n 'input_number. max_minutes_presence_simulation_light_switch') |\
\ random \n}}"
- action: light.turn_off
entity_id: light.lamp_kitchen
- sequence:
- delay:
minutes: "{{ \n range(states('input_number. min_minutes_presence_simulation_light_switch'),\
\ \n 'input_number. max_minutes_presence_simulation_light_switch') |\
\ random \n}}"
- action: light.turn_off
entity_id: light.lamp_big_bedroom_marina_white
- sequence:
- delay:
minutes: "{{ \n range(states('input_number. min_minutes_presence_simulation_light_switch'),\
\ \n 'input_number. max_minutes_presence_simulation_light_switch') |\
\ random \n}}"
- action: light.turn_off
entity_id: light.lamp_bedroom_andrey_white
- id: svet_v_vannoy_vkluchit_po_datchiku_prisutctvia
alias: Свет в ванной включить по датчику присутствия
triggers:
- trigger: state
entity_id: binary_sensor.motion_bath
to: 'on'
conditions:
- condition: template
value_template: "{% if is_state(\"binary_sensor.is_night\", \"on\") %} {{ is_state\
\ (\"switch.backlight_bath\", \"off\") }} {% else %} {{ is_state (\"switch.switch_bath_up\"\
, \"off\") }} {% endif %} \n"
actions:
- action: script.turn_on
entity_id: script.light_turn_on_depending_on_daytime_bath
- id: svet_v_vannoy_vikluchit_po_datchiku_prisutctvia
alias: Свет в ванной выключить по датчику присутствия
triggers:
- trigger: state
entity_id: binary_sensor.motion_bath
to: 'off'
actions:
- action: switch.turn_off
entity_id:
- switch.backlight_bath
- switch.switch_bath_up
- id: vkluchit_ventilaciyu_v_vannoy_vruchnuyu
alias: Выключить вентиляцию в ванной вручную
triggers:
- trigger: state
entity_id: sensor.switch_bath_action
to: single_down
conditions:
- condition: state
entity_id: switch.fan_bath
state: 'on'
actions:
- action: switch.turn_off
entity_id: switch.fan_bath
- id: perekluchit_ventilaciyu_v_vannoy_avtomaticheski
alias: Переключить вентиляцию в ванной автоматически
triggers:
- trigger: state
entity_id: binary_sensor.turn_on_fan_in_bath
to:
- 'on'
- 'off'
actions:
action: 'switch.turn_{{ trigger.to_state.state }}
'
entity_id: switch.fan_bath
- id: perekluchit_polotencesushitel_v_vannoy
alias: Переключить полотенцесушитель в ванной
triggers:
- trigger: state
entity_id: binary_sensor.turn_on_toweldryer_in_bath
to:
- 'on'
- 'off'
actions:
action: 'switch.turn_{{ trigger.to_state.state }}
'
entity_id: switch.relay_toweldryer_bath
- id: perecryt_vodu_pri_utechke_v_vannoy
alias: Перекрыть воду при утечке в ванной
triggers:
- trigger: state
entity_id: binary_sensor.waterleak_in_bath
to: 'on'
actions:
- action: switch.turn_off
entity_id:
- switch.hot_water_tap_bath
- switch.cold_water_tap_bath
- id: dimmer_v_spalne_andreia_perekliuchenie_sveta
alias: Диммер в спальне Андрея переключение света
triggers:
- trigger: state
entity_id: sensor.dimmer_bedroom_andrey_action
to: single
conditions: []
actions:
- action: light.toggle
entity_id: light.lamp_bedroom_andrey_white
mode: single
- id: dimmer_v_spalne_andreia_vkluchenie_maximalnoy_yarkosti
alias: Диммер в спальне Андрея включение максимальной яркости
triggers:
- trigger: state
entity_id: sensor.dimmer_bedroom_andrey_action
to: double
actions:
- action: light.turn_on
entity_id: light.lamp_bedroom_andrey_white
data:
brightness: 254
color_temp_kelvin: 4300
- id: dimmer_v_spalne_andreya_perekluchenie_cvetovogo_kolca
alias: Диммер в спальне Андрея переключение цветового кольца
triggers:
- trigger: state
entity_id: sensor.dimmer_bedroom_marina_action
to: hold
actions:
- action: light.toggle
entity_id: light.lamp_big_bedroom_marina_rgb
- id: dimmer_v_spalne_andreia_izmenit_iarkost
alias: Диммер в спальне Андрея изменить яркость
triggers:
- trigger: state
entity_id: sensor.dimmer_bedroom_andrey_action_rotation_percent
from: unknown
conditions:
- condition: state
entity_id: sensor.dimmer_bedroom_andrey_action
state:
- rotation
- start_rotating
actions:
- choose:
- conditions:
- condition: state
entity_id: sensor.dimmer_bedroom_andrey_action_rotation_button_state
state: released
sequence:
- action: light.turn_on
entity_id: light.lamp_bedroom_andrey_white
data_template:
brightness: '{% set start_brightness = state_attr(''sensor.lamp_bedroom_andrey_attr'',
''brightness_white'') %} {% if is_state(''light.lamp_bedroom_andrey_white'',
''off'') %} {% set start_brightness = 0 %} {% endif %} {{ (start_brightness
+ (trigger.to_state.state | float) * 2.55) | int(1) }}'
transition: 1
- conditions:
- condition: state
entity_id: sensor.dimmer_bedroom_andrey_action_rotation_button_state
state: pressed
sequence:
- variables:
brightness: '{{ state_attr(''sensor.lamp_bedroom_andrey_attr'', ''brightness_white'')
| int(1) }}'
- action: light.turn_on
entity_id: light.lamp_bedroom_andrey_white
data_template:
color_temp: '{{ ((state_attr(''sensor.lamp_bedroom_andrey_attr'', ''color_temp_white'')
| int(1)) + (trigger.to_state.state | float) * 2.17) | int(1) }}'
brightness: '{{ brightness }}'
transition: 1
- id: perekluchenie_sveta_v_spalne_andreya_po_vykluchatelu
alias: Переключение света в спальне Андрея по выключателю
triggers:
- trigger: state
id: single
entity_id: sensor.switch_bedroom_andrey_action
to: single_up
- trigger: state
id: double
entity_id: sensor.switch_bedroom_andrey_action
to: double_down
actions:
choose:
- conditions:
condition: trigger
id: single
sequence:
action: light.toggle
entity_id: light.lamp_bedroom_andrey_white
data:
brightness: 254
color_temp_kelvin: 4300
transition: 1
- conditions:
condition: trigger
id: double
sequence:
action: light.toggle
entity_id: light.lamp_bedroom_andrey_rgb
data:
transition: 1
- id: dimmer_v_spalne_mariny_perekliuchenie_sveta
alias: Диммер в спальне Марины переключение света
triggers:
- trigger: state
entity_id: sensor.dimmer_bedroom_marina_action
to: single
conditions: []
actions:
- action: light.toggle
entity_id:
- light.lamp_big_bedroom_marina_white
- light.lamp_small_bedroom_marina
- id: dimmer_v_spalne_mariny_vkluchenie_maksimalnoy_yarkosti
alias: Диммер в спальне Марины включение максимальной яркости
triggers:
- trigger: state
entity_id: sensor.dimmer_bedroom_marina_action
to: double
actions:
- action: light.turn_on
entity_id:
- light.lamp_big_bedroom_marina_white
- light.lamp_small_bedroom_marina
data:
brightness: 254
color_temp_kelvin: 4300
- id: dimmer_v_spalne_mariny_perekluchenie_cvetovogo_kolca
alias: Диммер в спальне Марины переключение цветового кольца
triggers:
- trigger: state
entity_id: sensor.dimmer_bedroom_marina_action
to: hold
actions:
- action: light.toggle
entity_id: light.lamp_big_bedroom_marina_rgb
- id: dimmer_v_spalne_mariny_izmenit_iarkost
alias: Диммер в спальне Марины изменить яркость
triggers:
- trigger: state
entity_id: sensor.dimmer_bedroom_marina_action_rotation_percent
from: unknown
conditions:
- condition: state
entity_id: sensor.dimmer_bedroom_marina_action
state:
- rotation
- start_rotating
actions:
- choose:
- conditions:
- condition: state
entity_id: sensor.dimmer_bedroom_marina_action_rotation_button_state
state: released
sequence:
- action: light.turn_on
entity_id:
- light.lamp_big_bedroom_marina_white
- light.lamp_small_bedroom_marina
data_template:
brightness: '{% set start_brightness = state_attr(''sensor.lamp_big_bedroom_marina_attr'',
''brightness_white'') %} {% if is_state(''light.lamp_big_bedroom_marina_white'',
''off'') %} {% set start_brightness = 0 %} {% endif %} {{ (start_brightness
+ (trigger.to_state.state | float) * 2.55) | int(1) }}'
transition: 1
- conditions:
- condition: state
entity_id: sensor.dimmer_bedroom_marina_action_rotation_button_state
state: pressed
sequence:
- variables:
brightness: '{{ state_attr(''sensor.lamp_bedroom_andrey_attr'', ''brightness_white'')
| int(1) }}'
- action: light.turn_on
entity_id:
- light.lamp_big_bedroom_marina_white
- light.lamp_small_bedroom_marina
data_template:
color_temp: '{{ ((state_attr(''sensor.lamp_big_bedroom_marina_attr'', ''color_temp_white'')
| int(1)) + (trigger.to_state.state | float) * 2.17) | int(1) }}'
brightness: '{{ brightness }}'
transition: 1
- id: perekluchenie_sveta_i_cveta_v_spalne_mariny_po_vykluchatelu
alias: Переключение света и цвета в спальне Марины по выключателю
triggers:
- trigger: state
id: single
entity_id: sensor.switch_bedroom_marina_action
to: single_down
- trigger: state
id: double
entity_id: sensor.switch_bedroom_marina_action
to: double_down
actions:
choose:
- conditions:
condition: trigger
id: single
sequence:
action: light.toggle
entity_id:
- light.lamp_big_bedroom_marina_white
- light.lamp_small_bedroom_marina
data:
brightness: 254
color_temp_kelvin: 4300
transition: 1
- conditions:
condition: trigger
id: double
sequence:
action: light.toggle
entity_id: light.lamp_big_bedroom_marina_rgb
data:
transition: 1
- id: zakrytie_zamka_po_datchiku_zakrytiya_dveri
alias: Закрытие замка по датчику закрытия двери
triggers:
- trigger: state
entity_id: binary_sensor.door_entrance_contact
to: 'off'
action:
- action: input_boolean.turn_on
entity_id: input_boolean.lock_trigger_from_hass
- id: zapusk_taimara_zamka_vkhodnoi_dveri
alias: Запуск таймара замка входной двери
triggers:
- trigger: state
entity_id: input_boolean.lock_trigger_in_hass
to: 'off'
action:
- action: timer.start
entity_id: timer.lock_entrance_door_timer
- action: input_boolean.turn_off
entity_id: input_boolean.lock_trigger_from_hass
- id: avtozakrytie_zamka_vkhodnoi_dveri_po_istchenii_taimera
alias: Автозакрытие замка входной двери по истечении таймера
triggers:
- trigger: event
event_type: timer.finished
event_data:
entity_id: timer.lock_entrance_door_timer
actions:
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.door_entrance_contact
state: 'off'
sequence:
- action: input_boolean.turn_on
entity_id: input_boolean.lock_trigger_from_hass
- id: reset_timer_if_door_lock_closed_or_door_opening
alias: Сброс таймера если замок закрыт или дверь открывается
triggers:
- trigger: state
entity_id: input_boolean.lock_trigger_in_hass
to: 'on'
- trigger: state
entity_id: binary_sensor.door_entrance_contact
to: 'on'
actions:
- action: timer.cancel
entity_id: timer.lock_entrance_door_timer
- id: Vkluchenie_dwoynyh_svetilnikov_v_prihozhey
alias: Включение двойных светильников в прихожей
triggers:
- trigger: state
entity_id: binary_sensor.presence_sensor_presence_entrance
to: 'on'
conditions:
- condition: state
entity_id: binary_sensor.is_night
state: 'off'
actions:
action: light.turn_on
entity_id: light.switch_hallway_osveshchenie_1
- id: Vykluchenie_dwoynyh_svetilnikov_v_prihozhey
alias: Выключение двойных светильников в прихожей
triggers:
- trigger: state
entity_id: binary_sensor.presence_hallway_presence_sensor
to: 'off'
conditions:
- condition: state
entity_id: light.switch_hallway_osveshchenie_1
state: 'on'
actions:
action: light.turn_off
entity_id: light.switch_hallway_osveshchenie_1
- id: utechki_vody
alias: Утечки воды
triggers:
- platform: state
entity_id: binary_sensor.waterleak_bath_water_leak
to: 'on'
- platform: state
entity_id: binary_sensor.waterleak_bath_under_bathtab_water_leak
to: 'on'
- platform: state
entity_id: binary_sensor.waterleak_wardrobe_water_leak
to: 'on'
- platform: state
entity_id: binary_sensor.waterleak_toilet_water_leak
to: 'on'
- platform: state
entity_id: binary_sensor.waterleak_kitchen_water_leak
to: 'on'
actions:
- action: notify.mobile_app_iphone_aleksandr
data:
title: Внимание!!!
message: Утечка в {% if trigger.idx == "0" %} ванной под раковиной {% elif trigger.idx
== "1" %} ванной под ванной {% elif trigger.idx == "2" %} в гардеробе {% elif
trigger.idx == "3" %} туалете {% elif trigger.idx == "4" %} кухне {% endif
%}
- id: uvedomlenie_o_perecrytii_gorachey_vody_v_vanoy
alias: Уведомление о перекрытии горячей воды в ванной
triggers:
- trigger: mqtt
topic: zigbee2mqtt_1/hot_water_tap_bath/action
payload: 'off'
actions:
- action: notify.mobile_app_iphone_aleksandr
data:
title: Внимание!!!
message: Горячая вода в ванной перекрыта
- id: uvedomlenie_o_perecrytii_holodnoy_vody_v_vanoy
alias: Уведомление о перекрытии холодной воды в ванной
triggers:
- trigger: mqtt
topic: zigbee2mqtt_1/cold_water_tap_bath/action
payload: 'off'
actions:
- action: notify.mobile_app_iphone_aleksandr
data:
title: Внимание!!!
message: Холодная вода в ванной перекрыта
- id: '1740494025827'
alias: Левый верхний выключатель кухня зал
description: ''
triggers:
- trigger: mqtt
topic: zigbee2mqtt_1/switch_kitchen_hall/action
payload: single_left
conditions: []
actions:
- action: switch.toggle
metadata: {}
data: {}
target:
entity_id: switch.led_line_kitchen
mode: single
- id: '1740500687848'
alias: Левый нижний выключатель кухня зал
description: ''
triggers:
- trigger: mqtt
topic: zigbee2mqtt_1/switch_kitchen_hall/action
payload: single_left_down
conditions: []
actions:
- action: switch.toggle
metadata: {}
data: {}
target:
entity_id: switch.lamp_kitchen
mode: single
- id: '1740502482454'
alias: Правый верхний выключатель кухня зал
description: ''
triggers:
- trigger: mqtt
topic: zigbee2mqtt_1/switch_kitchen_hall/action
payload: single_right
conditions: []
actions:
- action: switch.toggle
metadata: {}
data: {}
target:
entity_id: switch.switch_kitchen_hall_right
mode: single
- id: '1740502633327'
alias: Правый нижний выключатель кухня зал
description: ''
triggers:
- trigger: mqtt
topic: zigbee2mqtt_1/switch_kitchen_hall/action
payload: single_right_down
conditions: []
actions:
- action: switch.toggle
metadata: {}
data: {}
target:
entity_id: switch.switch_kitchen_hall_left
mode: single
- id: vkluchit_svet_po_datchiku_prisutctvia_ili_po_datchiku_otkrytia_dveri
alias: Включить свет по датчику присутствия или по датчику открытия двери
triggers:
- trigger: state
id: occupancy
entity_id: binary_sensor.motion_toilet
to: 'on'
- trigger: state
id: door
entity_id: binary_sensor.door_toilet_contact
to: 'on'
conditions:
- condition: template
value_template: "{% if is_state(\"binary_sensor.is_night\", \"on\") %} {{ is_state\
\ (\"switch.backlight_toilet\", \"off\") }} {% else %} {{ is_state (\"switch.switch_toilet_up\"\
, \"off\") }} {% endif %} \n"
- or:
- and:
- condition: trigger
id: occupancy
- condition: state
entity_id: binary_sensor.door_toilet_contact
state: 'on'
- and:
- condition: trigger
id: door
- condition: state
entity_id: binary_sensor.motion_toilet
state: 'on'
actions:
- action: script.turn_on
entity_id: script.light_turn_on_depending_on_daytime_toulet
- action: timer.start
entity_id: timer.toilet_long_time_light_timer
- action: timer.cancel
entity_id: timer.toilet_light_off_timer
- id: toilet_light_off_by_presence_sensor
alias: Выключить свет по датчику присутствия
triggers:
- trigger: state
entity_id: binary_sensor.motion_toilet
to: 'off'
actions:
- action: switch.turn_off
entity_id:
- switch.backlight_toilet
- switch.switch_toilet_up
- action: timer.cancel
entity_id: timer.toilet_long_time_light_timer
- id: toilet_light_off_when_timers_finish
alias: Выключение света в туалете по завершении таймера
triggers:
- trigger: event
event_type: timer.finished
event_data:
entity_id: timer.toilet_long_time_light_timer
actions:
- action: button.press
entity_id: button.presence_toilet_reset_nopresence_status
- action: timer.cancel
entity_id: timer.toilet_long_time_light_timer
- id: toilet_manual_light_on
alias: Включение света в туалете вручную
triggers:
- trigger: state
entity_id: switch.switch_toilet_up
to: 'on'
conditions:
- condition: state
entity_id: binary_sensor.motion_toilet
state: 'off'
- condition: state
entity_id: binary_sensor.door_toilet_contact
state: 'off'
actions:
- action: timer.start
entity_id: timer.toilet_light_off_timer
- id: toilet_manual_light_off
alias: Выключение света в туалете вручную
triggers:
- trigger: state
entity_id: switch.switch_toilet_up
to: 'off'
action:
- action: timer.cancel
entity_id: timer.toilet_light_off_timer
- id: toilet_fan
alias: Вентиляции в туалете
triggers:
- trigger: state
id: manual_on_off
entity_id: sensor.switch_toilet_action
to: single_down
- trigger: state
id: fan_on_when_light_on_for_several_minutes
entity_id: switch.switch_toilet_up
to: 'on'
for: 00:05:00
- trigger: state
id: fan_off_when_light_off_for_several_minutes
entity_id: switch.switch_toilet_up
to: 'off'
for: 00:02:00
actions:
choose:
- conditions:
condition: trigger
id: manual_on_off
sequence:
action: switch.toggle
entity_id: switch.fan_toilet
- conditions:
- condition: trigger
id: fan_on_when_light_on_for_several_minutes
- condition: state
entity_id: switch.fan_toilet
state: 'off'
sequence:
action: switch.turn_on
entity_id: switch.fan_toilet
- conditions:
- condition: trigger
id: fan_off_when_light_off_for_several_minutes
- condition: state
entity_id: switch.fan_toilet
state: 'on'
sequence:
action: switch.turn_off
entity_id: switch.fan_toilet
- id: wardrobe_light_on_witout_motion
alias: Включение света в гардеробной
triggers:
- trigger: state
id: door
entity_id: binary_sensor.door_wardrobe_contact
to: 'on'
- trigger: state
id: motion
entity_id: binary_sensor.motion_wardrobe_occupancy
to: 'on'
conditions:
- condition: state
entity_id: switch.switch_wardrobe_up
state:
- 'off'
- unknown
actions:
choose:
- conditions:
- condition: trigger
id: motion
- condition: state
entity_id: binary_sensor.door_wardrobe_contact
state: 'on'
sequence:
action: switch.turn_on
entity_id: switch.switch_wardrobe_up
- conditions:
- condition: trigger
id: door
sequence:
action: switch.turn_on
entity_id: switch.switch_wardrobe_up
- id: wardrobe_light_off
alias: Выключение света в гардеробной
triggers:
- trigger: event
event_type: timer.finished
event_data:
entity_id: timer.wardrobe_light_timer
conditions:
- condition: state
entity_id: switch.switch_wardrobe_up
state: 'on'
actions:
action: switch.turn_off
entity_id: switch.switch_wardrobe_up
- id: wardrobe_timer_start
alias: Запуск таймера при включении света в гардеробе
triggers:
- trigger: state
entity_id: binary_sensor.binary_sensor_wardrobe_light_on_witout_motion
to: 'on'
actions:
- action: timer.start
entity_id: timer.wardrobe_light_timer
- id: wardrobe_timer_cancel
alias: Отмена таймера света в гардеробе
triggers:
- trigger: state
entity_id: binary_sensor.binary_sensor_wardrobe_light_on_witout_motion
to: 'off'
actions:
- action: timer.cancel
entity_id: timer.wardrobe_light_timer