AutomationDataset/SenMorgan/description-ready.json

5087 lines
206 KiB
JSON
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": "3d_printer_print_done",
"automation": "- alias: 3D Printer - Print Done\n id: 3d_printer_print_done\n triggers:\n - trigger: state\n entity_id: binary_sensor.octoprint_printing\n from: 'on'\n to: 'off'\n actions:\n - action: notify.mobile_app_sm_s901b\n data:\n title: 3D Printer\n message: 🎉 Печать завершена!",
"config": [
{
"name": "3D printer printing sensor",
"room": "3d_printer",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.octoprint_printing",
"device_id": null
}
},
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
}
]
},
{
"id": "3d_printer_print_progress",
"automation": "- alias: 3D Printer - Print Progress\n id: 3d_printer_print_progress\n triggers:\n - trigger: state\n entity_id: sensor.octoprint_job_percentage\n conditions:\n - condition: template\n value_template: \"{{ (trigger.to_state.state | int(0)) > 0 and\\n ((trigger.to_state.state\\\n \\ | int(0)) != (trigger.from_state.state | int(0))) and\\n (trigger.to_state.state\\\n \\ | int(0)) % 10 == 0 }}\\n\"\n actions:\n - action: notify.mobile_app_sm_s901b\n data_template:\n title: 3D Printer\n message: 📈 Деталь готова на {{ states('sensor.octoprint_job_percentage') | int(0)\n }}%",
"config": [
{
"name": "3D printer job percentage sensor",
"room": "3d_printer",
"type": "sensor",
"id": {
"entity_id": "sensor.octoprint_job_percentage",
"device_id": null
}
},
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
}
]
},
{
"id": "3d_printer_print_paused",
"automation": "- alias: 3D Printer - Print Paused\n id: 3d_printer_print_paused\n triggers:\n - trigger: state\n entity_id: sensor.octoprint_current_state\n from: Printing\n to:\n - Paused\n - Pausing\n actions:\n - action: notify.mobile_app_sm_s901b\n data:\n title: ⚠️ 3D Printer\n message: Печать приостановлена!",
"config": [
{
"name": "3D printer current state sensor",
"room": "3d_printer",
"type": "sensor",
"id": {
"entity_id": "sensor.octoprint_current_state",
"device_id": null
}
},
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
}
]
},
{
"id": "3d_printer_print_resumed",
"automation": "- alias: 3D Printer - Print Resumed\n id: 3d_printer_print_resumed\n triggers:\n - trigger: state\n entity_id: sensor.octoprint_current_state\n from:\n - Paused\n - Pausing\n to: Printing\n actions:\n - action: notify.mobile_app_sm_s901b\n data:\n title: ⚠️ 3D Printer\n message: Печать возобновлена",
"config": [
{
"name": "3D printer current state sensor",
"room": "3d_printer",
"type": "sensor",
"id": {
"entity_id": "sensor.octoprint_current_state",
"device_id": null
}
},
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
}
]
},
{
"id": "3d_printer_overheated",
"automation": "- alias: 3D Printer - Overheated\n id: 3d_printer_overheated\n triggers:\n - trigger: state\n entity_id:\n - sensor.octoprint_actual_bed_temp\n - sensor.octoprint_actual_tool0_temp\n conditions:\n - or:\n - condition: template\n value_template: '{{ states(''sensor.octoprint_actual_bed_temp'') | int(0) >\n 100 }}\n\n '\n - condition: template\n value_template: '{{ states(''sensor.octoprint_actual_tool0_temp'') | int(0)\n > 250 }}\n\n '\n actions:\n - action: notify.mobile_app_sm_s901b\n data:\n title: 🌡️ 3D Printer перегрелся!\n message: '🛏️ Температура стола: {{ states(''sensor.octoprint_actual_bed_temp'')\n }}°C\n\n 🔥 Температура хотенда: {{ states(''sensor.octoprint_actual_tool0_temp'') }}°C\n\n '",
"config": [
{
"name": "3D printer actual bed temperature sensor",
"room": "3d_printer",
"type": "sensor",
"id": {
"entity_id": "sensor.octoprint_actual_bed_temp",
"device_id": null
}
},
{
"name": "3D printer actual tool0 temperature sensor",
"room": "3d_printer",
"type": "sensor",
"id": {
"entity_id": "sensor.octoprint_actual_tool0_temp",
"device_id": null
}
},
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
}
]
},
{
"id": "3d_printer_power_on",
"automation": "- alias: 3D Printer - Power On\n id: 3d_printer_power_on\n mode: restart\n triggers:\n - trigger: state\n entity_id: input_boolean.3d_printer_and_octo_power\n from: 'off'\n to: 'on'\n conditions:\n - condition: state\n entity_id: switch.3d_printer_socket\n state: 'off'\n actions:\n - action: switch.turn_on\n entity_id: switch.3d_printer_socket",
"config": [
{
"name": "3D printer and octoprint power input boolean",
"room": "3d_printer",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.3d_printer_and_octo_power",
"device_id": null
}
},
{
"name": "3D printer socket switch",
"room": "3d_printer",
"type": "switch",
"id": {
"entity_id": "switch.3d_printer_socket",
"device_id": null
}
}
]
},
{
"id": "3d_printer_power_sync",
"automation": "- alias: 3D Printer - Power Sync\n id: 3d_printer_power_sync\n mode: single\n triggers:\n - trigger: state\n entity_id: switch.3d_printer_socket\n conditions:\n - condition: template\n value_template: '{{ states(''switch.3d_printer_socket'') != states(''input_boolean.3d_printer_and_octo_power'')\n }}\n\n '\n - condition: template\n value_template: '{{ is_state_attr(''automation.3d_printer_power_off'', ''current'',\n 0) }}\n\n '\n actions:\n - if:\n - condition: state\n entity_id: switch.3d_printer_socket\n state: 'on'\n then:\n - action: input_boolean.turn_on\n entity_id: input_boolean.3d_printer_and_octo_power\n else:\n - action: input_boolean.turn_off\n entity_id: input_boolean.3d_printer_and_octo_power",
"config": [
{
"name": "3D printer and octoprint power input boolean",
"room": "3d_printer",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.3d_printer_and_octo_power",
"device_id": null
}
},
{
"name": "3D printer socket switch",
"room": "3d_printer",
"type": "switch",
"id": {
"entity_id": "switch.3d_printer_socket",
"device_id": null
}
},
{
"name": "3D printer power off automation",
"room": "3d_printer",
"type": "automation",
"id": {
"entity_id": "automation.3d_printer_power_off",
"device_id": null
}
}
]
},
{
"id": "3d_printer_power_off",
"automation": "- alias: 3D Printer - Power Off\n id: 3d_printer_power_off\n mode: restart\n triggers:\n - trigger: state\n entity_id: input_boolean.3d_printer_and_octo_power\n from: 'on'\n to: 'off'\n conditions:\n - condition: state\n entity_id: switch.3d_printer_socket\n state: 'on'\n actions:\n - if:\n - condition: template\n value_template: '{{ states(''sensor.octoprint_current_state'') != ''Operational''\n }}'\n then:\n - action: input_boolean.turn_on\n entity_id: input_boolean.3d_printer_and_octo_power\n - action: notify.mobile_app_sm_s901b\n data:\n title: ⚠️ 3D Printer\n message: 'Невозможно выключить Octoprint сервер в состонии «{{ states(''sensor.octoprint_current_state'')\n }}».\n\n Питания НЕ отключено!\n\n '\n else:\n - action: script.turn_on\n entity_id: script.octoprint_shutdown\n - wait_template: '{{ states(''sensor.octoprint_current_state'') == ''unavailable''\n }}'\n timeout: 00:03:00\n - if:\n - condition: template\n value_template: '{{ states(''sensor.octoprint_current_state'') != ''unavailable''\n }}'\n then:\n - action: input_boolean.turn_on\n entity_id: input_boolean.3d_printer_and_octo_power\n - action: notify.mobile_app_sm_s901b\n data:\n title: ⚠️ 3D Printer\n message: 'Не удалось выключить Octoprint сервер.\n\n Питания НЕ отключено!\n\n '\n else:\n - action: switch.turn_off\n entity_id: switch.3d_printer_socket\n - action: input_boolean.turn_off\n entity_id: input_boolean.3d_printer_and_octo_power",
"config": [
{
"name": "3D printer current state sensor",
"room": "3d_printer",
"type": "sensor",
"id": {
"entity_id": "sensor.octoprint_current_state",
"device_id": null
}
},
{
"name": "3D printer and octoprint power input boolean",
"room": "3d_printer",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.3d_printer_and_octo_power",
"device_id": null
}
},
{
"name": "3D printer socket switch",
"room": "3d_printer",
"type": "switch",
"id": {
"entity_id": "switch.3d_printer_socket",
"device_id": null
}
},
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
},
{
"name": "Octoprint shutdown script",
"room": "3d_printer",
"type": "script",
"id": {
"entity_id": "script.octoprint_shutdown",
"device_id": null
}
}
]
},
{
"id": "notification_air_quality_bad",
"automation": "- alias: Notification Air Quality Bad\n id: notification_air_quality_bad\n triggers:\n - trigger: numeric_state\n entity_id: sensor.air_quality_station_iaq\n above: 200\n for: 00:02:00\n conditions:\n - condition: state\n entity_id: input_boolean.home_night_mode\n state: 'off'\n actions:\n - if:\n - condition: template\n value_template: '{{ not is_state(''media_player.yandex_station_midi'', ''playing'')\n }}'\n then:\n - action: media_player.play_media\n entity_id: media_player.yandex_station_midi\n data:\n media_content_type: text\n media_content_id: \"Замечено плохое качество воздуха в доме,\\n{% if states('binary_sensor.windows')\\\n \\ == 'off' %}\\n советую открыть окно.\\n{% else %}\\n советую закрыть окно\\n\\\n \\ {% if states('binary_sensor.bedroom_window_contact') == 'on' %}\\n \\\n \\ в спальне\\n {% endif %}\\n {% if states('binary_sensor.kitchen_window_contact')\\\n \\ == 'on' %}\\n {% if states('binary_sensor.bedroom_window_contact') ==\\\n \\ 'on' %}\\n {% if states('binary_sensor.living_room_window_contact')\\\n \\ == 'on' %}\\n ,\\n {% else %}\\n и\\n {% endif %}\\n\\\n \\ {% endif %}\\n на кухне\\n {% endif %}\\n {% if states('binary_sensor.living_room_window_contact')\\\n \\ == 'on' %}\\n {% if states('binary_sensor.bedroom_window_contact') ==\\\n \\ 'on' or states('binary_sensor.kitchen_window_contact') == 'on' %}\\n \\\n \\ и\\n {% endif %}\\n в гостинной.\\n {% endif %}\\n{% endif %}\\n\"\n - action: notify.mobile_app_sm_s901b\n data:\n title: 🌬 Качество воздуха\n message: 'Качество воздуха в доме ухудшилось и составляет {{ states(''sensor.air_quality_station_iaq'')\n }}.\n\n '\n - action: automation.turn_on\n entity_id:\n - automation.notification_air_quality_restored\n - automation.notification_air_quality_open_window_greeting\n - action: input_datetime.set_datetime\n data:\n entity_id: input_datetime.air_quality_open_window_greeting_timeout\n datetime: '{{ now() + timedelta(minutes=2) }}'\n - action: automation.turn_off\n entity_id: automation.notification_air_quality_bad",
"config": [
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
},
{
"name": "Air quality station IAQ sensor",
"room": "living_room",
"type": "sensor",
"id": {
"entity_id": "sensor.air_quality_station_iaq",
"device_id": null
}
},
{
"name": "Home night mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.home_night_mode",
"device_id": null
}
},
{
"name": "Windows binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.windows",
"device_id": null
}
},
{
"name": "Bedroom window contact binary sensor",
"room": "bedroom",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.bedroom_window_contact",
"device_id": null
}
},
{
"name": "Kitchen window contact binary sensor",
"room": "kitchen",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.kitchen_window_contact",
"device_id": null
}
},
{
"name": "Living room window contact binary sensor",
"room": "living_room",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.living_room_window_contact",
"device_id": null
}
},
{
"name": "Yandex station midi media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station_midi",
"device_id": null
}
},
{
"name": "Air quality open window greeting timeout input datetime",
"room": "home",
"type": "input_datetime",
"id": {
"entity_id": "input_datetime.air_quality_open_window_greeting_timeout",
"device_id": null
}
},
{
"name": "Notification air quality bad automation",
"room": "home",
"type": "automation",
"id": {
"entity_id": "automation.notification_air_quality_bad",
"device_id": null
}
},
{
"name": "Notification air quality restored automation",
"room": "home",
"type": "automation",
"id": {
"entity_id": "automation.notification_air_quality_restored",
"device_id": null
}
},
{
"name": "Notification air quality open window greeting automation",
"room": "home",
"type": "automation",
"id": {
"entity_id": "automation.notification_air_quality_open_window_greeting",
"device_id": null
}
},
{
"name": "Yandex station media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station",
"device_id": null
}
}
]
},
{
"id": "notification_air_quality_open_window_greeting",
"automation": "- alias: Notification Air Quality Open Window Greeting\n id: notification_air_quality_open_window_greeting\n triggers:\n - trigger: state\n entity_id: binary_sensor.windows\n from: 'off'\n to: 'on'\n conditions:\n - condition: state\n entity_id: input_boolean.home_night_mode\n state: 'off'\n actions:\n - if:\n - condition: template\n value_template: '{{ as_timestamp(now()) < as_timestamp(states(''input_datetime.air_quality_open_window_greeting_timeout''),\n 0) }}'\n - condition: template\n value_template: '{{ not is_state(''media_player.yandex_station_midi'', ''playing'')\n }}'\n then:\n - action: media_player.play_media\n entity_id: media_player.yandex_station_midi\n data:\n media_content_type: text\n media_content_id: Молодец! Рада, что вы заботитесь о своём здоровье.\n - action: automation.turn_off\n entity_id: automation.notification_air_quality_open_window_greeting",
"config": [
{
"name": "Home night mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.home_night_mode",
"device_id": null
}
},
{
"name": "Windows binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.windows",
"device_id": null
}
},
{
"name": "Yandex station midi media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station_midi",
"device_id": null
}
},
{
"name": "Air quality open window greeting timeout input datetime",
"room": "home",
"type": "input_datetime",
"id": {
"entity_id": "input_datetime.air_quality_open_window_greeting_timeout",
"device_id": null
}
},
{
"name": "Notification air quality open window greeting automation",
"room": "home",
"type": "automation",
"id": {
"entity_id": "automation.notification_air_quality_open_window_greeting",
"device_id": null
}
},
{
"name": "Yandex station media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station",
"device_id": null
}
}
]
},
{
"id": "notification_air_quality_restored",
"automation": "- alias: Notification Air Quality Restored\n id: notification_air_quality_restored\n triggers:\n - trigger: numeric_state\n entity_id: sensor.air_quality_station_iaq\n below: 50\n for: 00:02:00\n conditions:\n - condition: state\n entity_id: input_boolean.home_night_mode\n state: 'off'\n actions:\n - if:\n - condition: template\n value_template: '{{ not is_state(''media_player.yandex_station_midi'', ''playing'')\n }}'\n then:\n - action: media_player.play_media\n entity_id: media_player.yandex_station_midi\n data:\n media_content_type: text\n media_content_id: Качество воздуха в доме вернулось в норму.\n - action: notify.mobile_app_sm_s901b\n data:\n title: 🌬 Качество воздуха\n message: 'Качество воздуха в доме улучшилось и составляет {{ states(''sensor.air_quality_station_iaq'')\n }}.\n\n '\n - action: automation.turn_on\n entity_id: automation.notification_air_quality_bad\n - action: automation.turn_off\n entity_id:\n - automation.notification_air_quality_restored\n - automation.notification_air_quality_open_window_greeting",
"config": [
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
},
{
"name": "Air quality station IAQ sensor",
"room": "living_room",
"type": "sensor",
"id": {
"entity_id": "sensor.air_quality_station_iaq",
"device_id": null
}
},
{
"name": "Home night mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.home_night_mode",
"device_id": null
}
},
{
"name": "Yandex station midi media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station_midi",
"device_id": null
}
},
{
"name": "Notification air quality bad automation",
"room": "home",
"type": "automation",
"id": {
"entity_id": "automation.notification_air_quality_bad",
"device_id": null
}
},
{
"name": "Notification air quality restored automation",
"room": "home",
"type": "automation",
"id": {
"entity_id": "automation.notification_air_quality_restored",
"device_id": null
}
},
{
"name": "Notification air quality open window greeting automation",
"room": "home",
"type": "automation",
"id": {
"entity_id": "automation.notification_air_quality_open_window_greeting",
"device_id": null
}
},
{
"name": "Yandex station media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station",
"device_id": null
}
}
]
},
{
"id": "alert_to_tts_handler",
"automation": "- alias: Alert to TTS Handler\n id: alert_to_tts_handler\n mode: single\n max_exceeded: silent\n variables:\n alerts_map:\n alert.water_leakage_bathroom:\n - Обнаружена утечка воды в ванной\n - Утечка воды в ванной устранена\n alert.water_leakage_kitchen:\n - Обнаружена утечка воды на кухне\n - Утечка воды на кухне устранена\n alert.carbon_monoxide_detected:\n - Обнаружена высокая концентрация угарного газа на кухне\n - Концентрация угарного газа на кухне вернулась в норму\n alert.natural_gas_detected:\n - Обнаружена утечка газа на кухне\n - Утечка газа на кухне устранена\n triggers:\n - trigger: state\n entity_id:\n - alert.water_leakage_bathroom\n - alert.water_leakage_kitchen\n - alert.carbon_monoxide_detected\n - alert.natural_gas_detected\n actions:\n - if:\n - condition: template\n value_template: '{{ trigger.to_state.state in [''on'', ''idle''] }}'\n then:\n - action: notify.mobile_app_sm_s901b\n data:\n message: TTS\n data:\n priority: high\n channel: alarm_stream_max\n media_stream: alarm_stream_max\n tts_text: \"{% if trigger.to_state.state == 'on' %}\\n Внимание! {{ alerts_map[trigger.entity_id][0]\\\n \\ }}!\\n{% else %}\\n {{ alerts_map[trigger.entity_id][1] }}.\\n{% endif\\\n \\ %}\\n\"",
"config": [
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
},
{
"name": "Water leakage bathroom alert",
"room": "bathroom",
"type": "alert",
"id": {
"entity_id": "alert.water_leakage_bathroom",
"device_id": null
}
},
{
"name": "Water leakage kitchen alert",
"room": "kitchen",
"type": "alert",
"id": {
"entity_id": "alert.water_leakage_kitchen",
"device_id": null
}
},
{
"name": "Carbon monoxide detected alert",
"room": "kitchen",
"type": "alert",
"id": {
"entity_id": "alert.carbon_monoxide_detected",
"device_id": null
}
},
{
"name": "Natural gas detected alert",
"room": "kitchen",
"type": "alert",
"id": {
"entity_id": "alert.natural_gas_detected",
"device_id": null
}
}
]
},
{
"id": "dcc_ex_enable_power_on_sunset",
"automation": "- alias: DCC-EX Enable Power on Sunset\n id: dcc_ex_enable_power_on_sunset\n triggers:\n - trigger: numeric_state\n entity_id: sun.sun\n attribute: elevation\n below: 4.0\n - trigger: state\n entity_id: person.sen\n to: home\n conditions:\n - condition: state\n entity_id: person.sen\n state: home\n - condition: numeric_state\n entity_id: sun.sun\n attribute: elevation\n below: 4.0\n - condition: state\n entity_id: input_boolean.home_night_mode\n state: 'off'\n actions:\n - action: switch.turn_on\n target:\n entity_id:\n - switch.ex_commandstation_tracks_power\n - switch.loco_sbb_cargo_re_482_coupling",
"config": [
{
"name": "Home night mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.home_night_mode",
"device_id": null
}
},
{
"name": "Sun sun entity",
"room": null,
"type": "sun",
"id": {
"entity_id": "sun.sun",
"device_id": null
}
},
{
"name": "Sen person",
"room": "home",
"type": "person",
"id": {
"entity_id": "person.sen",
"device_id": null
}
},
{
"name": "EX commandstation tracks power switch",
"room": "living_room",
"type": "switch",
"id": {
"entity_id": "switch.ex_commandstation_tracks_power",
"device_id": null
}
},
{
"name": "Loco SBB cargo RE 482 coupling switch",
"room": "living_room",
"type": "switch",
"id": {
"entity_id": "switch.loco_sbb_cargo_re_482_coupling",
"device_id": null
}
}
]
},
{
"id": "dcc_ex_layout_lights_by_motion_sensor",
"automation": "- alias: DCC-EX Layout Lights by Motion Sensor\n id: dcc_ex_layout_lights_by_motion_sensor\n description: Control train layout lights based on motion sensor\n mode: restart\n triggers:\n - trigger: state\n entity_id: binary_sensor.kitchen_motion_alarm\n conditions:\n - condition: state\n entity_id: switch.ex_commandstation_tracks_power\n state: 'on'\n - condition: template\n value_template: '{{ trigger.to_state.state in [''on'', ''off''] }}'\n actions:\n - action: switch.turn_{{ \"on\" if trigger.to_state.state == \"on\" else \"off\" }}\n entity_id:\n - switch.dcc_ex_vossloh_cabin_lights\n - switch.loco_sbb_cargo_re_482_inspection_lights",
"config": [
{
"name": "EX commandstation tracks power switch",
"room": "living_room",
"type": "switch",
"id": {
"entity_id": "switch.ex_commandstation_tracks_power",
"device_id": null
}
},
{
"name": "Kitchen motion alarm binary sensor",
"room": "kitchen",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.kitchen_motion_alarm",
"device_id": null
}
},
{
"name": "DCC-EX Vossloh cabin lights switch",
"room": "living_room",
"type": "switch",
"id": {
"entity_id": "switch.dcc_ex_vossloh_cabin_lights",
"device_id": null
}
},
{
"name": "Loco SBB cargo RE 482 inspection lights switch",
"room": "living_room",
"type": "switch",
"id": {
"entity_id": "switch.loco_sbb_cargo_re_482_inspection_lights",
"device_id": null
}
}
]
},
{
"id": "guest_mode_reset",
"automation": "- alias: Guest Mode Reset\n id: guest_mode_reset\n mode: restart\n triggers:\n - platform: time\n at: input_datetime.guest_mode_disable_time\n - platform: homeassistant\n event: start\n conditions:\n - condition: state\n entity_id: input_boolean.guest_mode\n state: 'on'\n - condition: template\n value_template: '{{ as_timestamp(now()) >= as_timestamp(states(''input_datetime.guest_mode_disable_time''),\n 0) }}\n\n '\n actions:\n - action: input_boolean.turn_off\n target:\n entity_id: input_boolean.guest_mode\n - variables:\n action_enable_back_on: '{{ ''action_enable_back_on'' ~ context.id }}'\n - action: notify.mobile_app_sm_s901b\n data:\n title: 👤 Гостевой режим\n message: Гостевой режим выключен автоматически в {{ states('sensor.time') }}.\n Включить обратно?\n data:\n actions:\n - action: '{{ action_enable_back_on }}'\n title: ↻ Включить снова\n - wait_for_trigger:\n - trigger: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_enable_back_on }}'\n - if:\n - condition: template\n value_template: '{{ wait.trigger.event.data.action == action_enable_back_on\n }}'\n then:\n - action: input_boolean.turn_on\n target:\n entity_id: input_boolean.guest_mode\n - action: input_datetime.set_datetime\n data:\n entity_id: input_datetime.guest_mode_disable_time\n datetime: '{{ (now().date() + timedelta(days=1)).strftime(''%Y-%m-%d'') }}\n 09:00:00'\n - action: notify.mobile_app_sm_s901b\n data:\n title: 👤 Гостевой режим\n message: Гостевой режим включен снова до 9:00 утра завтрашнего дня",
"config": [
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
},
{
"name": "Guest mode disable time input datetime",
"room": "home",
"type": "input_datetime",
"id": {
"entity_id": "input_datetime.guest_mode_disable_time",
"device_id": null
}
},
{
"name": "Guest mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.guest_mode",
"device_id": null
}
},
{
"name": "Time sensor",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.time",
"device_id": null
}
}
]
},
{
"id": "notify_yandex_guest_mode_enabled",
"automation": "- alias: Notify Yandex Guest Mode Enabled\n id: notify_yandex_guest_mode_enabled\n trigger:\n - platform: state\n entity_id: input_boolean.guest_mode\n from: 'off'\n to: 'on'\n action:\n - action: media_player.play_media\n entity_id: media_player.yandex_station_midi\n data:\n media_content_id: Гостевой режим активирован до 9:00 утра завтрашнего дня\n media_content_type: text",
"config": [
{
"name": "Yandex station midi media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station_midi",
"device_id": null
}
},
{
"name": "Guest mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.guest_mode",
"device_id": null
}
},
{
"name": "Yandex station media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station",
"device_id": null
}
}
]
},
{
"id": "stop_heating_by_window_opened",
"automation": "- alias: Stop Heating by Window Opened\n id: stop_heating_by_window_opened\n mode: restart\n trigger:\n - platform: state\n entity_id: binary_sensor.windows\n from: 'off'\n to: 'on'\n for: 00:00:10\n condition:\n - condition: state\n entity_id: input_boolean.heating_season\n state: 'on'\n - condition: state\n entity_id: binary_sensor.thermostat_active\n state: 'on'\n action:\n - action: timer.cancel\n entity_id: timer.pause_heating\n - if:\n - condition: state\n entity_id: timer.heating_quarantine\n state: active\n then:\n - action: timer.cancel\n entity_id: timer.heating_quarantine\n - action: input_text.set_value\n data:\n entity_id: input_text.heating_log\n value: Открыто окно → карантин перед включением отопления отменён\n - if:\n - condition: state\n entity_id: timer.short_heating\n state: active\n then:\n - action: timer.cancel\n entity_id: timer.short_heating\n - action: input_text.set_value\n data:\n entity_id: input_text.heating_log\n value: Открыто окно → кратковременное отопление отменено\n - action: media_player.play_media\n entity_id: media_player.yandex_station_midi\n data:\n media_content_id: Подогрев квартиры окончен из-за открытого окна\n media_content_type: text\n - action: script.thermostat_set_eco_mode\n data:\n message: Открыто окно → переход в режим экономии",
"config": [
{
"name": "Windows binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.windows",
"device_id": null
}
},
{
"name": "Yandex station midi media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station_midi",
"device_id": null
}
},
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "Thermostat active binary sensor",
"room": "living_room",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.thermostat_active",
"device_id": null
}
},
{
"name": "Pause heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.pause_heating",
"device_id": null
}
},
{
"name": "Heating quarantine timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.heating_quarantine",
"device_id": null
}
},
{
"name": "Short heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.short_heating",
"device_id": null
}
},
{
"name": "Heating log input text",
"room": "home",
"type": "input_text",
"id": {
"entity_id": "input_text.heating_log",
"device_id": null
}
},
{
"name": "Thermostat set eco mode script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.thermostat_set_eco_mode",
"device_id": null
}
},
{
"name": "Yandex station media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station",
"device_id": null
}
}
]
},
{
"id": "start_quarantine_by_window_closed",
"automation": "- alias: Start Quarantine by Window Closed\n id: start_quarantine_by_window_closed\n mode: restart\n trigger:\n - platform: state\n entity_id: binary_sensor.windows\n from: 'on'\n to: 'off'\n for: 00:00:10\n condition:\n - condition: state\n entity_id: input_boolean.heating_season\n state: 'on'\n action:\n - action: timer.start\n entity_id: timer.heating_quarantine\n - action: input_text.set_value\n data:\n entity_id: input_text.heating_log\n value: Окна закрыты → карантин перед включением отопления начат",
"config": [
{
"name": "Windows binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.windows",
"device_id": null
}
},
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "Heating quarantine timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.heating_quarantine",
"device_id": null
}
},
{
"name": "Heating log input text",
"room": "home",
"type": "input_text",
"id": {
"entity_id": "input_text.heating_log",
"device_id": null
}
}
]
},
{
"id": "restore_heating_after_quarantine",
"automation": "- alias: Restore Heating after Quarantine\n id: restore_heating_after_quarantine\n mode: single\n max_exceeded: silent\n trigger:\n - platform: event\n event_type: timer.finished\n event_data:\n entity_id: timer.heating_quarantine\n condition:\n - condition: state\n entity_id: input_boolean.heating_season\n state: 'on'\n - condition: state\n entity_id: binary_sensor.windows\n state: 'off'\n action:\n - if:\n - condition: state\n entity_id: timer.pause_heating\n state: idle\n - or:\n - condition: state\n entity_id: binary_sensor.people_home\n state: 'on'\n - condition: state\n entity_id: input_boolean.guest_mode\n state: 'on'\n then:\n - action: script.thermostat_stop_heating\n data:\n message: Карантин перед включением отопления окончен → отопление включено\n else:\n - action: input_text.set_value\n data:\n entity_id: input_text.heating_log\n value: Карантин перед включением отопления окончен, но обогрев запрещён →\n отопление не включено",
"config": [
{
"name": "Windows binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.windows",
"device_id": null
}
},
{
"name": "Guest mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.guest_mode",
"device_id": null
}
},
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "Pause heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.pause_heating",
"device_id": null
}
},
{
"name": "Heating quarantine timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.heating_quarantine",
"device_id": null
}
},
{
"name": "Heating log input text",
"room": "home",
"type": "input_text",
"id": {
"entity_id": "input_text.heating_log",
"device_id": null
}
},
{
"name": "Thermostat stop heating script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.thermostat_stop_heating",
"device_id": null
}
},
{
"name": "People home binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.people_home",
"device_id": null
}
}
]
},
{
"id": "thermostat_freeze_alert_at_night",
"automation": "- alias: Thermostat Freeze Alert at Night\n id: thermostat_freeze_alert_at_night\n mode: single\n max_exceeded: silent\n triggers:\n - trigger: state\n entity_id: binary_sensor.freeze_alert_at_night\n from: 'off'\n to: 'on'\n for: 00:05:00\n - trigger: time_pattern\n hours: /1\n conditions:\n - condition: state\n entity_id: input_boolean.heating_season\n state: 'on'\n - condition: state\n entity_id: binary_sensor.freeze_alert_at_night\n state: 'on'\n - condition: template\n value_template: \"{{ is_state('binary_sensor.people_home', 'on') or\\n is_state('input_boolean.guest_mode',\\\n \\ 'on')}}\\n\"\n actions:\n - action: timer.cancel\n entity_id:\n - timer.heating_quarantine\n - timer.short_heating\n - timer.pause_heating\n - action: script.notify_and_create_persistent_notification\n data:\n title: ⚠️ Предупреждение\n message: Температура упала ниже порога\n - action: input_text.set_value\n data:\n entity_id: input_text.heating_log\n value: Температура упала ниже порога\n - action: notify.mobile_app_sm_s901b\n data:\n title: 💬 Системное уведомление\n message: Термостат был снова включен в {{ states('sensor.time') }}, чтобы вы\n не замёрзли\n - action: script.thermostat_stop_heating\n data:\n message: Температура упала ниже порога ночью → термостат переведён на 22°C",
"config": [
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
},
{
"name": "Guest mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.guest_mode",
"device_id": null
}
},
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "Pause heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.pause_heating",
"device_id": null
}
},
{
"name": "Heating quarantine timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.heating_quarantine",
"device_id": null
}
},
{
"name": "Short heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.short_heating",
"device_id": null
}
},
{
"name": "Heating log input text",
"room": "home",
"type": "input_text",
"id": {
"entity_id": "input_text.heating_log",
"device_id": null
}
},
{
"name": "Thermostat stop heating script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.thermostat_stop_heating",
"device_id": null
}
},
{
"name": "Freeze alert at night binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.freeze_alert_at_night",
"device_id": null
}
},
{
"name": "People home binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.people_home",
"device_id": null
}
},
{
"name": "Notify and create persistent notification script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.notify_and_create_persistent_notification",
"device_id": null
}
},
{
"name": "Time sensor",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.time",
"device_id": null
}
}
]
},
{
"id": "thermostat_preheat_alert",
"automation": "- alias: Thermostat Preheat Alert\n id: thermostat_preheat_alert\n mode: single\n max_exceeded: silent\n triggers:\n - trigger: numeric_state\n entity_id: climate.family_room\n attribute: current_temperature\n above: 25.0\n for: 00:05:00\n - trigger: time_pattern\n hours: /1\n conditions:\n - condition: state\n entity_id: input_boolean.heating_season\n state: 'on'\n - condition: numeric_state\n entity_id: climate.family_room\n attribute: current_temperature\n above: 25.0\n - condition: template\n value_template: \"{{ states('climate.family_room') == 'heat' and\\n state_attr('climate.family_room',\\\n \\ 'temperature') >= 25.0 }}\\n\"\n actions:\n - action: script.notify_and_create_persistent_notification\n data:\n title: ⚠️ Предупреждение\n message: 'Термостат был переведён в автоматический режим по причине высокой\n температуры в квартире в {{ states(''sensor.time'') }}\n\n '\n - action: script.thermostat_stop_heating\n data:\n message: Температура поднялась выше порога → термостат переведён на 22°C",
"config": [
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "Thermostat stop heating script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.thermostat_stop_heating",
"device_id": null
}
},
{
"name": "Notify and create persistent notification script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.notify_and_create_persistent_notification",
"device_id": null
}
},
{
"name": "Family room climate",
"room": "living_room",
"type": "climate",
"id": {
"entity_id": "climate.family_room",
"device_id": null
}
},
{
"name": "Time sensor",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.time",
"device_id": null
}
}
]
},
{
"id": "thermostat_heating_duration_alert",
"automation": "- alias: Thermostat Heating Duration Alert\n id: thermostat_heating_duration_alert\n mode: single\n max_exceeded: silent\n triggers:\n - trigger: state\n entity_id: binary_sensor.thermostat_heating\n from: 'off'\n to: 'on'\n for: 01:00:00\n conditions:\n - condition: state\n entity_id: input_boolean.heating_season\n state: 'on'\n actions:\n - action: timer.cancel\n entity_id:\n - timer.heating_quarantine\n - timer.short_heating\n - timer.pause_heating\n - action: script.notify_and_create_persistent_notification\n data:\n title: ⚠️ Предупреждение\n message: Термостат работает более часа → отопление отключено на 1 час в {{ states('sensor.time')\n }}\n - action: timer.start\n entity_id: timer.pause_heating\n - action: script.thermostat_stop_heating\n data:\n message: Термостат работает более часа → отопление отключено на 1 час",
"config": [
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "Pause heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.pause_heating",
"device_id": null
}
},
{
"name": "Heating quarantine timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.heating_quarantine",
"device_id": null
}
},
{
"name": "Short heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.short_heating",
"device_id": null
}
},
{
"name": "Thermostat stop heating script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.thermostat_stop_heating",
"device_id": null
}
},
{
"name": "Notify and create persistent notification script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.notify_and_create_persistent_notification",
"device_id": null
}
},
{
"name": "Thermostat heating binary sensor",
"room": "living_room",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.thermostat_heating",
"device_id": null
}
},
{
"name": "Time sensor",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.time",
"device_id": null
}
}
]
},
{
"id": "short_heating_start",
"automation": "- alias: Short Heating Start\n id: short_heating_start\n mode: single\n max_exceeded: silent\n triggers:\n - trigger: state\n entity_id: input_button.thermostat_10_minutes_heating\n actions:\n - if:\n - or:\n - condition: state\n entity_id: binary_sensor.thermostat_heating\n state: 'on'\n - condition: state\n entity_id: timer.short_heating\n state: active\n then:\n - action: media_player.play_media\n entity_id: media_player.yandex_station_midi\n data:\n media_content_id: Квартира уже подогревается\n media_content_type: text\n else:\n - action: timer.cancel\n entity_id:\n - timer.heating_quarantine\n - timer.short_heating\n - timer.pause_heating\n - action: timer.start\n entity_id: timer.short_heating\n - action: media_player.play_media\n entity_id: media_player.yandex_station_midi\n data:\n media_content_id: Включен кратковременный подогрев квартиры\n media_content_type: text\n - action: script.thermostat_start_heating\n data:\n message: Включен кратковременный подогрев квартиры",
"config": [
{
"name": "Yandex station midi media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station_midi",
"device_id": null
}
},
{
"name": "Pause heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.pause_heating",
"device_id": null
}
},
{
"name": "Heating quarantine timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.heating_quarantine",
"device_id": null
}
},
{
"name": "Short heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.short_heating",
"device_id": null
}
},
{
"name": "Thermostat heating binary sensor",
"room": "living_room",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.thermostat_heating",
"device_id": null
}
},
{
"name": "Thermostat 10 minutes heating input button",
"room": "living_room",
"type": "input_button",
"id": {
"entity_id": "input_button.thermostat_10_minutes_heating",
"device_id": null
}
},
{
"name": "Thermostat start heating script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.thermostat_start_heating",
"device_id": null
}
},
{
"name": "Yandex station media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station",
"device_id": null
}
}
]
},
{
"id": "short_heating_end",
"automation": "- alias: Short Heating End\n id: short_heating_end\n mode: single\n max_exceeded: silent\n triggers:\n - platform: event\n event_type: timer.finished\n event_data:\n entity_id: timer.short_heating\n conditions:\n - condition: state\n entity_id: input_boolean.heating_season\n state: 'on'\n actions:\n - action: media_player.play_media\n entity_id: media_player.yandex_station_midi\n data:\n media_content_id: Кратковременный подогрев квартиры окончен\n media_content_type: text\n - if:\n - condition: state\n entity_id: binary_sensor.etrvs_requesting_heat\n state: 'off'\n - condition: state\n entity_id: binary_sensor.heating_request_bathroom\n state: 'off'\n then:\n - action: script.thermostat_stop_heating\n data:\n message: Кратковременный подогрев квартиры окончен",
"config": [
{
"name": "Yandex station midi media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station_midi",
"device_id": null
}
},
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "Short heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.short_heating",
"device_id": null
}
},
{
"name": "Thermostat stop heating script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.thermostat_stop_heating",
"device_id": null
}
},
{
"name": "ETRVs requesting heat binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.etrvs_requesting_heat",
"device_id": null
}
},
{
"name": "Heating request bathroom binary sensor",
"room": "bathroom",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.heating_request_bathroom",
"device_id": null
}
},
{
"name": "Yandex station media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station",
"device_id": null
}
}
]
},
{
"id": "disable_heating_when_noone_home",
"automation": "- alias: Disable Heating When Noone Home\n id: disable_heating_when_noone_home\n mode: single\n max_exceeded: silent\n triggers:\n - trigger: state\n entity_id: binary_sensor.people_home\n from: 'on'\n to: 'off'\n for: 00:05:00\n conditions:\n - condition: state\n entity_id: input_boolean.heating_season\n state: 'on'\n - condition: state\n entity_id: binary_sensor.thermostat_active\n state: 'on'\n - condition: state\n entity_id: input_boolean.guest_mode\n state: 'off'\n actions:\n - action: timer.cancel\n entity_id:\n - timer.heating_quarantine\n - timer.short_heating\n - timer.pause_heating\n - action: script.thermostat_set_eco_mode\n data:\n message: Никого нет дома → переход в режим экономии",
"config": [
{
"name": "Guest mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.guest_mode",
"device_id": null
}
},
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "Thermostat active binary sensor",
"room": "living_room",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.thermostat_active",
"device_id": null
}
},
{
"name": "Pause heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.pause_heating",
"device_id": null
}
},
{
"name": "Heating quarantine timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.heating_quarantine",
"device_id": null
}
},
{
"name": "Short heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.short_heating",
"device_id": null
}
},
{
"name": "Thermostat set eco mode script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.thermostat_set_eco_mode",
"device_id": null
}
},
{
"name": "People home binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.people_home",
"device_id": null
}
}
]
},
{
"id": "restore_heating_when_someone_home",
"automation": "- alias: Restore Heating When Someone Home\n id: restore_heating_when_someone_home\n mode: single\n max_exceeded: silent\n triggers:\n - trigger: state\n entity_id: binary_sensor.people_home\n from: 'off'\n to: 'on'\n conditions:\n - condition: state\n entity_id: input_boolean.heating_season\n state: 'on'\n - condition: state\n entity_id: binary_sensor.thermostat_active\n state: 'off'\n actions:\n - if:\n - condition: state\n entity_id: binary_sensor.windows\n state: 'on'\n then:\n - action: script.thermostat_set_eco_mode\n data:\n message: Окно открыто при возращении домой → сохранение режима экономии\n else:\n - action: script.thermostat_stop_heating\n data:\n message: Возвращение домой → отопление включено",
"config": [
{
"name": "Windows binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.windows",
"device_id": null
}
},
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "Thermostat active binary sensor",
"room": "living_room",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.thermostat_active",
"device_id": null
}
},
{
"name": "Thermostat set eco mode script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.thermostat_set_eco_mode",
"device_id": null
}
},
{
"name": "Thermostat stop heating script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.thermostat_stop_heating",
"device_id": null
}
},
{
"name": "People home binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.people_home",
"device_id": null
}
}
]
},
{
"id": "start_heating_by_etrv_request",
"automation": "- alias: Start Heating by ETRV Request\n id: start_heating_by_etrv_request\n mode: single\n max_exceeded: silent\n triggers:\n - trigger: state\n entity_id: binary_sensor.etrvs_requesting_heat\n from: 'off'\n to: 'on'\n for: 00:01:00\n - trigger: time_pattern\n minutes: /2\n conditions:\n - condition: state\n entity_id: input_boolean.heating_season\n state: 'on'\n - condition: state\n entity_id: binary_sensor.etrvs_requesting_heat\n state: 'on'\n - condition: state\n entity_id: binary_sensor.windows\n state: 'off'\n for: 00:05:00\n - condition: state\n entity_id: timer.heating_quarantine\n state: idle\n - condition: state\n entity_id: timer.pause_heating\n state: idle\n - condition: state\n entity_id: timer.short_heating\n state: idle\n - condition: template\n value_template: \"{{ is_state('binary_sensor.people_home', 'on') or\\n is_state('input_boolean.guest_mode',\\\n \\ 'on')}}\\n\"\n - condition: state\n entity_id: binary_sensor.thermostat_heating\n state: 'off'\n actions:\n - action: script.thermostat_start_heating\n - action: input_boolean.turn_on\n entity_id: input_boolean.heating_allowed",
"config": [
{
"name": "Windows binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.windows",
"device_id": null
}
},
{
"name": "Guest mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.guest_mode",
"device_id": null
}
},
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "Pause heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.pause_heating",
"device_id": null
}
},
{
"name": "Heating quarantine timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.heating_quarantine",
"device_id": null
}
},
{
"name": "Short heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.short_heating",
"device_id": null
}
},
{
"name": "People home binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.people_home",
"device_id": null
}
},
{
"name": "Thermostat heating binary sensor",
"room": "living_room",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.thermostat_heating",
"device_id": null
}
},
{
"name": "ETRVs requesting heat binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.etrvs_requesting_heat",
"device_id": null
}
},
{
"name": "Thermostat start heating script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.thermostat_start_heating",
"device_id": null
}
},
{
"name": "Heating allowed input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_allowed",
"device_id": null
}
}
]
},
{
"id": "start_heating_in_bathroom",
"automation": "- alias: Start Heating in Bathroom\n id: start_heating_in_bathroom\n mode: single\n max_exceeded: silent\n trigger:\n - platform: state\n entity_id: binary_sensor.heating_request_bathroom\n from: 'off'\n to: 'on'\n condition:\n - condition: state\n entity_id: input_boolean.heating_season\n state: 'on'\n - condition: state\n entity_id: timer.pause_heating\n state: idle\n - condition: state\n entity_id: timer.short_heating\n state: idle\n - condition: template\n value_template: \"{{ is_state('binary_sensor.people_home', 'on') or\\n is_state('input_boolean.guest_mode',\\\n \\ 'on')}}\\n\"\n - condition: state\n entity_id: binary_sensor.thermostat_heating\n state: 'off'\n action:\n - action: script.thermostat_start_heating",
"config": [
{
"name": "Guest mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.guest_mode",
"device_id": null
}
},
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "Pause heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.pause_heating",
"device_id": null
}
},
{
"name": "Short heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.short_heating",
"device_id": null
}
},
{
"name": "People home binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.people_home",
"device_id": null
}
},
{
"name": "Thermostat heating binary sensor",
"room": "living_room",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.thermostat_heating",
"device_id": null
}
},
{
"name": "Heating request bathroom binary sensor",
"room": "bathroom",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.heating_request_bathroom",
"device_id": null
}
},
{
"name": "Thermostat start heating script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.thermostat_start_heating",
"device_id": null
}
}
]
},
{
"id": "stop_heating_by_etrv_request",
"automation": "- alias: Stop Heating by ETRV Request\n id: stop_heating_by_etrv_request\n mode: single\n max_exceeded: silent\n triggers:\n - trigger: state\n entity_id: binary_sensor.etrvs_requesting_heat\n from: 'on'\n to: 'off'\n for: 00:01:00\n - trigger: state\n entity_id: binary_sensor.heating_request_bathroom\n from: 'on'\n to: 'off'\n for: 00:01:00\n - trigger: time_pattern\n minutes: /2\n conditions:\n - condition: state\n entity_id: input_boolean.heating_season\n state: 'on'\n - condition: state\n entity_id: binary_sensor.etrvs_requesting_heat\n state: 'off'\n - condition: state\n entity_id: binary_sensor.heating_request_bathroom\n state: 'off'\n - condition: state\n entity_id: timer.short_heating\n state: idle\n - condition: state\n entity_id: binary_sensor.thermostat_heating\n state: 'on'\n actions:\n - action: script.thermostat_stop_heating\n data:\n message: ETRVs не запрашивают отопление → температура возвращена на 22°C",
"config": [
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "Short heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.short_heating",
"device_id": null
}
},
{
"name": "Thermostat stop heating script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.thermostat_stop_heating",
"device_id": null
}
},
{
"name": "Thermostat heating binary sensor",
"room": "living_room",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.thermostat_heating",
"device_id": null
}
},
{
"name": "ETRVs requesting heat binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.etrvs_requesting_heat",
"device_id": null
}
},
{
"name": "Heating request bathroom binary sensor",
"room": "bathroom",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.heating_request_bathroom",
"device_id": null
}
}
]
},
{
"id": "start_pause_heating_manually",
"automation": "- alias: Start Pause Heating Manually\n id: start_pause_heating_manually\n mode: single\n max_exceeded: silent\n trigger:\n - platform: state\n entity_id: input_boolean.heating_allowed\n from: 'on'\n to: 'off'\n condition:\n - condition: state\n entity_id: input_boolean.heating_season\n state: 'on'\n - condition: state\n entity_id: binary_sensor.thermostat_heating\n state: 'on'\n action:\n - if:\n - condition: state\n entity_id: timer.short_heating\n state: active\n then:\n - action: media_player.play_media\n entity_id: media_player.yandex_station_midi\n data:\n media_content_id: Подогрев квартиры окончен раньше вручную\n media_content_type: text\n - action: timer.cancel\n entity_id:\n - timer.heating_quarantine\n - timer.short_heating\n - timer.pause_heating\n - action: timer.start\n entity_id: timer.pause_heating\n - action: script.thermostat_stop_heating\n data:\n message: Отопление заблокировано вручную → температура возвращена на 22°C",
"config": [
{
"name": "Yandex station midi media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station_midi",
"device_id": null
}
},
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "Pause heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.pause_heating",
"device_id": null
}
},
{
"name": "Heating quarantine timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.heating_quarantine",
"device_id": null
}
},
{
"name": "Short heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.short_heating",
"device_id": null
}
},
{
"name": "Thermostat stop heating script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.thermostat_stop_heating",
"device_id": null
}
},
{
"name": "Thermostat heating binary sensor",
"room": "living_room",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.thermostat_heating",
"device_id": null
}
},
{
"name": "Heating allowed input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_allowed",
"device_id": null
}
},
{
"name": "Yandex station media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station",
"device_id": null
}
}
]
},
{
"id": "cancel_pause_heating_manually",
"automation": "- alias: Cancel Pause Heating Manually\n id: cancel_pause_heating_manually\n mode: single\n max_exceeded: silent\n trigger:\n - platform: state\n entity_id: input_boolean.heating_allowed\n from: 'off'\n to: 'on'\n condition:\n - condition: state\n entity_id: input_boolean.heating_season\n state: 'on'\n - condition: state\n entity_id: timer.pause_heating\n state: active\n action:\n - action: timer.cancel\n entity_id: timer.pause_heating\n - action: media_player.play_media\n entity_id: media_player.yandex_station_midi\n data:\n media_content_id: Блокировка отопления отменена вручную\n media_content_type: text\n - action: input_text.set_value\n data:\n entity_id: input_text.heating_log\n value: Блокировка отопления отменена вручную",
"config": [
{
"name": "Yandex station midi media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station_midi",
"device_id": null
}
},
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "Pause heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.pause_heating",
"device_id": null
}
},
{
"name": "Heating log input text",
"room": "home",
"type": "input_text",
"id": {
"entity_id": "input_text.heating_log",
"device_id": null
}
},
{
"name": "Heating allowed input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_allowed",
"device_id": null
}
},
{
"name": "Yandex station media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station",
"device_id": null
}
}
]
},
{
"id": "log_heating_changes",
"automation": "- alias: Log Heating Changes\n id: log_heating_changes\n mode: parallel\n max: 10\n trigger:\n - platform: state\n entity_id:\n - binary_sensor.thermostat_heating\n - binary_sensor.thermostat_active\n - binary_sensor.etrvs_requesting_heat\n - binary_sensor.heating_request_bathroom\n - binary_sensor.freeze_alert_at_night\n - binary_sensor.windows\n - binary_sensor.people_home\n - input_boolean.heating_season\n - input_boolean.guest_mode\n - input_boolean.heating_allowed\n - input_number.thermostat_new_target_temperature\n - timer.heating_quarantine\n - timer.short_heating\n - timer.pause_heating\n actions:\n - condition: template\n value_template: '{{ trigger.from_state is not none and trigger.to_state is not\n none }}'\n - action: input_text.set_value\n data:\n entity_id: input_text.heating_log\n value: '{% set entity_name = states[trigger.entity_id].name | default(trigger.entity_id)\n %} {% set new_state = trigger.to_state.state %} {% set old_state = trigger.from_state.state\n %} Изменено состояние \"{{ entity_name }}\" с {{ old_state }} на {{ new_state\n }}'",
"config": [
{
"name": "Windows binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.windows",
"device_id": null
}
},
{
"name": "Guest mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.guest_mode",
"device_id": null
}
},
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "Thermostat active binary sensor",
"room": "living_room",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.thermostat_active",
"device_id": null
}
},
{
"name": "Pause heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.pause_heating",
"device_id": null
}
},
{
"name": "Heating quarantine timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.heating_quarantine",
"device_id": null
}
},
{
"name": "Short heating timer",
"room": "home",
"type": "timer",
"id": {
"entity_id": "timer.short_heating",
"device_id": null
}
},
{
"name": "Heating log input text",
"room": "home",
"type": "input_text",
"id": {
"entity_id": "input_text.heating_log",
"device_id": null
}
},
{
"name": "Freeze alert at night binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.freeze_alert_at_night",
"device_id": null
}
},
{
"name": "People home binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.people_home",
"device_id": null
}
},
{
"name": "Thermostat heating binary sensor",
"room": "living_room",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.thermostat_heating",
"device_id": null
}
},
{
"name": "ETRVs requesting heat binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.etrvs_requesting_heat",
"device_id": null
}
},
{
"name": "Heating request bathroom binary sensor",
"room": "bathroom",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.heating_request_bathroom",
"device_id": null
}
},
{
"name": "Heating allowed input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_allowed",
"device_id": null
}
},
{
"name": "Thermostat new target temperature input number",
"room": "living_room",
"type": "input_number",
"id": {
"entity_id": "input_number.thermostat_new_target_temperature",
"device_id": null
}
}
]
},
{
"id": "sync_danfoss_etrv_window_contact_kitchen",
"automation": "- alias: Sync Danfoss ETRV Window Contact Kitchen\n id: sync_danfoss_etrv_window_contact_kitchen\n mode: queued\n max: 3\n trigger:\n - platform: state\n entity_id: binary_sensor.kitchen_window_contact\n for: 00:00:10\n - platform: time_pattern\n minutes: /10\n condition:\n - condition: state\n entity_id: input_boolean.heating_season\n state: 'on'\n - condition: template\n value_template: '{{ states(''binary_sensor.kitchen_window_contact'') in [''on'',\n ''off''] }}\n\n '\n action:\n - action: switch.turn_{{ states('binary_sensor.kitchen_window_contact') }}\n target:\n entity_id: switch.danfoss_etrv0103_kitchen_external_window_sensor",
"config": [
{
"name": "Kitchen window contact binary sensor",
"room": "kitchen",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.kitchen_window_contact",
"device_id": null
}
},
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "Danfoss ETRV0103 kitchen external window sensor switch",
"room": "kitchen",
"type": "switch",
"id": {
"entity_id": "switch.danfoss_etrv0103_kitchen_external_window_sensor",
"device_id": null
}
}
]
},
{
"id": "sync_danfoss_etrv_window_contact_bedroom",
"automation": "- alias: Sync Danfoss ETRV Window Contact Bedroom\n id: sync_danfoss_etrv_window_contact_bedroom\n mode: queued\n max: 3\n trigger:\n - platform: state\n entity_id: binary_sensor.bedroom_window_contact\n for: 00:00:10\n - platform: time_pattern\n minutes: /10\n condition:\n - condition: state\n entity_id: input_boolean.heating_season\n state: 'on'\n - condition: template\n value_template: '{{ states(''binary_sensor.bedroom_window_contact'') in [''on'',\n ''off''] }}\n\n '\n action:\n - action: switch.turn_{{ states('binary_sensor.bedroom_window_contact') }}\n target:\n entity_id: switch.danfoss_etrv0100_bedroom_external_window_sensor",
"config": [
{
"name": "Bedroom window contact binary sensor",
"room": "bedroom",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.bedroom_window_contact",
"device_id": null
}
},
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "Danfoss ETRV0100 bedroom external window sensor switch",
"room": "bedroom",
"type": "switch",
"id": {
"entity_id": "switch.danfoss_etrv0100_bedroom_external_window_sensor",
"device_id": null
}
}
]
},
{
"id": "sync_danfoss_etrv_window_contact_living_room",
"automation": "- alias: Sync Danfoss ETRV Window Contact Living Room\n id: sync_danfoss_etrv_window_contact_living_room\n mode: queued\n max: 3\n trigger:\n - platform: state\n entity_id: binary_sensor.living_room_window_contact\n for: 00:00:10\n - platform: time_pattern\n minutes: /10\n condition:\n - condition: state\n entity_id: input_boolean.heating_season\n state: 'on'\n - condition: template\n value_template: '{{ states(''binary_sensor.living_room_window_contact'') in [''on'',\n ''off''] }}\n\n '\n action:\n - action: switch.turn_{{ states('binary_sensor.living_room_window_contact') }}\n target:\n entity_id: switch.danfoss_etrv0103_living_room_external_window_sensor",
"config": [
{
"name": "Living room window contact binary sensor",
"room": "living_room",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.living_room_window_contact",
"device_id": null
}
},
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "Danfoss ETRV0103 living room external window sensor switch",
"room": "living_room",
"type": "switch",
"id": {
"entity_id": "switch.danfoss_etrv0103_living_room_external_window_sensor",
"device_id": null
}
}
]
},
{
"id": "sync_etrvs_heating_available_flag",
"automation": "- alias: Sync ETRVs Heating Available Flag\n id: sync_etrvs_heating_available_flag\n mode: queued\n max: 3\n trigger:\n - platform: state\n entity_id: binary_sensor.thermostat_heating\n for: 00:00:10\n - platform: time_pattern\n minutes: /10\n condition:\n - condition: state\n entity_id: input_boolean.heating_season\n state: 'on'\n - condition: template\n value_template: '{{ states(''binary_sensor.thermostat_heating'') in [''on'', ''off'']\n }}\n\n '\n action:\n - action: switch.turn_{{ states('binary_sensor.thermostat_heating') }}\n target:\n entity_id:\n - switch.danfoss_etrv0100_bedroom_heat_available\n - switch.danfoss_etrv0103_kitchen_heat_available\n - switch.danfoss_etrv0103_living_room_heat_available",
"config": [
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "Thermostat heating binary sensor",
"room": "living_room",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.thermostat_heating",
"device_id": null
}
},
{
"name": "Danfoss ETRV0100 bedroom heat available switch",
"room": "bedroom",
"type": "switch",
"id": {
"entity_id": "switch.danfoss_etrv0100_bedroom_heat_available",
"device_id": null
}
},
{
"name": "Danfoss ETRV0103 kitchen heat available switch",
"room": "kitchen",
"type": "switch",
"id": {
"entity_id": "switch.danfoss_etrv0103_kitchen_heat_available",
"device_id": null
}
},
{
"name": "Danfoss ETRV0103 living room heat available switch",
"room": "living_room",
"type": "switch",
"id": {
"entity_id": "switch.danfoss_etrv0103_living_room_heat_available",
"device_id": null
}
}
]
},
{
"id": "hall_lights_and_alice_greeting",
"automation": "- id: hall_lights_and_alice_greeting\n alias: Hall Lights and Alice Greeting\n mode: single\n max_exceeded: silent\n triggers:\n - trigger: state\n id: SEN_CAME_HOME\n entity_id: person.sen\n to: home\n - trigger: state\n id: KRIS_CAME_HOME\n entity_id: person.kris\n to: home\n actions:\n - wait_template: '{{ states(''binary_sensor.hall_door_contact'') == ''on'' }}'\n timeout: 00:15:00\n continue_on_timeout: false\n - if:\n - condition: trigger\n id: SEN_CAME_HOME\n then:\n - action: light.turn_on\n entity_id: light.hall_lights\n - wait_template: '{{ states(''binary_sensor.hall_door_contact'') == ''off'' }}'\n timeout: 00:10:00\n continue_on_timeout: false\n - choose:\n - conditions:\n - condition: trigger\n id: SEN_CAME_HOME\n - condition: template\n value_template: '{{ ( as_timestamp(states.person.kris.last_changed, 0) | int(0)\n ) < ( as_timestamp(states.person.sen.last_changed, 0) | int(0) ) }}'\n sequence:\n - delay: 00:00:01\n - action: media_player.play_media\n entity_id: media_player.yandex_station_midi\n data:\n media_content_id: 'Добро пожаловать домой мистер Морган!\n\n '\n media_content_type: dialog\n extra:\n volume_level: 0.8\n - choose:\n - conditions:\n - condition: sun\n after: sunset\n before_offset: 00:15:00\n sequence:\n - action: light.turn_on\n entity_id: light.string_lights\n - delay: 00:00:01\n - action: light.turn_on\n entity_id: light.kitchen_ceiling_light\n - conditions:\n - condition: trigger\n id: KRIS_CAME_HOME\n - condition: template\n value_template: '{{ ( as_timestamp(states.person.sen.last_changed, 0) | int(0)\n ) < ( as_timestamp(states.person.kris.last_changed, 0) | int(0) ) }}'\n sequence:\n - action: media_player.play_media\n alias: Only welcome\n entity_id: media_player.yandex_station_midi\n data:\n media_content_id: 'Добро пожаловать домой миссис Морган\n\n '\n media_content_type: dialog\n extra:\n volume_level: 0.6\n - conditions:\n - condition: state\n entity_id: person.sen\n state: home\n - condition: state\n entity_id: person.kris\n state: home\n sequence:\n - alias: Switch on lights and welcome\n choose:\n - conditions:\n - condition: sun\n after: sunset\n before_offset: 00:15:00\n sequence:\n - action: light.turn_on\n entity_id: light.string_lights\n - action: media_player.play_media\n alias: Welcome everybody\n entity_id: media_player.yandex_station_midi\n data:\n media_content_id: 'Добро пожаловать домой мистер и миссис Морган\n\n '\n media_content_type: dialog\n extra:\n volume_level: 0.6\n default:\n - action: script.notify_and_create_persistent_notification\n data:\n title: ⚠️ Предупреждение\n message: Автоматизация приветствия не смогла определить кто пришел домой",
"config": [
{
"name": "Yandex station midi media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station_midi",
"device_id": null
}
},
{
"name": "Sen person",
"room": "home",
"type": "person",
"id": {
"entity_id": "person.sen",
"device_id": null
}
},
{
"name": "Notify and create persistent notification script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.notify_and_create_persistent_notification",
"device_id": null
}
},
{
"name": "Hall door contact binary sensor",
"room": "hall",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.hall_door_contact",
"device_id": null
}
},
{
"name": "Kris person",
"room": "home",
"type": "person",
"id": {
"entity_id": "person.kris",
"device_id": null
}
},
{
"name": "Hall lights",
"room": "hall",
"type": "light",
"id": {
"entity_id": "light.hall_lights",
"device_id": null
}
},
{
"name": "String lights",
"room": "living_room",
"type": "light",
"id": {
"entity_id": "light.string_lights",
"device_id": null
}
},
{
"name": "Kitchen ceiling light",
"room": "kitchen",
"type": "light",
"id": {
"entity_id": "light.kitchen_ceiling_light",
"device_id": null
}
},
{
"name": "Yandex station media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station",
"device_id": null
}
}
]
},
{
"id": "home_all_lights_off",
"automation": "- id: home_all_lights_off\n alias: Home All Lights OFF\n mode: restart\n triggers:\n - trigger: state\n entity_id: binary_sensor.hall_door_contact\n from: 'on'\n to: 'off'\n conditions:\n - condition: state\n entity_id: binary_sensor.people_home\n state: 'on'\n - condition: state\n entity_id: input_boolean.guest_mode\n state: 'off'\n actions:\n - wait_template: '{{ states(''binary_sensor.people_home'') == ''off'' }}'\n timeout: 00:30:00\n continue_on_timeout: false\n - if:\n - condition: state\n entity_id: input_boolean.guest_mode\n state: 'off'\n then:\n - action: script.turn_on\n entity_id: script.turn_off_all_lights\n - action: scene.turn_on\n entity_id: scene.no_people_home\n - variables:\n action_enable_guest_mode: '{{ ''action_enable_guest_mode'' ~ context.id }}'\n - action: notify.mobile_app_sm_s901b\n data:\n title: 👋 До свидания\n message: \"{% if is_state('input_boolean.heating_season', 'on') %}\\n Термостат\\\n \\ и свет были отключены\\n{% else %}\\n Весь свет был отключен\\n{% endif\\\n \\ %}\\n\"\n data:\n actions:\n - action: '{{ action_enable_guest_mode }}'\n title: 👤 Включить гостевой режим\n - wait_for_trigger:\n - trigger: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_enable_guest_mode }}'\n - if:\n - condition: template\n value_template: '{{ wait.trigger.event.data.action == action_enable_guest_mode\n }}'\n then:\n - action: script.enable_guest_mode",
"config": [
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
},
{
"name": "Guest mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.guest_mode",
"device_id": null
}
},
{
"name": "Heating season input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.heating_season",
"device_id": null
}
},
{
"name": "People home binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.people_home",
"device_id": null
}
},
{
"name": "Hall door contact binary sensor",
"room": "hall",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.hall_door_contact",
"device_id": null
}
},
{
"name": "Turn off all lights script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.turn_off_all_lights",
"device_id": null
}
},
{
"name": "No people home scene",
"room": "home",
"type": "scene",
"id": {
"entity_id": "scene.no_people_home",
"device_id": null
}
},
{
"name": "Enable guest mode script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.enable_guest_mode",
"device_id": null
}
}
]
},
{
"id": "hall_lights_by_motion_on",
"automation": "- id: hall_lights_by_motion_on\n alias: Hall Lights by Motion ON\n triggers:\n - trigger: state\n entity_id: binary_sensor.hall_door_contact\n to: 'on'\n - trigger: state\n entity_id: binary_sensor.aqara_hall_motion_sensor_occupancy\n to: 'on'\n conditions:\n - condition: state\n entity_id: light.hall_lights\n state: 'off'\n actions:\n - action: light.turn_on\n entity_id: light.hall_lights\n - action: input_boolean.turn_on\n entity_id: input_boolean.flag_hall_lights_triggered_by_motion",
"config": [
{
"name": "Hall door contact binary sensor",
"room": "hall",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.hall_door_contact",
"device_id": null
}
},
{
"name": "Hall lights",
"room": "hall",
"type": "light",
"id": {
"entity_id": "light.hall_lights",
"device_id": null
}
},
{
"name": "Aqara hall motion sensor occupancy binary sensor",
"room": "hall",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.aqara_hall_motion_sensor_occupancy",
"device_id": null
}
},
{
"name": "Flag hall lights triggered by motion input boolean",
"room": "hall",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.flag_hall_lights_triggered_by_motion",
"device_id": null
}
}
]
},
{
"id": "hall_lights_by_motion_off",
"automation": "- id: hall_lights_by_motion_off\n alias: Hall Lights by Motion OFF\n triggers:\n - trigger: state\n entity_id: binary_sensor.aqara_hall_motion_sensor_occupancy\n to: 'off'\n conditions:\n - condition: state\n entity_id: input_boolean.flag_hall_lights_triggered_by_motion\n state: 'on'\n actions:\n - action: light.turn_off\n entity_id: light.hall_lights\n - action: input_boolean.turn_off\n entity_id: input_boolean.flag_hall_lights_triggered_by_motion",
"config": [
{
"name": "Hall lights",
"room": "hall",
"type": "light",
"id": {
"entity_id": "light.hall_lights",
"device_id": null
}
},
{
"name": "Aqara hall motion sensor occupancy binary sensor",
"room": "hall",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.aqara_hall_motion_sensor_occupancy",
"device_id": null
}
},
{
"name": "Flag hall lights triggered by motion input boolean",
"room": "hall",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.flag_hall_lights_triggered_by_motion",
"device_id": null
}
}
]
},
{
"id": "kitchen_asus_pc_background_lights_on",
"automation": "- id: kitchen_asus_pc_background_lights_on\n alias: Kitchen Asus PC Background Lights ON\n triggers:\n - trigger: state\n entity_id: switch.asus_pc\n from: 'off'\n to: 'on'\n - trigger: numeric_state\n entity_id: sun.sun\n attribute: elevation\n below: 4.0\n - trigger: state\n entity_id: weather.home_assistant_blue\n conditions:\n - condition: state\n entity_id: person.sen\n state: home\n - condition: state\n entity_id: switch.asus_pc\n state: 'on'\n - or:\n - condition: numeric_state\n entity_id: sun.sun\n attribute: elevation\n below: 4.0\n - condition: template\n value_template: '{{ states(''weather.home_assistant_blue'') not in [''sunny'',\n ''partlycloudy''] }}'\n actions:\n - action: light.turn_on\n entity_id: light.gyver_lamp\n data:\n effect: Oгoнь\n brightness: 150\n rgb_color:\n - 255\n - 39\n - 25\n - if:\n - condition: template\n value_template: '{{ states(''person.kris'') == ''home''}}'\n then:\n - action: switch.turn_off\n entity_id: switch.pc_backlight_sync_send\n else:\n - action: light.turn_on\n entity_id:\n - light.shelf_lighting\n - light.pc_backlight\n - action: switch.turn_on\n entity_id: switch.pc_backlight_sync_send",
"config": [
{
"name": "Sun sun entity",
"room": null,
"type": "sun",
"id": {
"entity_id": "sun.sun",
"device_id": null
}
},
{
"name": "Sen person",
"room": "home",
"type": "person",
"id": {
"entity_id": "person.sen",
"device_id": null
}
},
{
"name": "Kris person",
"room": "home",
"type": "person",
"id": {
"entity_id": "person.kris",
"device_id": null
}
},
{
"name": "Asus PC switch",
"room": "kitchen",
"type": "switch",
"id": {
"entity_id": "switch.asus_pc",
"device_id": null
}
},
{
"name": "Weather home assistant blue",
"room": "home",
"type": "weather",
"id": {
"entity_id": "weather.home_assistant_blue",
"device_id": null
}
},
{
"name": "Gyver lamp",
"room": "kitchen",
"type": "light",
"id": {
"entity_id": "light.gyver_lamp",
"device_id": null
}
},
{
"name": "PC backlight sync send switch",
"room": "kitchen",
"type": "switch",
"id": {
"entity_id": "switch.pc_backlight_sync_send",
"device_id": null
}
},
{
"name": "Shelf lighting",
"room": "kitchen",
"type": "light",
"id": {
"entity_id": "light.shelf_lighting",
"device_id": null
}
},
{
"name": "PC backlight",
"room": "kitchen",
"type": "light",
"id": {
"entity_id": "light.pc_backlight",
"device_id": null
}
}
]
},
{
"id": "kitchen_asus_pc_background_lights_off",
"automation": "- id: kitchen_asus_pc_background_lights_off\n alias: Kitchen Asus PC Background Lights OFF\n triggers:\n - trigger: state\n entity_id: switch.asus_pc\n from: 'on'\n to: 'off'\n actions:\n - action: light.turn_off\n entity_id:\n - light.gyver_lamp\n - light.shelf_lighting",
"config": [
{
"name": "Asus PC switch",
"room": "kitchen",
"type": "switch",
"id": {
"entity_id": "switch.asus_pc",
"device_id": null
}
},
{
"name": "Gyver lamp",
"room": "kitchen",
"type": "light",
"id": {
"entity_id": "light.gyver_lamp",
"device_id": null
}
},
{
"name": "Shelf lighting",
"room": "kitchen",
"type": "light",
"id": {
"entity_id": "light.shelf_lighting",
"device_id": null
}
}
]
},
{
"id": "kitchen_clock_disable_by_presence",
"automation": "- id: kitchen_clock_disable_by_presence\n alias: Kitchen Clock Disable by Presence\n triggers:\n - trigger: state\n entity_id: binary_sensor.people_home\n to: 'off'\n for: 00:01:00\n condition:\n - condition: state\n entity_id: input_boolean.guest_mode\n state: 'off'\n actions:\n - action: light.turn_off\n entity_id: light.7_seg_clock",
"config": [
{
"name": "Guest mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.guest_mode",
"device_id": null
}
},
{
"name": "People home binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.people_home",
"device_id": null
}
},
{
"name": "7 segment clock light",
"room": "kitchen",
"type": "light",
"id": {
"entity_id": "light.7_seg_clock",
"device_id": null
}
}
]
},
{
"id": "kitchen_clock_reenable",
"automation": "- id: kitchen_clock_reenable\n alias: Kitchen Clock Reenable\n triggers:\n - trigger: state\n entity_id: light.7_seg_clock\n to: 'off'\n for: 00:00:05\n - trigger: state\n entity_id: binary_sensor.kitchen_motion_alarm\n to: 'on'\n - trigger: state\n entity_id: input_boolean.home_night_mode\n to: 'off'\n conditions:\n - condition: state\n entity_id: light.7_seg_clock\n state: 'off'\n - condition: state\n entity_id: binary_sensor.people_home\n state: 'on'\n - condition: time\n after: 05:00:00\n before: '22:00:00'\n actions:\n - action: light.turn_on\n entity_id: light.7_seg_clock",
"config": [
{
"name": "Home night mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.home_night_mode",
"device_id": null
}
},
{
"name": "Kitchen motion alarm binary sensor",
"room": "kitchen",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.kitchen_motion_alarm",
"device_id": null
}
},
{
"name": "People home binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.people_home",
"device_id": null
}
},
{
"name": "7 segment clock light",
"room": "kitchen",
"type": "light",
"id": {
"entity_id": "light.7_seg_clock",
"device_id": null
}
}
]
},
{
"id": "interactive_cz_map_reenable",
"automation": "- id: interactive_cz_map_reenable\n alias: Interactive CZ Map Reenable\n triggers:\n - trigger: state\n entity_id: person.sen\n to: home\n - trigger: state\n entity_id: switch.asus_pc\n to: 'on'\n - trigger: state\n entity_id: input_boolean.home_night_mode\n to: 'off'\n conditions:\n - condition: state\n entity_id: switch.interactive_cz_map_enable\n state: 'off'\n - condition: state\n entity_id: person.sen\n state: home\n - condition: time\n after: 05:00:00\n before: '22:00:00'\n actions:\n - action: switch.turn_on\n entity_id: switch.interactive_cz_map_enable",
"config": [
{
"name": "Home night mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.home_night_mode",
"device_id": null
}
},
{
"name": "Sen person",
"room": "home",
"type": "person",
"id": {
"entity_id": "person.sen",
"device_id": null
}
},
{
"name": "Asus PC switch",
"room": "kitchen",
"type": "switch",
"id": {
"entity_id": "switch.asus_pc",
"device_id": null
}
},
{
"name": "Interactive CZ map enable switch",
"room": "living_room",
"type": "switch",
"id": {
"entity_id": "switch.interactive_cz_map_enable",
"device_id": null
}
}
]
},
{
"id": "wireless_charger_reenable",
"automation": "- id: wireless_charger_reenable\n alias: Wireless Charger Reenable\n triggers:\n - trigger: state\n entity_id: binary_sensor.people_home\n to: 'on'\n conditions:\n - condition: state\n entity_id: input_boolean.home_night_mode\n state: 'off'\n - condition: state\n entity_id: light.wireless_charger\n state: 'off'\n actions:\n - action: light.turn_on\n entity_id: light.wireless_charger",
"config": [
{
"name": "Home night mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.home_night_mode",
"device_id": null
}
},
{
"name": "People home binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.people_home",
"device_id": null
}
},
{
"name": "Wireless charger light",
"room": "bedroom",
"type": "light",
"id": {
"entity_id": "light.wireless_charger",
"device_id": null
}
}
]
},
{
"id": "parking_lights_on",
"automation": "- id: parking_lights_on\n alias: Parking Lights ON\n mode: queued\n triggers:\n - trigger: state\n entity_id: input_button.parking_light\n actions:\n - action: script.turn_on\n target:\n entity_id: script.switch_on_parking_light",
"config": [
{
"name": "Parking light input button",
"room": "parking",
"type": "input_button",
"id": {
"entity_id": "input_button.parking_light",
"device_id": null
}
},
{
"name": "Switch on parking light script",
"room": "parking",
"type": "script",
"id": {
"entity_id": "script.switch_on_parking_light",
"device_id": null
}
}
]
},
{
"id": "parking_light_emergency_on",
"automation": "- id: parking_light_emergency_on\n alias: Parking Light Emergency On\n triggers:\n - trigger: state\n entity_id: switch.parking_light\n to: 'off'\n for: 3600\n actions:\n - repeat:\n until:\n - condition: state\n entity_id: switch.parking_light\n state: 'on'\n sequence:\n - action: switch.turn_on\n entity_id: switch.parking_light\n - action: notify.mobile_app_sm_s901b\n data:\n title: 💬 Системное уведомление\n message: Реле освещения парковки было отключено более часа. Автоматическое\n включение в {{ states('sensor.time') }}\n - delay: 00:01:00",
"config": [
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
},
{
"name": "Parking light switch",
"room": "parking",
"type": "switch",
"id": {
"entity_id": "switch.parking_light",
"device_id": null
}
},
{
"name": "Time sensor",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.time",
"device_id": null
}
}
]
},
{
"id": "kitchen_led_strip_sync_with_spotlights",
"automation": "- id: kitchen_led_strip_sync_with_spotlights\n alias: Kitchen LED Strip Sync with Spotlights\n triggers:\n - trigger: state\n entity_id: light.kitchen_spotlights\n conditions:\n - condition: template\n value_template: '{{ trigger.to_state.state in [''on'', ''off''] }}'\n actions:\n - action: light.turn_{{ trigger.to_state.state }}\n entity_id: light.kitchen_led_strip",
"config": [
{
"name": "Kitchen spotlights",
"room": "kitchen",
"type": "light",
"id": {
"entity_id": "light.kitchen_spotlights",
"device_id": null
}
},
{
"name": "Kitchen LED strip",
"room": "kitchen",
"type": "light",
"id": {
"entity_id": "light.kitchen_led_strip",
"device_id": null
}
}
]
},
{
"id": "activate_night_mode",
"automation": "- id: activate_night_mode\n alias: Activate Night Mode\n mode: single\n max_exceeded: silent\n triggers:\n - trigger: state\n entity_id: input_button.activate_night_mode\n actions:\n - action: script.turn_on\n entity_id: script.activate_night_mode",
"config": [
{
"name": "Activate night mode input button",
"room": "bedroom",
"type": "input_button",
"id": {
"entity_id": "input_button.activate_night_mode",
"device_id": null
}
},
{
"name": "Activate night mode script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.activate_night_mode",
"device_id": null
}
}
]
},
{
"id": "busy_wall_switch_1",
"automation": "- id: busy_wall_switch_1\n alias: Busy Wall Switch 1\n mode: restart\n triggers:\n - trigger: state\n entity_id: binary_sensor.air_quality_station_digital_input_1\n from: 'off'\n to: 'on'\n - trigger: state\n entity_id: binary_sensor.air_quality_station_digital_input_1\n from: 'on'\n to: 'off'\n conditions:\n - condition: state\n entity_id: input_boolean.child_lock\n state: 'off'\n - condition: state\n entity_id: input_boolean.guest_mode\n state: 'off'\n actions:\n - action: light.toggle\n entity_id: light.living_room_ceiling_light",
"config": [
{
"name": "Guest mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.guest_mode",
"device_id": null
}
},
{
"name": "Air quality station digital input 1 binary sensor",
"room": "living_room",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.air_quality_station_digital_input_1",
"device_id": null
}
},
{
"name": "Child lock input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.child_lock",
"device_id": null
}
},
{
"name": "Living room ceiling light",
"room": "living_room",
"type": "light",
"id": {
"entity_id": "light.living_room_ceiling_light",
"device_id": null
}
}
]
},
{
"id": "busy_wall_switch_2",
"automation": "- id: busy_wall_switch_2\n alias: Busy Wall Switch 2\n mode: restart\n triggers:\n - trigger: state\n entity_id: binary_sensor.air_quality_station_digital_input_2\n from: 'off'\n to: 'on'\n - trigger: state\n entity_id: binary_sensor.air_quality_station_digital_input_2\n from: 'on'\n to: 'off'\n actions:\n - action: light.toggle\n entity_id: light.floor_lamp",
"config": [
{
"name": "Air quality station digital input 2 binary sensor",
"room": "living_room",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.air_quality_station_digital_input_2",
"device_id": null
}
},
{
"name": "Floor lamp",
"room": "living_room",
"type": "light",
"id": {
"entity_id": "light.floor_lamp",
"device_id": null
}
}
]
},
{
"id": "silent_mode_handler",
"automation": "- alias: Silent Mode Handler\n id: silent_mode_handler\n triggers:\n - trigger: state\n entity_id: input_boolean.silent_mode\n actions:\n service_template: \"{% if is_state('input_boolean.silent_mode', 'on') %}\\n script.set_silent_mode\\n\\\n {% else %}\\n script.reset_silent_mode\\n{% endif %}\\n\"",
"config": [
{
"name": "Silent mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.silent_mode",
"device_id": null
}
},
{
"name": "Set silent mode script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.set_silent_mode",
"device_id": null
}
},
{
"name": "Reset silent mode script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.reset_silent_mode",
"device_id": null
}
}
]
},
{
"id": "night_mode_handler",
"automation": "- alias: Night Mode Handler\n id: night_mode_handler\n triggers:\n - trigger: state\n entity_id: input_boolean.home_night_mode\n actions:\n service_template: \"{% if is_state('input_boolean.home_night_mode', 'on') %}\\n\\\n \\ script.home_night_mode\\n{% else %}\\n script.home_day_mode\\n{% endif %}\\n\"",
"config": [
{
"name": "Home night mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.home_night_mode",
"device_id": null
}
},
{
"name": "Home night mode script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.home_night_mode",
"device_id": null
}
},
{
"name": "Home day mode script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.home_day_mode",
"device_id": null
}
}
]
},
{
"id": "home_enable_night_mode_at_evening",
"automation": "- alias: Home Enable Night Mode at Evening\n id: home_enable_night_mode_at_evening\n mode: single\n triggers:\n - trigger: state\n entity_id: binary_sensor.bedroom_door_contact\n from: 'on'\n to: 'off'\n for: 00:00:30\n - trigger: time\n at: '21:00:00'\n conditions:\n - condition: time\n after: '20:00:00'\n before: 03:00:00\n - condition: state\n entity_id: binary_sensor.people_home\n state: 'on'\n actions:\n - action: input_boolean.turn_on\n entity_id:\n - input_boolean.home_night_mode\n - input_boolean.silent_mode",
"config": [
{
"name": "Home night mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.home_night_mode",
"device_id": null
}
},
{
"name": "People home binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.people_home",
"device_id": null
}
},
{
"name": "Silent mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.silent_mode",
"device_id": null
}
},
{
"name": "Bedroom door contact binary sensor",
"room": "bedroom",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.bedroom_door_contact",
"device_id": null
}
}
]
},
{
"id": "yandex_volume_increased_handler",
"automation": "- alias: Yandex Volume Increased Handler\n id: yandex_volume_increased_handler\n mode: single\n triggers:\n - trigger: state\n entity_id: media_player.yandex_station_midi\n conditions:\n - condition: time\n after: 06:00:00\n before: '12:00:00'\n - condition: state\n entity_id: input_boolean.silent_mode\n state: 'on'\n - condition: template\n value_template: '{% set from = trigger.from_state.attributes.volume_level | float(0)\n %} {% set to = trigger.to_state.attributes.volume_level | float(0) %} {{ to\n > from }}\n\n '\n actions:\n - action: input_boolean.turn_off\n entity_id:\n - input_boolean.home_night_mode\n - input_boolean.silent_mode",
"config": [
{
"name": "Home night mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.home_night_mode",
"device_id": null
}
},
{
"name": "Yandex station midi media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station_midi",
"device_id": null
}
},
{
"name": "Silent mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.silent_mode",
"device_id": null
}
},
{
"name": "Yandex station media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station",
"device_id": null
}
}
]
},
{
"id": "good_morning_handler",
"automation": "- alias: Good Morning Handler\n id: good_morning_handler\n mode: single\n triggers:\n - trigger: time\n at: 09:00:00\n - trigger: state\n entity_id: cover.bedroom\n to: open\n conditions:\n - condition: state\n entity_id: input_boolean.home_night_mode\n state: 'on'\n - condition: time\n after: 06:00:00\n before: '12:00:00'\n actions:\n - action: input_boolean.turn_off\n entity_id:\n - input_boolean.home_night_mode\n - input_boolean.silent_mode",
"config": [
{
"name": "Home night mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.home_night_mode",
"device_id": null
}
},
{
"name": "Silent mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.silent_mode",
"device_id": null
}
},
{
"name": "Cover bedroom",
"room": "bedroom",
"type": "cover",
"id": {
"entity_id": "cover.bedroom",
"device_id": null
}
}
]
},
{
"id": "silent_mode_by_bedroom_door_enable",
"automation": "- alias: Silent Mode by Bedroom Door Enable\n id: silent_mode_by_bedroom_door_enable\n mode: single\n triggers:\n - trigger: state\n entity_id: binary_sensor.bedroom_door_contact\n to: 'off'\n for: 00:00:30\n actions:\n - action: input_boolean.turn_on\n entity_id: input_boolean.silent_mode",
"config": [
{
"name": "Silent mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.silent_mode",
"device_id": null
}
},
{
"name": "Bedroom door contact binary sensor",
"room": "bedroom",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.bedroom_door_contact",
"device_id": null
}
}
]
},
{
"id": "silent_mode_by_bedroom_door_disable",
"automation": "- alias: Silent Mode by Bedroom Door Disable\n id: silent_mode_by_bedroom_door_disable\n mode: single\n triggers:\n - trigger: state\n entity_id: binary_sensor.bedroom_door_contact\n to: 'on'\n for: 00:00:30\n conditions:\n - condition: state\n entity_id: input_boolean.home_night_mode\n state: 'off'\n - condition: time\n after: 06:00:00\n before: '20:00:00'\n actions:\n - action: input_boolean.turn_off\n entity_id: input_boolean.silent_mode",
"config": [
{
"name": "Home night mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.home_night_mode",
"device_id": null
}
},
{
"name": "Silent mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.silent_mode",
"device_id": null
}
},
{
"name": "Bedroom door contact binary sensor",
"room": "bedroom",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.bedroom_door_contact",
"device_id": null
}
}
]
},
{
"id": "prevent_accidental_bedroom_lights_on",
"automation": "- alias: Prevent Accidental Bedroom Lights ON\n id: prevent_accidental_bedroom_lights_on\n triggers:\n - trigger: state\n entity_id:\n - light.bedroom_ceiling_light\n - light.bedroom_nightlight\n to: 'on'\n conditions:\n - condition: state\n entity_id: input_boolean.bedroom_lights_and_cover_safety_switch\n state: 'on'\n - condition: template\n value_template: '{{ trigger.to_state.context.user_id = None }}'\n actions:\n - action: light.turn_off\n data:\n entity_id: '{{ trigger.entity_id }}'",
"config": [
{
"name": "Bedroom ceiling light",
"room": "bedroom",
"type": "light",
"id": {
"entity_id": "light.bedroom_ceiling_light",
"device_id": null
}
},
{
"name": "Bedroom nightlight",
"room": "bedroom",
"type": "light",
"id": {
"entity_id": "light.bedroom_nightlight",
"device_id": null
}
},
{
"name": "Bedroom lights and cover safety switch input boolean",
"room": "bedroom",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.bedroom_lights_and_cover_safety_switch",
"device_id": null
}
}
]
},
{
"id": "prevent_accidental_bedroom_cover_open",
"automation": "- alias: Prevent Accidental Bedroom Cover Open\n id: prevent_accidental_bedroom_cover_open\n triggers:\n - trigger: state\n entity_id: cover.bedroom\n to: open\n conditions:\n - condition: state\n entity_id: input_boolean.bedroom_lights_and_cover_safety_switch\n state: 'on'\n - condition: template\n value_template: '{{ trigger.to_state.context.user_id = None }}'\n - condition: template\n value_template: secret TEMPLATE_NOT_A_YANDEX_USER_ID\n actions:\n - action: cover.close_cover\n data:\n entity_id: '{{ trigger.entity_id }}'",
"config": [
{
"name": "Cover bedroom",
"room": "bedroom",
"type": "cover",
"id": {
"entity_id": "cover.bedroom",
"device_id": null
}
},
{
"name": "Bedroom lights and cover safety switch input boolean",
"room": "bedroom",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.bedroom_lights_and_cover_safety_switch",
"device_id": null
}
}
]
},
{
"id": "prevent_accidental_yandex_volume_increase_at_silent_mode",
"automation": "- alias: Prevent Accidental Yandex Volume Increase at Silent Mode\n id: prevent_accidental_yandex_volume_increase_at_silent_mode\n triggers:\n - trigger: state\n entity_id: media_player.yandex_station\n - trigger: state\n entity_id: media_player.yandex_station_midi\n conditions:\n - condition: state\n entity_id: input_boolean.silent_mode\n state: 'on'\n - condition: template\n value_template: '{% set from = trigger.from_state.attributes.volume_level | float(0)\n %} {% set to = trigger.to_state.attributes.volume_level | float(0) %} {{ to\n > from and to > 0.4 }}\n\n '\n actions:\n - action: script.set_volume_level_repeatedly\n data:\n media_player: media_player.yandex_station_midi\n volume_level: 0.2\n - action: script.set_volume_level_repeatedly\n data:\n media_player: media_player.yandex_station\n volume_level: 0.4",
"config": [
{
"name": "Yandex station midi media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station_midi",
"device_id": null
}
},
{
"name": "Silent mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.silent_mode",
"device_id": null
}
},
{
"name": "Yandex station media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station",
"device_id": null
}
},
{
"name": "Set volume level repeatedly script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.set_volume_level_repeatedly",
"device_id": null
}
}
]
},
{
"id": "prevent_accidental_yandex_mini_volume_increase",
"automation": "- alias: Prevent Accidental Yandex Mini Volume Increase\n id: prevent_accidental_yandex_mini_volume_increase\n mode: restart\n triggers:\n - trigger: state\n entity_id: media_player.yandex_station\n conditions:\n - condition: template\n value_template: '{{ trigger.to_state.context.user_id == None }}'\n - condition: template\n value_template: '{% set from = trigger.from_state.attributes.volume_level | float(0)\n %} {% set to = trigger.to_state.attributes.volume_level | float(0) %} {{ to\n > from and to > 0.6 }}\n\n '\n actions:\n - action: script.set_volume_level_repeatedly\n data:\n media_player: media_player.yandex_station\n volume_level: 0.6",
"config": [
{
"name": "Yandex station media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station",
"device_id": null
}
},
{
"name": "Set volume level repeatedly script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.set_volume_level_repeatedly",
"device_id": null
}
}
]
},
{
"id": "notification_snow",
"automation": "- id: notification_snow\n alias: Notification Snow\n triggers:\n - trigger: numeric_state\n entity_id: sensor.openweathermap_snow\n above: 0\n actions:\n - action: notify.mobile_app_sm_s901b\n data_template:\n title: ❄️ Уведомление о снеге\n message: Должно выпадать {{ states('sensor.openweathermap_snow') }} мм/ч снега!",
"config": [
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
},
{
"name": "OpenWeatherMap snow sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.openweathermap_snow",
"device_id": null
}
}
]
},
{
"id": "notification_door_opened",
"automation": "- id: notification_door_opened\n alias: Notification Door Opened\n triggers:\n - trigger: state\n entity_id: binary_sensor.hall_door_contact\n to: 'on'\n conditions:\n - condition: template\n value_template: '{{ not states(''person.sen'') == ''home''}}\n\n '\n actions:\n - action: notify.mobile_app_sm_s901b\n data:\n title: 💬 Системное уведомление\n message: Входная дверь была открыта в {{ states('sensor.time') }}",
"config": [
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
},
{
"name": "Sen person",
"room": "home",
"type": "person",
"id": {
"entity_id": "person.sen",
"device_id": null
}
},
{
"name": "Hall door contact binary sensor",
"room": "hall",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.hall_door_contact",
"device_id": null
}
},
{
"name": "Time sensor",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.time",
"device_id": null
}
}
]
},
{
"id": "notification_kris_arrived",
"automation": "- id: notification_kris_arrived\n alias: Notification Kris Arrived\n triggers:\n - entity_id: person.kris\n to: home\n trigger: state\n conditions:\n - condition: state\n entity_id: input_boolean.home_night_mode\n state: 'off'\n actions:\n - data:\n title: '{{ ''👩‍🦰'' }} Семейное уведомление'\n message: Кристина пришла домой в {{ states('sensor.time') }}\n action: notify.mobile_app_sm_s901b\n - if:\n - condition: template\n value_template: '{{ is_state(''person.sen'', ''home'') }}'\n then:\n - entity_id: script.notify_via_kitchen_spotlights\n action: script.turn_on\n - if:\n - condition: state\n entity_id: switch.asus_pc\n state: 'on'\n then:\n - target:\n entity_id: select.pc_backlight_preset\n data:\n option: Alarm\n action: select.select_option\n - delay: 00:00:10\n - target:\n entity_id: select.pc_backlight_preset\n data:\n option: Gender\n action: select.select_option",
"config": [
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
},
{
"name": "Home night mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.home_night_mode",
"device_id": null
}
},
{
"name": "Sen person",
"room": "home",
"type": "person",
"id": {
"entity_id": "person.sen",
"device_id": null
}
},
{
"name": "Kris person",
"room": "home",
"type": "person",
"id": {
"entity_id": "person.kris",
"device_id": null
}
},
{
"name": "Asus PC switch",
"room": "kitchen",
"type": "switch",
"id": {
"entity_id": "switch.asus_pc",
"device_id": null
}
},
{
"name": "Time sensor",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.time",
"device_id": null
}
},
{
"name": "Notify via kitchen spotlights script",
"room": "kitchen",
"type": "script",
"id": {
"entity_id": "script.notify_via_kitchen_spotlights",
"device_id": null
}
},
{
"name": "PC backlight preset select",
"room": "kitchen",
"type": "select",
"id": {
"entity_id": "select.pc_backlight_preset",
"device_id": null
}
}
]
},
{
"id": "notification_ads_b_receiver_disconnected",
"automation": "- id: notification_ads_b_receiver_disconnected\n alias: Notification ADS-B Receiver Disconnected\n triggers:\n - trigger: state\n entity_id: binary_sensor.fr24_feeder_receiver_connected\n from: 'on'\n to: 'off'\n for: 00:05:00\n actions:\n - variables:\n timestamp: '{{ trigger.to_state.last_changed.astimezone(now().tzinfo).strftime(''%H:%M:%S'')\n }}'\n - action: script.notify_and_create_persistent_notification\n data:\n title: ⚠️ Предупреждение\n message: Связь с ADS-B приёмником была потеряна в {{ timestamp }}\n - action: automation.turn_on\n entity_id: automation.notification_ads_b_receiver_connection_restored",
"config": [
{
"name": "Notify and create persistent notification script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.notify_and_create_persistent_notification",
"device_id": null
}
},
{
"name": "FR24 feeder receiver connected binary sensor",
"room": "office",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.fr24_feeder_receiver_connected",
"device_id": null
}
},
{
"name": "Notification ADS-B receiver connection restored automation",
"room": "office",
"type": "automation",
"id": {
"entity_id": "automation.notification_ads_b_receiver_connection_restored",
"device_id": null
}
}
]
},
{
"id": "notification_ads_b_receiver_connection_restored",
"automation": "- id: notification_ads_b_receiver_connection_restored\n alias: Notification ADS-B Receiver Connection Restored\n triggers:\n - trigger: state\n entity_id: binary_sensor.fr24_feeder_receiver_connected\n from: 'off'\n to: 'on'\n for: 00:01:00\n actions:\n - variables:\n timestamp: '{{ trigger.to_state.last_changed.astimezone(now().tzinfo).strftime(''%H:%M:%S'')\n }}'\n - action: script.notify_and_create_persistent_notification\n data:\n title: 💬 Системное уведомление\n message: Связь с ADS-B приёмником была восстановлена в {{ timestamp }}\n - action: automation.turn_off\n entity_id: automation.notification_ads_b_receiver_connection_restored",
"config": [
{
"name": "Notify and create persistent notification script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.notify_and_create_persistent_notification",
"device_id": null
}
},
{
"name": "FR24 feeder receiver connected binary sensor",
"room": "office",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.fr24_feeder_receiver_connected",
"device_id": null
}
},
{
"name": "Notification ADS-B receiver connection restored automation",
"room": "office",
"type": "automation",
"id": {
"entity_id": "automation.notification_ads_b_receiver_connection_restored",
"device_id": null
}
}
]
},
{
"id": "notification_diesel_price_changed",
"automation": "- id: notification_diesel_price_changed\n alias: Notification Diesel Price Changed\n triggers:\n - trigger: state\n entity_id: sensor.diesel_price_ono\n conditions:\n - condition: template\n value_template: '{{ trigger.from_state.state != trigger.to_state.state }}\n\n '\n - condition: template\n value_template: '{{ is_number(trigger.from_state.state) and is_number(trigger.to_state.state)\n }}\n\n '\n actions:\n - action: script.notify_and_create_persistent_notification\n data:\n title: 💬 Системное уведомление\n message: 'Цена дизеля {{ ''упала'' if trigger.from_state.state | float(0) >\n trigger.to_state.state | float(0) else ''возрасла'' }} с {{ trigger.from_state.state\n }} до {{ trigger.to_state.state }} Kč/L\n\n '\n data:\n actions:\n - action: URI\n title: 📈 Open Chart\n uri: /lovelace/diesel-price",
"config": [
{
"name": "Notify and create persistent notification script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.notify_and_create_persistent_notification",
"device_id": null
}
},
{
"name": "Diesel price ONO sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.diesel_price_ono",
"device_id": null
}
}
]
},
{
"id": "notification_gasoline_price_changed",
"automation": "- id: notification_gasoline_price_changed\n alias: Notification Gasoline Price Changed\n triggers:\n - trigger: state\n entity_id: sensor.gasoline_price_ono\n conditions:\n - condition: template\n value_template: '{{ trigger.from_state.state != trigger.to_state.state }}\n\n '\n - condition: template\n value_template: '{{ is_number(trigger.from_state.state) and is_number(trigger.to_state.state)\n }}\n\n '\n actions:\n - action: notify.mobile_app_sm_g991b\n data:\n title: 💬 Системное уведомление\n message: 'Цена бензина {{ ''упала'' if trigger.from_state.state | float(0) >\n trigger.to_state.state | float(0) else ''возрасла'' }} с {{ trigger.from_state.state\n }} до {{ trigger.to_state.state }} Kč/L\n\n '\n data:\n actions:\n - action: URI\n title: 📈 Open Chart\n uri: /lovelace/gasoline-price",
"config": [
{
"name": "Mobile app SM-G991B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_g991b",
"device_id": null
}
},
{
"name": "Gasoline price ONO sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.gasoline_price_ono",
"device_id": null
}
}
]
},
{
"id": "notification_solar_panel_power_above_threshold",
"automation": "- id: notification_solar_panel_power_above_threshold\n alias: Notification Solar Panel Power Above Threshold\n triggers:\n - trigger: numeric_state\n entity_id: sensor.solar_panel_power\n above: 40\n for: 00:05:00\n actions:\n - action: notify.mobile_app_sm_s901b\n data:\n title: 🌞 Солнечная панель\n message: 'Мощность выше порога: {{ states(''sensor.solar_panel_power'') }} W'",
"config": [
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
},
{
"name": "Solar panel power sensor",
"room": "roof",
"type": "sensor",
"id": {
"entity_id": "sensor.solar_panel_power",
"device_id": null
}
}
]
},
{
"id": "notification_washing_finish",
"automation": "- id: notification_washing_finish\n alias: Notification Washing Finish\n triggers:\n - trigger: state\n entity_id: sensor.washing_machine_washer_job_state\n to: finish\n conditions:\n - condition: template\n value_template: '{{ (as_timestamp(now(), 0) - as_timestamp(states.sensor.washing_machine_washer_job_state.last_changed,\n 0)) < 14400 }}\n\n '\n actions:\n - action: script.yandex_joke_after_washing_clothes",
"config": [
{
"name": "Washing machine washer job state sensor",
"room": "bathroom",
"type": "sensor",
"id": {
"entity_id": "sensor.washing_machine_washer_job_state",
"device_id": null
}
},
{
"name": "Yandex joke after washing clothes script",
"room": "bathroom",
"type": "script",
"id": {
"entity_id": "script.yandex_joke_after_washing_clothes",
"device_id": null
}
}
]
},
{
"id": "notification_shopping_list_sen",
"automation": "- id: notification_shopping_list_sen\n alias: Notification Shopping List for Sen\n description: Shopping list reminder when Sen enters the supermarket\n mode: single\n trigger:\n - platform: state\n entity_id: person.sen\n to: JIP\n for: 00:02:00\n condition:\n - condition: numeric_state\n entity_id: todo.shopping_list\n above: 0\n action:\n - action: notify.mobile_app_sm_s901b\n data:\n message: 🛒 Открыть список покупок?\n data:\n clickAction: /todo?entity_id=todo.shopping_list\n url: /todo?entity_id=todo.shopping_list",
"config": [
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
},
{
"name": "Sen person",
"room": "home",
"type": "person",
"id": {
"entity_id": "person.sen",
"device_id": null
}
},
{
"name": "Todo shopping list",
"room": "home",
"type": "todo",
"id": {
"entity_id": "todo.shopping_list",
"device_id": null
}
}
]
},
{
"id": "notification_shopping_list_kris",
"automation": "- id: notification_shopping_list_kris\n alias: Notification Shopping List for Kris\n description: Shopping list reminder when Kris enters the supermarket\n mode: single\n trigger:\n - platform: state\n entity_id: person.kris\n to: JIP\n for: 00:02:00\n condition:\n - condition: numeric_state\n entity_id: todo.shopping_list\n above: 0\n action:\n - action: notify.mobile_app_sm_g991b\n data:\n message: 🛒 Открыть список покупок?\n data:\n clickAction: /todo?entity_id=todo.shopping_list\n url: /todo?entity_id=todo.shopping_list",
"config": [
{
"name": "Mobile app SM-G991B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_g991b",
"device_id": null
}
},
{
"name": "Kris person",
"room": "home",
"type": "person",
"id": {
"entity_id": "person.kris",
"device_id": null
}
},
{
"name": "Todo shopping list",
"room": "home",
"type": "todo",
"id": {
"entity_id": "todo.shopping_list",
"device_id": null
}
}
]
},
{
"id": "notification_watch_charged",
"automation": "- id: notification_watch_charged\n alias: Notification Watch Charged\n trigger:\n - platform: numeric_state\n entity_id: sensor.galaxy_watch6_classic_r7dh_battery_level\n above: 79\n conditions:\n - condition: state\n entity_id: person.sen\n state: home\n action:\n - action: notify.mobile_app_sm_s901b\n data:\n title: '{{ ''🔋'' }} Часы заряжены'\n message: Твои Galaxy Watch заряжены уже на 80%!\n - if:\n - condition: state\n entity_id: input_boolean.silent_mode\n state: 'off'\n then:\n - action: media_player.play_media\n entity_id: media_player.yandex_station_midi\n data:\n media_content_type: text\n media_content_id: Часы заряжены на 80%",
"config": [
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
},
{
"name": "Yandex station midi media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station_midi",
"device_id": null
}
},
{
"name": "Sen person",
"room": "home",
"type": "person",
"id": {
"entity_id": "person.sen",
"device_id": null
}
},
{
"name": "Silent mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.silent_mode",
"device_id": null
}
},
{
"name": "Yandex station media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station",
"device_id": null
}
},
{
"name": "Galaxy Watch6 Classic R7DH battery level sensor",
"room": "bedroom",
"type": "sensor",
"id": {
"entity_id": "sensor.galaxy_watch6_classic_r7dh_battery_level",
"device_id": null
}
}
]
},
{
"id": "update_plants_to_water_on_sensor_change",
"automation": "- alias: Update Plants to Water on Sensor Change\n id: update_plants_to_water_on_sensor_change\n mode: single\n max_exceeded: silent\n triggers:\n - trigger: time_pattern\n minutes: /10\n actions:\n - action: python_script.update_plants_to_water",
"config": [
{
"name": "Python script update plants to water",
"room": "home",
"type": "python_script",
"id": {
"entity_id": "python_script.update_plants_to_water",
"device_id": null
}
}
]
},
{
"id": "notify_on_plants_to_water",
"automation": "- alias: Notify on Plants to Water\n id: notify_on_plants_to_water\n mode: single\n max_exceeded: silent\n triggers:\n - trigger: state\n entity_id: input_text.plants_to_water\n conditions:\n - condition: template\n value_template: '{{ states(''input_text.plants_to_water'') | length > 0 }}'\n - condition: state\n entity_id: schedule.plant_watering_notification\n state: 'on'\n actions:\n - action: script.notify_and_create_persistent_notification\n data:\n title: 🪴 Домашние цветы\n message: 'Нужно полить следующие растения: {{ states(''input_text.plants_to_water'')\n }}'",
"config": [
{
"name": "Notify and create persistent notification script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.notify_and_create_persistent_notification",
"device_id": null
}
},
{
"name": "Plants to water input text",
"room": "home",
"type": "input_text",
"id": {
"entity_id": "input_text.plants_to_water",
"device_id": null
}
},
{
"name": "Schedule plant watering notification",
"room": "home",
"type": "schedule",
"id": {
"entity_id": "schedule.plant_watering_notification",
"device_id": null
}
}
]
},
{
"id": "scooter_charger_enable",
"automation": "- alias: Scooter Charger Enable\n id: scooter_charger_enable\n mode: restart\n max_exceeded: silent\n triggers:\n - trigger: state\n entity_id: input_boolean.scooter_charger\n to: 'on'\n actions:\n - action: switch.turn_on\n entity_id: switch.scooter_charger_socket\n - action: automation.turn_on\n entity_id: automation.scooter_charger_disable_when_idle\n - action: input_number.set_value\n data:\n entity_id: input_number.scooter_charger_energy_start\n value: '{{ states(''sensor.scooter_charger_summation_delivered'') | float(0)\n }}'\n - action: input_datetime.set_datetime\n data:\n entity_id: input_datetime.scooter_charger_energy_start_time\n datetime: '{{ now().strftime(''%Y-%m-%d %H:%M:%S'') }}'",
"config": [
{
"name": "Scooter charger input boolean",
"room": "hall",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.scooter_charger",
"device_id": null
}
},
{
"name": "Scooter charger socket switch",
"room": "hall",
"type": "switch",
"id": {
"entity_id": "switch.scooter_charger_socket",
"device_id": null
}
},
{
"name": "Scooter charger disable when idle automation",
"room": "hall",
"type": "automation",
"id": {
"entity_id": "automation.scooter_charger_disable_when_idle",
"device_id": null
}
},
{
"name": "Scooter charger summation delivered sensor",
"room": "hall",
"type": "sensor",
"id": {
"entity_id": "sensor.scooter_charger_summation_delivered",
"device_id": null
}
},
{
"name": "Scooter charger energy start input number",
"room": "hall",
"type": "input_number",
"id": {
"entity_id": "input_number.scooter_charger_energy_start",
"device_id": null
}
},
{
"name": "Scooter charger energy start time input datetime",
"room": "hall",
"type": "input_datetime",
"id": {
"entity_id": "input_datetime.scooter_charger_energy_start_time",
"device_id": null
}
}
]
},
{
"id": "scooter_charger_disable",
"automation": "- alias: Scooter Charger Disable\n id: scooter_charger_disable\n mode: restart\n max_exceeded: silent\n triggers:\n - trigger: state\n entity_id: input_boolean.scooter_charger\n to: 'off'\n actions:\n - action: switch.turn_off\n entity_id: switch.scooter_charger_socket\n - if:\n - condition: template\n value_template: '{{ states(''sensor.scooter_charger_energy_consumed'') | float(0)\n > 0 }}'\n then:\n - action: script.turn_on\n entity_id: script.scooter_charger_energy_consumed_notify\n - action: automation.turn_off\n entity_id: automation.scooter_charger_disable_when_idle",
"config": [
{
"name": "Scooter charger input boolean",
"room": "hall",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.scooter_charger",
"device_id": null
}
},
{
"name": "Scooter charger socket switch",
"room": "hall",
"type": "switch",
"id": {
"entity_id": "switch.scooter_charger_socket",
"device_id": null
}
},
{
"name": "Scooter charger disable when idle automation",
"room": "hall",
"type": "automation",
"id": {
"entity_id": "automation.scooter_charger_disable_when_idle",
"device_id": null
}
},
{
"name": "Scooter charger energy consumed sensor",
"room": "hall",
"type": "sensor",
"id": {
"entity_id": "sensor.scooter_charger_energy_consumed",
"device_id": null
}
},
{
"name": "Scooter charger energy consumed notify script",
"room": "hall",
"type": "script",
"id": {
"entity_id": "script.scooter_charger_energy_consumed_notify",
"device_id": null
}
}
]
},
{
"id": "scooter_charger_disable_when_idle",
"automation": "- alias: Scooter Charger Disable When Idle\n id: scooter_charger_disable_when_idle\n mode: restart\n max_exceeded: silent\n triggers:\n - trigger: numeric_state\n entity_id: sensor.scooter_charger_active_power\n below: 15\n for:\n minutes: 10\n actions:\n - action: switch.turn_off\n entity_id: switch.scooter_charger_socket\n - action: input_boolean.turn_off\n entity_id: input_boolean.scooter_charger\n - if:\n - condition: template\n value_template: '{{ states(''sensor.scooter_charger_energy_consumed'') | float(0)\n > 0 }}'\n then:\n - action: script.turn_on\n entity_id: script.scooter_charger_energy_consumed_notify\n - action: automation.turn_off\n entity_id: automation.scooter_charger_disable_when_idle",
"config": [
{
"name": "Scooter charger input boolean",
"room": "hall",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.scooter_charger",
"device_id": null
}
},
{
"name": "Scooter charger socket switch",
"room": "hall",
"type": "switch",
"id": {
"entity_id": "switch.scooter_charger_socket",
"device_id": null
}
},
{
"name": "Scooter charger disable when idle automation",
"room": "hall",
"type": "automation",
"id": {
"entity_id": "automation.scooter_charger_disable_when_idle",
"device_id": null
}
},
{
"name": "Scooter charger energy consumed sensor",
"room": "hall",
"type": "sensor",
"id": {
"entity_id": "sensor.scooter_charger_energy_consumed",
"device_id": null
}
},
{
"name": "Scooter charger energy consumed notify script",
"room": "hall",
"type": "script",
"id": {
"entity_id": "script.scooter_charger_energy_consumed_notify",
"device_id": null
}
},
{
"name": "Scooter charger active power sensor",
"room": "hall",
"type": "sensor",
"id": {
"entity_id": "sensor.scooter_charger_active_power",
"device_id": null
}
}
]
},
{
"id": "tag_near_pc_was_scanned",
"automation": "- alias: Tag Near PC was scanned\n id: tag_near_pc_was_scanned\n mode: single\n triggers:\n - trigger: tag\n tag_id: c45d3b71-2ade-45e3-8663-f0028f52b01d\n actions:\n - action: input_boolean.toggle\n target:\n entity_id: input_boolean.show_cameras_in_lovelace\n - action: notify.mobile_app_sm_s901b\n data:\n title: 👁️ Режим камер\n message: \"{% if is_state('input_boolean.show_cameras_in_lovelace', 'on') %}\\n\\\n \\ Камеры включены\\n{% else %}\\n Камеры выключены\\n{% endif %}\"",
"config": [
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
},
{
"name": "Show cameras in lovelace input boolean",
"room": "office",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.show_cameras_in_lovelace",
"device_id": null
}
}
]
},
{
"id": "reenable_cameras_if_hided",
"automation": "- alias: Reenable Cameras if Hided\n id: reenable_cameras_if_hided\n mode: single\n triggers:\n - trigger: state\n entity_id: input_boolean.show_cameras_in_lovelace\n to: 'off'\n for: 01:00:00\n actions:\n - action: input_boolean.turn_on\n target:\n entity_id: input_boolean.show_cameras_in_lovelace\n - action: notify.mobile_app_sm_s901b\n data:\n title: 👁️ Режим камер\n message: Камеры включены автоматически в {{ states('sensor.time') }}",
"config": [
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
},
{
"name": "Time sensor",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.time",
"device_id": null
}
},
{
"name": "Show cameras in lovelace input boolean",
"room": "office",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.show_cameras_in_lovelace",
"device_id": null
}
}
]
},
{
"id": "tag_near_entrance_was_scanned",
"automation": "- alias: Tag Near Entrance was scanned\n id: tag_near_entrance_was_scanned\n mode: restart\n triggers:\n - trigger: tag\n tag_id: 5954e702-f87d-4955-969c-5231af33ece8\n actions:\n - action: script.enable_guest_mode",
"config": [
{
"name": "Enable guest mode script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.enable_guest_mode",
"device_id": null
}
}
]
},
{
"id": "living_room_tv_lights_by_sunset_or_tv_on",
"automation": "- alias: Living Room TV Lights by Sunset or TV ON\n id: living_room_tv_lights_by_sunset_or_tv_on\n description: Turn on TV lights automatically by sunset or when TV is turned on\n mode: restart\n triggers:\n - trigger: numeric_state\n entity_id: sun.sun\n attribute: elevation\n below: 4.0\n - trigger: state\n entity_id: media_player.samsung_tv\n to: 'on'\n conditions:\n - condition: state\n entity_id: media_player.samsung_tv\n state: 'on'\n - condition: numeric_state\n entity_id: sun.sun\n attribute: elevation\n below: 4.0\n actions:\n - wait_template: \"{{ states('switch.asus_pc') == 'off' and\\n states('light.kitchen_spotlights')\\\n \\ == 'off' and\\n states('light.kitchen_ceiling_light') == 'off' and\\n states('light.bedroom_nightlight')\\\n \\ == 'off' and\\n states('binary_sensor.kitchen_motion_alarm') == 'off' }}\\n\"\n timeout: 01:00:00\n continue_on_timeout: false\n - if:\n - condition: state\n entity_id: media_player.samsung_tv\n state: 'on'\n then:\n - action: scene.turn_on\n entity_id: scene.movies",
"config": [
{
"name": "Sun sun entity",
"room": null,
"type": "sun",
"id": {
"entity_id": "sun.sun",
"device_id": null
}
},
{
"name": "Kitchen motion alarm binary sensor",
"room": "kitchen",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.kitchen_motion_alarm",
"device_id": null
}
},
{
"name": "Kitchen ceiling light",
"room": "kitchen",
"type": "light",
"id": {
"entity_id": "light.kitchen_ceiling_light",
"device_id": null
}
},
{
"name": "Asus PC switch",
"room": "kitchen",
"type": "switch",
"id": {
"entity_id": "switch.asus_pc",
"device_id": null
}
},
{
"name": "Kitchen spotlights",
"room": "kitchen",
"type": "light",
"id": {
"entity_id": "light.kitchen_spotlights",
"device_id": null
}
},
{
"name": "Bedroom nightlight",
"room": "bedroom",
"type": "light",
"id": {
"entity_id": "light.bedroom_nightlight",
"device_id": null
}
},
{
"name": "Samsung TV media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.samsung_tv",
"device_id": null
}
},
{
"name": "Movies scene",
"room": "living_room",
"type": "scene",
"id": {
"entity_id": "scene.movies",
"device_id": null
}
}
]
},
{
"id": "living_room_speakers_power_on_with_tv",
"automation": "- alias: Living Room Speakers Power On with TV\n id: living_room_speakers_power_on_with_tv\n description: Turn on speakers automatically when TV is turned on\n mode: restart\n trigger:\n - platform: state\n entity_id: media_player.samsung_tv\n to: 'on'\n condition:\n - condition: state\n entity_id: switch.monolith_speakers\n state: 'off'\n action:\n - action: switch.turn_on\n entity_id: switch.monolith_speakers",
"config": [
{
"name": "Samsung TV media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.samsung_tv",
"device_id": null
}
},
{
"name": "Monolith speakers switch",
"room": "living_room",
"type": "switch",
"id": {
"entity_id": "switch.monolith_speakers",
"device_id": null
}
}
]
},
{
"id": "living_room_speakers_standby_off",
"automation": "- alias: Living Room Speakers Standby OFF\n id: living_room_speakers_standby_off\n description: Turn off speakers when in standby mode for a while and TV is off\n mode: restart\n trigger:\n - platform: state\n entity_id: binary_sensor.monolith_speakers_above_power_threshold\n to: 'off'\n for:\n minutes: 5\n condition:\n - condition: state\n entity_id: switch.monolith_speakers\n state: 'on'\n - condition: state\n entity_id: media_player.samsung_tv\n state: 'off'\n action:\n - action: switch.turn_off\n entity_id: switch.monolith_speakers",
"config": [
{
"name": "Samsung TV media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.samsung_tv",
"device_id": null
}
},
{
"name": "Monolith speakers switch",
"room": "living_room",
"type": "switch",
"id": {
"entity_id": "switch.monolith_speakers",
"device_id": null
}
},
{
"name": "Monolith speakers above power threshold binary sensor",
"room": "living_room",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.monolith_speakers_above_power_threshold",
"device_id": null
}
}
]
},
{
"id": "living_room_speakers_auto_power_down",
"automation": "- alias: Living Room Speakers Auto Power Down\n id: living_room_speakers_auto_power_down\n description: Turn off speakers if power consumption remains low after powering on\n mode: restart\n trigger:\n - platform: state\n entity_id: switch.monolith_speakers\n to: 'on'\n action:\n - alias: Check if power consumption exceeds threshold\n wait_for_trigger:\n - platform: state\n entity_id: binary_sensor.monolith_speakers_above_power_threshold\n to: 'on'\n timeout:\n minutes: 5\n - if:\n - '{{ not wait.completed }}'\n - condition: state\n entity_id: media_player.samsung_tv\n state: 'off'\n then:\n - alias: Power off if threshold not exceeded\n action: switch.turn_off\n entity_id: switch.monolith_speakers",
"config": [
{
"name": "Samsung TV media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.samsung_tv",
"device_id": null
}
},
{
"name": "Monolith speakers switch",
"room": "living_room",
"type": "switch",
"id": {
"entity_id": "switch.monolith_speakers",
"device_id": null
}
},
{
"name": "Monolith speakers above power threshold binary sensor",
"room": "living_room",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.monolith_speakers_above_power_threshold",
"device_id": null
}
}
]
},
{
"id": "ups_lost_grid_power_notification",
"automation": "- alias: UPS Lost Grid Power Notification\n id: ups_lost_grid_power_notification\n mode: single\n triggers:\n - trigger: state\n entity_id: sensor.ups_status_data\n to: OB DISCHRG\n actions:\n - action: script.notify_and_create_persistent_notification\n data:\n title: 🚨 Внимание!\n message: 'UPS потерял питание в {{ states(''sensor.time'') }} Рассчётное время\n работы: {{ states(''sensor.ups_battery_runtime'') | int(0) | timestamp_custom(''%M:%S'')\n }} минут\n\n '\n - action: automation.turn_on\n entity_id: automation.ups_grid_power_restored_notification",
"config": [
{
"name": "Notify and create persistent notification script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.notify_and_create_persistent_notification",
"device_id": null
}
},
{
"name": "Time sensor",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.time",
"device_id": null
}
},
{
"name": "UPS status data sensor",
"room": "office",
"type": "sensor",
"id": {
"entity_id": "sensor.ups_status_data",
"device_id": null
}
},
{
"name": "UPS battery runtime sensor",
"room": "office",
"type": "sensor",
"id": {
"entity_id": "sensor.ups_battery_runtime",
"device_id": null
}
},
{
"name": "UPS grid power restored notification automation",
"room": "office",
"type": "automation",
"id": {
"entity_id": "automation.ups_grid_power_restored_notification",
"device_id": null
}
}
]
},
{
"id": "ups_grid_power_restored_notification",
"automation": "- alias: UPS Grid Power Restored Notification\n id: ups_grid_power_restored_notification\n mode: single\n triggers:\n - trigger: template\n value_template: '{{ ''OL'' in states(''sensor.ups_status_data'') }}'\n actions:\n - action: script.notify_and_create_persistent_notification\n data:\n title: 🚨 Внимание!\n message: Питание восстановлено в {{ states('sensor.time') }}\n - action: automation.turn_off\n entity_id: automation.ups_grid_power_restored_notification",
"config": [
{
"name": "Notify and create persistent notification script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.notify_and_create_persistent_notification",
"device_id": null
}
},
{
"name": "Time sensor",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.time",
"device_id": null
}
},
{
"name": "UPS status data sensor",
"room": "office",
"type": "sensor",
"id": {
"entity_id": "sensor.ups_status_data",
"device_id": null
}
},
{
"name": "UPS grid power restored notification automation",
"room": "office",
"type": "automation",
"id": {
"entity_id": "automation.ups_grid_power_restored_notification",
"device_id": null
}
}
]
},
{
"id": "ups_low_battery_warning_notification",
"automation": "- alias: UPS Low Battery Warning Notification\n id: ups_low_battery_warning_notification\n mode: single\n triggers:\n - trigger: numeric_state\n entity_id: sensor.ups_battery_charge\n below: 21\n actions:\n - action: notify.mobile_app_sm_s901b\n data:\n title: 🚨 Внимание!\n message: 'Низкий заряд аккумулятора UPS: {{ states(''sensor.ups_battery_charge'')\n }}%\n\n '",
"config": [
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
},
{
"name": "UPS battery charge sensor",
"room": "office",
"type": "sensor",
"id": {
"entity_id": "sensor.ups_battery_charge",
"device_id": null
}
}
]
},
{
"id": "ups_shutdown_home_assistant_server",
"automation": "- alias: UPS Shutdown Home Assistant Server\n id: ups_shutdown_home_assistant_server\n mode: single\n triggers:\n - trigger: numeric_state\n entity_id: sensor.ups_battery_charge\n below: 10\n - trigger: numeric_state\n entity_id: sensor.ups_battery_runtime\n below: 300\n - trigger: template\n value_template: '{{ ''OB DISCHRG LB'' in states(''sensor.ups_status_data'') }}'\n actions:\n - action: notify.mobile_app_sm_s901b\n data:\n title: 🚨 Внимание!\n message: 'Критически низкий заряд батареи UPS.\n\n Немедленное отключение сервера Home Assistant в {{ states(''sensor.time'')\n }}\n\n '\n - delay: 00:00:05\n - action: hassio.host_shutdown",
"config": [
{
"name": "Mobile app SM-S901B notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_sm_s901b",
"device_id": null
}
},
{
"name": "Time sensor",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.time",
"device_id": null
}
},
{
"name": "UPS status data sensor",
"room": "office",
"type": "sensor",
"id": {
"entity_id": "sensor.ups_status_data",
"device_id": null
}
},
{
"name": "UPS battery runtime sensor",
"room": "office",
"type": "sensor",
"id": {
"entity_id": "sensor.ups_battery_runtime",
"device_id": null
}
},
{
"name": "UPS battery charge sensor",
"room": "office",
"type": "sensor",
"id": {
"entity_id": "sensor.ups_battery_charge",
"device_id": null
}
}
]
},
{
"id": "ups_lost_grid_power_light_notification",
"automation": "- alias: UPS Lost Grid Power Light Notification\n id: ups_lost_grid_power_light_notification\n mode: single\n triggers:\n - trigger: template\n value_template: '{{ ''OB'' in states(''sensor.ups_status_data'') }}'\n actions:\n - action: light.turn_on\n data:\n entity_id: light.tradfri_bulb\n brightness: 255\n effect: breathe\n - action: automation.turn_on\n entity_id: automation.ups_grid_power_restored_light_notification",
"config": [
{
"name": "UPS status data sensor",
"room": "office",
"type": "sensor",
"id": {
"entity_id": "sensor.ups_status_data",
"device_id": null
}
},
{
"name": "UPS grid power restored light notification automation",
"room": "office",
"type": "automation",
"id": {
"entity_id": "automation.ups_grid_power_restored_light_notification",
"device_id": null
}
},
{
"name": "Tradfri bulb",
"room": "office",
"type": "light",
"id": {
"entity_id": "light.tradfri_bulb",
"device_id": null
}
}
]
},
{
"id": "ups_grid_power_restored_light_notification",
"automation": "- alias: UPS Grid Power Restored Light Notification\n id: ups_grid_power_restored_light_notification\n mode: single\n triggers:\n - trigger: template\n value_template: '{{ ''OL'' in states(''sensor.ups_status_data'') }}'\n actions:\n - action: light.turn_on\n data:\n entity_id: light.tradfri_bulb\n brightness: 255\n - wait_template: '{{ not (''OL'' in states(''sensor.ups_status_data'')) }}'\n timeout: 00:00:10\n - if:\n - condition: template\n value_template: '{{ ''OL'' in states(''sensor.ups_status_data'') }}'\n then:\n - action: light.turn_off\n entity_id: light.tradfri_bulb\n - action: automation.turn_off\n entity_id: automation.ups_grid_power_restored_light_notification",
"config": [
{
"name": "UPS status data sensor",
"room": "office",
"type": "sensor",
"id": {
"entity_id": "sensor.ups_status_data",
"device_id": null
}
},
{
"name": "UPS grid power restored light notification automation",
"room": "office",
"type": "automation",
"id": {
"entity_id": "automation.ups_grid_power_restored_light_notification",
"device_id": null
}
},
{
"name": "Tradfri bulb",
"room": "office",
"type": "light",
"id": {
"entity_id": "light.tradfri_bulb",
"device_id": null
}
}
]
},
{
"id": "wc_accupancy_set",
"automation": "- alias: WC Accupancy Set\n id: wc_accupancy_set\n triggers:\n - trigger: state\n entity_id: binary_sensor.wc_door_contact\n from: 'on'\n to: 'off'\n for:\n seconds: '{{ states(''input_number.wc_consider_occupied_after_seconds'') | default(0)\n | float(0) }}'\n conditions:\n - condition: state\n entity_id: input_boolean.wc_occupied\n state: 'off'\n actions:\n - action: input_boolean.turn_on\n entity_id: input_boolean.wc_occupied",
"config": [
{
"name": "WC door contact binary sensor",
"room": "wc",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.wc_door_contact",
"device_id": null
}
},
{
"name": "WC consider occupied after seconds input number",
"room": "wc",
"type": "input_number",
"id": {
"entity_id": "input_number.wc_consider_occupied_after_seconds",
"device_id": null
}
},
{
"name": "WC occupied input boolean",
"room": "wc",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.wc_occupied",
"device_id": null
}
}
]
},
{
"id": "wc_accupancy_reset",
"automation": "- alias: WC Accupancy Reset\n id: wc_accupancy_reset\n triggers:\n - trigger: state\n entity_id: binary_sensor.wc_door_contact\n from: 'off'\n to: 'on'\n for:\n seconds: '{{ states(''input_number.wc_consider_unoccupied_after_seconds'') |\n default(0) | float(0) }}'\n conditions:\n - condition: state\n entity_id: input_boolean.wc_occupied\n state: 'on'\n actions:\n - action: input_boolean.turn_off\n entity_id: input_boolean.wc_occupied",
"config": [
{
"name": "WC door contact binary sensor",
"room": "wc",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.wc_door_contact",
"device_id": null
}
},
{
"name": "WC occupied input boolean",
"room": "wc",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.wc_occupied",
"device_id": null
}
},
{
"name": "WC consider unoccupied after seconds input number",
"room": "wc",
"type": "input_number",
"id": {
"entity_id": "input_number.wc_consider_unoccupied_after_seconds",
"device_id": null
}
}
]
},
{
"id": "wc_ventilation_start_timer_manually",
"automation": "- alias: WC Ventilation Start Timer Manually\n id: wc_ventilation_start_timer_manually\n triggers:\n - trigger: state\n entity_id: fan.wc_and_bathroom\n from: 'off'\n to: 'on'\n conditions:\n - condition: template\n value_template: '{{ ((now() + timedelta(minutes=states(''input_number.wc_ventilate_for_minutes_after_manual_trigger'')\n | default(0) | float(0))).timestamp() > as_timestamp(state_attr(''timer.wc_ventilation'',\n ''finishes_at''), 0)) or (states(''timer.wc_ventilation'') in [''idle'', ''paused''])\n }}'\n actions:\n - action: timer.start\n data:\n entity_id: timer.wc_ventilation\n duration:\n minutes: '{{ states(''input_number.wc_ventilate_for_minutes_after_manual_trigger'')\n | default(0) | float(0) }}'\n - action: input_select.select_option\n data:\n entity_id: input_select.wc_ventilation_state\n option: MANUAL_ON\n - action: automation.turn_off\n entity_id: automation.wc_ventilation_stop_humidity_below_threshold",
"config": [
{
"name": "WC and bathroom fan",
"room": "wc",
"type": "fan",
"id": {
"entity_id": "fan.wc_and_bathroom",
"device_id": null
}
},
{
"name": "WC ventilate for minutes after manual trigger input number",
"room": "wc",
"type": "input_number",
"id": {
"entity_id": "input_number.wc_ventilate_for_minutes_after_manual_trigger",
"device_id": null
}
},
{
"name": "WC ventilation timer",
"room": "wc",
"type": "timer",
"id": {
"entity_id": "timer.wc_ventilation",
"device_id": null
}
},
{
"name": "WC ventilation state input select",
"room": "wc",
"type": "input_select",
"id": {
"entity_id": "input_select.wc_ventilation_state",
"device_id": null
}
},
{
"name": "WC ventilation stop humidity below threshold automation",
"room": "wc",
"type": "automation",
"id": {
"entity_id": "automation.wc_ventilation_stop_humidity_below_threshold",
"device_id": null
}
}
]
},
{
"id": "wc_ventilation_stop_timer_manually",
"automation": "- alias: WC Ventilation Stop Timer Manually\n id: wc_ventilation_stop_timer_manually\n triggers:\n - trigger: state\n entity_id: fan.wc_and_bathroom\n from: 'on'\n to: 'off'\n conditions:\n - condition: state\n entity_id: timer.wc_ventilation\n state: active\n actions:\n - action: timer.cancel\n entity_id: timer.wc_ventilation\n - action: timer.cancel\n entity_id: timer.wc_wait_for_open_to_ventilate\n - action: input_select.select_option\n data:\n entity_id: input_select.wc_ventilation_state\n option: MANUAL_OFF\n - action: automation.turn_off\n entity_id: automation.wc_ventilation_stop_humidity_below_threshold",
"config": [
{
"name": "WC and bathroom fan",
"room": "wc",
"type": "fan",
"id": {
"entity_id": "fan.wc_and_bathroom",
"device_id": null
}
},
{
"name": "WC ventilation timer",
"room": "wc",
"type": "timer",
"id": {
"entity_id": "timer.wc_ventilation",
"device_id": null
}
},
{
"name": "WC ventilation state input select",
"room": "wc",
"type": "input_select",
"id": {
"entity_id": "input_select.wc_ventilation_state",
"device_id": null
}
},
{
"name": "WC ventilation stop humidity below threshold automation",
"room": "wc",
"type": "automation",
"id": {
"entity_id": "automation.wc_ventilation_stop_humidity_below_threshold",
"device_id": null
}
},
{
"name": "WC wait for open to ventilate timer",
"room": "wc",
"type": "timer",
"id": {
"entity_id": "timer.wc_wait_for_open_to_ventilate",
"device_id": null
}
}
]
},
{
"id": "wc_ventilation_timeout",
"automation": "- alias: WC Ventilation Timeout\n id: wc_ventilation_timeout\n triggers:\n - trigger: event\n event_type: timer.finished\n event_data:\n entity_id: timer.wc_ventilation\n actions:\n - action: fan.turn_off\n entity_id: fan.wc_and_bathroom\n - action: timer.cancel\n entity_id: timer.wc_wait_for_open_to_ventilate\n - action: input_select.select_option\n data:\n entity_id: input_select.wc_ventilation_state\n option: TIMEOUT\n - action: automation.turn_off\n entity_id: automation.wc_ventilation_stop_humidity_below_threshold",
"config": [
{
"name": "WC and bathroom fan",
"room": "wc",
"type": "fan",
"id": {
"entity_id": "fan.wc_and_bathroom",
"device_id": null
}
},
{
"name": "WC ventilation timer",
"room": "wc",
"type": "timer",
"id": {
"entity_id": "timer.wc_ventilation",
"device_id": null
}
},
{
"name": "WC ventilation state input select",
"room": "wc",
"type": "input_select",
"id": {
"entity_id": "input_select.wc_ventilation_state",
"device_id": null
}
},
{
"name": "WC ventilation stop humidity below threshold automation",
"room": "wc",
"type": "automation",
"id": {
"entity_id": "automation.wc_ventilation_stop_humidity_below_threshold",
"device_id": null
}
},
{
"name": "WC wait for open to ventilate timer",
"room": "wc",
"type": "timer",
"id": {
"entity_id": "timer.wc_wait_for_open_to_ventilate",
"device_id": null
}
}
]
},
{
"id": "wc_ventilation_start_timeout_for_door_open_state",
"automation": "- alias: WC Ventilation Start Timeout For Door Open State\n id: wc_ventilation_start_timeout_for_door_open_state\n triggers:\n - trigger: state\n entity_id: input_boolean.wc_occupied\n from: 'off'\n to: 'on'\n for:\n seconds: '{{ states(''input_number.wc_consider_ventilate_when_finished_if_occupied_for_seconds'')\n | default(0) | float(0) }}'\n actions:\n - action: timer.start\n data:\n entity_id: timer.wc_wait_for_open_to_ventilate\n duration:\n minutes: '{{ states(''input_number.wc_wait_for_opening_after_considered_to_ventilate_minutes'')\n | default(0) | float(0) }}'",
"config": [
{
"name": "WC occupied input boolean",
"room": "wc",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.wc_occupied",
"device_id": null
}
},
{
"name": "WC wait for open to ventilate timer",
"room": "wc",
"type": "timer",
"id": {
"entity_id": "timer.wc_wait_for_open_to_ventilate",
"device_id": null
}
},
{
"name": "WC consider ventilate when finished if occupied for seconds input number",
"room": "wc",
"type": "input_number",
"id": {
"entity_id": "input_number.wc_consider_ventilate_when_finished_if_occupied_for_seconds",
"device_id": null
}
},
{
"name": "WC wait for opening after considered to ventilate minutes input number",
"room": "wc",
"type": "input_number",
"id": {
"entity_id": "input_number.wc_wait_for_opening_after_considered_to_ventilate_minutes",
"device_id": null
}
}
]
},
{
"id": "wc_ventilation_start_when_unoccupied",
"automation": "- alias: WC Ventilation Start When Unoccupied\n id: wc_ventilation_start_when_unoccupied\n triggers:\n - trigger: state\n entity_id: input_boolean.wc_occupied\n from: 'on'\n to: 'off'\n conditions:\n - condition: state\n entity_id: timer.wc_wait_for_open_to_ventilate\n state: active\n - condition: template\n value_template: '{{ ((now() + timedelta(minutes=states(''input_number.wc_ventilate_for_minutes_when_finished'')\n | default(0) | float(0))).timestamp() > as_timestamp(state_attr(''timer.wc_ventilation'',\n ''finishes_at''), 0)) or (states(''timer.wc_ventilation'') in [''idle'', ''paused''])\n }}'\n actions:\n - action: fan.turn_on\n entity_id: fan.wc_and_bathroom\n - action: timer.cancel\n entity_id: timer.wc_wait_for_open_to_ventilate\n - action: timer.start\n data:\n entity_id: timer.wc_ventilation\n duration:\n minutes: '{{ states(''input_number.wc_ventilate_for_minutes_when_finished'')\n | default(0) | float(0) }}'\n - action: input_select.select_option\n data:\n entity_id: input_select.wc_ventilation_state\n option: TOILET_ON",
"config": [
{
"name": "WC occupied input boolean",
"room": "wc",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.wc_occupied",
"device_id": null
}
},
{
"name": "WC and bathroom fan",
"room": "wc",
"type": "fan",
"id": {
"entity_id": "fan.wc_and_bathroom",
"device_id": null
}
},
{
"name": "WC ventilation timer",
"room": "wc",
"type": "timer",
"id": {
"entity_id": "timer.wc_ventilation",
"device_id": null
}
},
{
"name": "WC ventilation state input select",
"room": "wc",
"type": "input_select",
"id": {
"entity_id": "input_select.wc_ventilation_state",
"device_id": null
}
},
{
"name": "WC wait for open to ventilate timer",
"room": "wc",
"type": "timer",
"id": {
"entity_id": "timer.wc_wait_for_open_to_ventilate",
"device_id": null
}
},
{
"name": "WC ventilate for minutes when finished input number",
"room": "wc",
"type": "input_number",
"id": {
"entity_id": "input_number.wc_ventilate_for_minutes_when_finished",
"device_id": null
}
}
]
},
{
"id": "wc_ventilation_start_humidity_exceeds_threshold",
"automation": "- alias: WC Ventilation Start Humidity Exceeds Threshold\n id: wc_ventilation_start_humidity_exceeds_threshold\n triggers:\n - trigger: numeric_state\n entity_id: sensor.ble_humidity_atc_bathroom\n above: input_number.wc_ventilation_start_humidity_threshold\n for: 00:02:00\n actions:\n - action: timer.cancel\n entity_id: timer.wc_wait_for_open_to_ventilate\n - action: automation.turn_on\n entity_id: automation.wc_ventilation_stop_humidity_below_threshold\n - action: timer.start\n data:\n entity_id: timer.wc_ventilation\n duration:\n minutes: '{{ states(''input_number.wc_max_ventilation_duration_minutes'')\n | default(0) | float(0) }}'\n - action: fan.turn_on\n entity_id: fan.wc_and_bathroom\n - action: input_select.select_option\n data:\n entity_id: input_select.wc_ventilation_state\n option: HUMIDITY_ON",
"config": [
{
"name": "WC and bathroom fan",
"room": "wc",
"type": "fan",
"id": {
"entity_id": "fan.wc_and_bathroom",
"device_id": null
}
},
{
"name": "WC ventilation timer",
"room": "wc",
"type": "timer",
"id": {
"entity_id": "timer.wc_ventilation",
"device_id": null
}
},
{
"name": "WC ventilation state input select",
"room": "wc",
"type": "input_select",
"id": {
"entity_id": "input_select.wc_ventilation_state",
"device_id": null
}
},
{
"name": "WC ventilation stop humidity below threshold automation",
"room": "wc",
"type": "automation",
"id": {
"entity_id": "automation.wc_ventilation_stop_humidity_below_threshold",
"device_id": null
}
},
{
"name": "WC wait for open to ventilate timer",
"room": "wc",
"type": "timer",
"id": {
"entity_id": "timer.wc_wait_for_open_to_ventilate",
"device_id": null
}
},
{
"name": "BLE humidity ATC bathroom sensor",
"room": "bathroom",
"type": "sensor",
"id": {
"entity_id": "sensor.ble_humidity_atc_bathroom",
"device_id": null
}
},
{
"name": "WC ventilation start humidity threshold input number",
"room": "wc",
"type": "input_number",
"id": {
"entity_id": "input_number.wc_ventilation_start_humidity_threshold",
"device_id": null
}
},
{
"name": "WC max ventilation duration minutes input number",
"room": "wc",
"type": "input_number",
"id": {
"entity_id": "input_number.wc_max_ventilation_duration_minutes",
"device_id": null
}
}
]
},
{
"id": "wc_ventilation_stop_humidity_below_threshold",
"automation": "- alias: WC Ventilation Stop Humidity Below Threshold\n id: wc_ventilation_stop_humidity_below_threshold\n triggers:\n - trigger: numeric_state\n entity_id: sensor.ble_humidity_atc_bathroom\n below: input_number.wc_ventilation_stop_humidity_threshold\n for: 00:02:00\n actions:\n - action: timer.cancel\n entity_id: timer.wc_ventilation\n - action: fan.turn_off\n entity_id: fan.wc_and_bathroom\n - action: input_select.select_option\n data:\n entity_id: input_select.wc_ventilation_state\n option: HUMIDITY_OFF\n - action: automation.turn_off\n entity_id: automation.wc_ventilation_stop_humidity_below_threshold",
"config": [
{
"name": "WC and bathroom fan",
"room": "wc",
"type": "fan",
"id": {
"entity_id": "fan.wc_and_bathroom",
"device_id": null
}
},
{
"name": "WC ventilation timer",
"room": "wc",
"type": "timer",
"id": {
"entity_id": "timer.wc_ventilation",
"device_id": null
}
},
{
"name": "WC ventilation state input select",
"room": "wc",
"type": "input_select",
"id": {
"entity_id": "input_select.wc_ventilation_state",
"device_id": null
}
},
{
"name": "WC ventilation stop humidity below threshold automation",
"room": "wc",
"type": "automation",
"id": {
"entity_id": "automation.wc_ventilation_stop_humidity_below_threshold",
"device_id": null
}
},
{
"name": "BLE humidity ATC bathroom sensor",
"room": "bathroom",
"type": "sensor",
"id": {
"entity_id": "sensor.ble_humidity_atc_bathroom",
"device_id": null
}
},
{
"name": "WC ventilation stop humidity threshold input number",
"room": "wc",
"type": "input_number",
"id": {
"entity_id": "input_number.wc_ventilation_stop_humidity_threshold",
"device_id": null
}
}
]
},
{
"id": "wc_ventilation_start_timer_emergency",
"automation": "- alias: WC Ventilation Start Timer Emergency\n id: wc_ventilation_start_timer_emergency\n triggers:\n - trigger: state\n entity_id: fan.wc_and_bathroom\n to: 'on'\n for: 00:01:00\n conditions:\n - or:\n - condition: state\n entity_id: timer.wc_ventilation\n state: idle\n - condition: state\n entity_id: timer.wc_ventilation\n state: paused\n actions:\n - action: timer.start\n data:\n entity_id: timer.wc_ventilation\n duration:\n minutes: '{{ states(''input_number.wc_max_ventilation_duration_minutes'')\n | default(0) | float(0) }}'\n - action: input_select.select_option\n data:\n entity_id: input_select.wc_ventilation_state\n option: EMERGENCY",
"config": [
{
"name": "WC and bathroom fan",
"room": "wc",
"type": "fan",
"id": {
"entity_id": "fan.wc_and_bathroom",
"device_id": null
}
},
{
"name": "WC ventilation timer",
"room": "wc",
"type": "timer",
"id": {
"entity_id": "timer.wc_ventilation",
"device_id": null
}
},
{
"name": "WC ventilation state input select",
"room": "wc",
"type": "input_select",
"id": {
"entity_id": "input_select.wc_ventilation_state",
"device_id": null
}
},
{
"name": "WC max ventilation duration minutes input number",
"room": "wc",
"type": "input_number",
"id": {
"entity_id": "input_number.wc_max_ventilation_duration_minutes",
"device_id": null
}
}
]
},
{
"id": "sync_shopping_list",
"automation": "- id: sync_shopping_list\n alias: Sync Shopping List\n mode: single\n triggers:\n - trigger: state\n entity_id: binary_sensor.people_home\n to: 'off'\n for: 00:05:00\n actions:\n - action: input_number.set_value\n target:\n entity_id: input_number.volume_yandex_station\n data:\n value: '{{ state_attr(''media_player.yandex_station_midi'', ''volume_level'')}}'\n - repeat:\n while:\n - condition: template\n value_template: '{{ not is_state_attr(''media_player.yandex_station_midi'',\n ''volume_level'', 0.01) }}'\n - condition: template\n value_template: '{{ repeat.index <= 3 }}'\n sequence:\n - action: media_player.volume_set\n data:\n entity_id: media_player.yandex_station_midi\n volume_level: 0.01\n - delay: 0.5\n - action: script.turn_on\n entity_id: script.update_shopping_list\n - delay: 1\n - action: media_player.play_media\n entity_id: media_player.yandex_station_midi\n data:\n media_content_id: stop\n media_content_type: command\n - delay: 1\n - repeat:\n while:\n - condition: template\n value_template: '{{ not is_state_attr(''media_player.yandex_station_midi'',\n ''volume_level'', states(''input_number.volume_yandex_station'')) }}'\n - condition: template\n value_template: '{{ repeat.index <= 3 }}'\n sequence:\n - action: media_player.volume_set\n data:\n entity_id: media_player.yandex_station_midi\n volume_level: '{{ states(''input_number.volume_yandex_station'')}}'\n - delay: 1",
"config": [
{
"name": "Yandex station midi media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station_midi",
"device_id": null
}
},
{
"name": "People home binary sensor",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.people_home",
"device_id": null
}
},
{
"name": "Yandex station media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.yandex_station",
"device_id": null
}
},
{
"name": "Volume yandex station input number",
"room": "living_room",
"type": "input_number",
"id": {
"entity_id": "input_number.volume_yandex_station",
"device_id": null
}
},
{
"name": "Update shopping list script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.update_shopping_list",
"device_id": null
}
}
]
},
{
"id": "aqara_switch_1_handler",
"automation": "- alias: Aqara Switch 1 Handler\n id: aqara_switch_1_handler\n mode: restart\n max_exceeded: silent\n triggers:\n - trigger: event\n event_type: zha_event\n event_data:\n device_id: 6559eaaf60c9624465f762290ff9e825\n actions:\n - variables:\n command: '{{ trigger.event.data.command }}'\n - choose:\n - conditions:\n - '{{ command == ''single'' }}'\n sequence:\n - if:\n - condition: state\n entity_id: input_boolean.child_lock\n state: 'off'\n then:\n - action: script.activate_night_mode\n - conditions:\n - '{{ command == ''double'' }}'\n sequence:\n - if:\n - condition: state\n entity_id: input_boolean.home_night_mode\n state: 'off'\n - condition: state\n entity_id: light.bedroom_nightlight\n state: 'off'\n then:\n - action: light.turn_on\n entity_id: light.bedroom_nightlight\n data:\n brightness: 255\n else:\n - action: light.turn_off\n entity_id: light.bedroom_nightlight\n - conditions:\n - '{{ command == ''hold'' }}'\n sequence:\n - action: input_boolean.turn_off\n entity_id: input_boolean.bedroom_lights_and_cover_safety_switch\n - action: cover.open_cover\n entity_id: cover.bedroom\n - if:\n - condition: state\n entity_id: input_boolean.child_lock\n state: 'off'\n then:\n - action: input_boolean.turn_off\n entity_id:\n - input_boolean.home_night_mode\n - input_boolean.silent_mode\n default: []",
"config": [
{
"name": "Home night mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.home_night_mode",
"device_id": null
}
},
{
"name": "Activate night mode script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.activate_night_mode",
"device_id": null
}
},
{
"name": "Child lock input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.child_lock",
"device_id": null
}
},
{
"name": "Silent mode input boolean",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.silent_mode",
"device_id": null
}
},
{
"name": "Cover bedroom",
"room": "bedroom",
"type": "cover",
"id": {
"entity_id": "cover.bedroom",
"device_id": null
}
},
{
"name": "Bedroom nightlight",
"room": "bedroom",
"type": "light",
"id": {
"entity_id": "light.bedroom_nightlight",
"device_id": null
}
},
{
"name": "Bedroom lights and cover safety switch input boolean",
"room": "bedroom",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.bedroom_lights_and_cover_safety_switch",
"device_id": null
}
},
{
"name": "Aqara switch device",
"room": "bedroom",
"type": "device",
"id": {
"entity_id": null,
"device_id": "6559eaaf60c9624465f762290ff9e825"
}
}
]
},
{
"id": "aqara_cube_1_handler",
"automation": "- alias: Aqara Cube 1 Handler\n id: aqara_cube_1_handler\n mode: restart\n max_exceeded: silent\n triggers:\n - trigger: event\n event_type: zha_event\n event_data:\n device_id: 48fad66663fc601ed1a63ac01e804fab\n actions:\n - if:\n - condition: state\n entity_id: input_boolean.cube_1_control\n state: 'on'\n then:\n - variables:\n command: '{{ trigger.event.data.command }}'\n flip_degrees: '{{ trigger.event.data.args.flip_degrees if trigger.event.data.args.flip_degrees\n is defined else 0 }}'\n relative_degrees: '{{ trigger.event.data.args.relative_degrees if trigger.event.data.args.relative_degrees\n is defined else 0 }}'\n - choose:\n - conditions:\n - '{{ flip_degrees == 90 }}'\n sequence:\n - action: light.toggle\n entity_id: light.string_lights\n - conditions:\n - '{{ flip_degrees == 180 }}'\n sequence:\n - action: light.toggle\n entity_id: light.floor_lamp\n - conditions:\n - '{{ command == ''shake'' }}'\n sequence:\n - action: script.turn_on\n entity_id: script.turn_off_all_lights\n - conditions:\n - '{{ command == ''tap'' }}'\n sequence:\n - action: scene.turn_on\n entity_id: scene.movies\n - conditions:\n - '{{ command == ''slide'' }}'\n sequence:\n - action: light.turn_on\n entity_id:\n - light.gyver_lamp\n - light.pc_backlight\n - conditions:\n - '{{ command == ''rotate_left'' or command == ''rotate_right'' }}'\n sequence:\n - action: light.turn_on\n entity_id: light.floor_lamp\n data_template:\n brightness: \"{% set suggested = state_attr('light.floor_lamp', 'brightness')\\\n \\ | int(0) + \\n relative_degrees | int(0) + 1 %}\\n{% if suggested >\\\n \\ 0 %} {{ suggested }} {% else %} 1 {% endif %}\\n\"",
"config": [
{
"name": "String lights",
"room": "living_room",
"type": "light",
"id": {
"entity_id": "light.string_lights",
"device_id": null
}
},
{
"name": "Turn off all lights script",
"room": "home",
"type": "script",
"id": {
"entity_id": "script.turn_off_all_lights",
"device_id": null
}
},
{
"name": "Gyver lamp",
"room": "kitchen",
"type": "light",
"id": {
"entity_id": "light.gyver_lamp",
"device_id": null
}
},
{
"name": "PC backlight",
"room": "kitchen",
"type": "light",
"id": {
"entity_id": "light.pc_backlight",
"device_id": null
}
},
{
"name": "Floor lamp",
"room": "living_room",
"type": "light",
"id": {
"entity_id": "light.floor_lamp",
"device_id": null
}
},
{
"name": "Movies scene",
"room": "living_room",
"type": "scene",
"id": {
"entity_id": "scene.movies",
"device_id": null
}
},
{
"name": "Aqara cube device",
"room": "living_room",
"type": "device",
"id": {
"entity_id": null,
"device_id": "48fad66663fc601ed1a63ac01e804fab"
}
},
{
"name": "Cube 1 control input boolean",
"room": "living_room",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.cube_1_control",
"device_id": null
}
}
]
},
{
"id": "tradfri_switch_1_handler",
"automation": "- alias: Tradfri Switch 1 Handler\n id: tradfri_switch_1_handler\n mode: restart\n max_exceeded: silent\n triggers:\n - trigger: event\n event_type: zha_event\n event_data:\n device_id: a64c98fa9b0c36e96ebe42160fcf78b5\n actions:\n - variables:\n command: '{{ trigger.event.data.command }}'\n - choose:\n - conditions:\n - '{{ command == ''on'' }}'\n sequence:\n - action: input_boolean.turn_on\n entity_id: input_boolean.scooter_charger\n - conditions:\n - '{{ command == ''off'' }}'\n sequence:\n - action: input_boolean.turn_off\n entity_id: input_boolean.scooter_charger",
"config": [
{
"name": "Scooter charger input boolean",
"room": "hall",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.scooter_charger",
"device_id": null
}
},
{
"name": "Tradfri switch device",
"room": "hall",
"type": "device",
"id": {
"entity_id": null,
"device_id": "a64c98fa9b0c36e96ebe42160fcf78b5"
}
}
]
},
{
"id": "rodret_dimmer_1_handler",
"automation": "- alias: Rodret Dimmer 1 Handler\n id: rodret_dimmer_1_handler\n use_blueprint:\n path: damru/ikea-rodret_E2201_ZHA-Z2M_control-anything.yaml\n input:\n remote_device: 51724530dc1fcac3561d2fcb39f40048\n on_press_action:\n - action: light.turn_on\n entity_id:\n - light.mi_desk_lamp\n - light.tv_lights\n - action: switch.turn_on\n entity_id: switch.monolith_speakers\n off_press_action:\n - action: light.turn_off\n entity_id:\n - light.mi_desk_lamp\n - light.tv_lights\n - action: switch.turn_off\n entity_id: switch.monolith_speakers\n on_hold_action:\n - action: light.turn_on\n entity_id: light.mi_desk_lamp\n data:\n brightness_step_pct: 4\n off_hold_action:\n - action: light.turn_on\n entity_id: light.mi_desk_lamp\n data:\n brightness_step_pct: -4\n helper_hold_delay: 200\n helper_max_loops: 20",
"config": [
{
"name": "Monolith speakers switch",
"room": "living_room",
"type": "switch",
"id": {
"entity_id": "switch.monolith_speakers",
"device_id": null
}
},
{
"name": "Rodret dimmer device",
"room": "living_room",
"type": "device",
"id": {
"entity_id": null,
"device_id": "51724530dc1fcac3561d2fcb39f40048"
}
},
{
"name": "Mi desk lamp",
"room": "living_room",
"type": "light",
"id": {
"entity_id": "light.mi_desk_lamp",
"device_id": null
}
},
{
"name": "TV lights",
"room": "living_room",
"type": "light",
"id": {
"entity_id": "light.tv_lights",
"device_id": null
}
}
]
}
]