5020 lines
297 KiB
JSON
5020 lines
297 KiB
JSON
[
|
|
{
|
|
"id": "event_android_alarm",
|
|
"automation": "- alias: event_android_alarm\n id: event_android_alarm\n triggers:\n - trigger: event\n event_type: android_alarm\n actions:\n - action: timer.start\n entity_id: timer.post_android_alarm\n data:\n duration: '{{states.input_number.post_android_alarm.state|int}}'\n - action: logbook.log\n data:\n name: ha_alarm\n message: timer arm {{states.input_number.post_android_alarm.state}} seconds",
|
|
"config": [
|
|
{
|
|
"name": "post android alarm timer",
|
|
"room": null,
|
|
"type": "timer",
|
|
"id": {
|
|
"entity_id": "timer.post_android_alarm",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "post android alarm input number",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.post_android_alarm",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "post_android_alarm",
|
|
"automation": "- alias: post_android_alarm\n id: post_android_alarm\n triggers:\n - trigger: event\n event_type: timer.finished\n event_data:\n entity_id: timer.post_android_alarm\n conditions:\n - condition: and\n conditions:\n - condition: template\n value_template: \"{{\\n not is_state('media_player.bedroom_speaker', 'playing')\\n\\\n \\ }}\"\n actions:\n - action: script.android_post_alarm",
|
|
"config": [
|
|
{
|
|
"name": "post android alarm timer",
|
|
"room": null,
|
|
"type": "timer",
|
|
"id": {
|
|
"entity_id": "timer.post_android_alarm",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bedroom speaker",
|
|
"room": "bedroom",
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.bedroom_speaker",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "bed_light",
|
|
"automation": "- id: bed_light\n alias: bed_light\n initial_state: false\n triggers:\n - trigger: state\n entity_id: binary_sensor.bed_motion\n to: 'on'\n id: light_on\n - trigger: state\n entity_id: binary_sensor.bed_occupancy\n to: 'off'\n for:\n seconds: 60\n id: light_off\n - trigger: state\n entity_id: binary_sensor.living_motion\n to: 'on'\n id: light_off\n - trigger: state\n entity_id: binary_sensor.office_motion\n to: 'on'\n id: light_off\n - trigger: event\n event_type: lights_check\n event_data:\n light: turn_off\n id: light_off\n mode: restart\n actions:\n - variables:\n cfg: '{% from ''tools.jinja'' import light_cfg %} {{ light_cfg(is_state(''binary_sensor.night_mode'',\n ''off'')) | from_json }}'\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n - condition: state\n entity_id: light.bed\n state: 'off'\n - condition: state\n entity_id: binary_sensor.day\n state: 'off'\n sequence:\n - action: script.lights_on\n data:\n ctrl_light: light.bed\n ctrl_all: '{{ is_state(''binary_sensor.night_mode'', ''off'') }}'\n brightness_pct: '{{ cfg.brightness }}'\n transition: '{{ cfg.transition }}'\n color_temp: '{{ cfg.temp }}'\n - conditions:\n - condition: trigger\n id:\n - light_off\n - condition: state\n entity_id: light.bed\n state: 'on'\n - condition: state\n entity_id: binary_sensor.bed_occupancy\n state: 'off'\n sequence:\n - action: script.lights_off\n data:\n ctrl_light: light.bed\n transition: '{{ cfg.transition }}'",
|
|
"config": [
|
|
{
|
|
"name": "bed motion sensor",
|
|
"room": "bedroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bed_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed occupancy sensor",
|
|
"room": "bedroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bed_occupancy",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living motion sensor",
|
|
"room": "living_room",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.living_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office motion sensor",
|
|
"room": "office",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.office_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "night mode sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.night_mode",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed light",
|
|
"room": "bedroom",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.bed",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "day sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.day",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "other_bed_light",
|
|
"automation": "- id: other_bed_light\n alias: other_bed_light\n triggers:\n - trigger: state\n entity_id:\n - binary_sensor.bed_motion\n - binary_sensor.night_mode_ctrl\n to: 'on'\n id: light_on\n - trigger: state\n entity_id: binary_sensor.bed_occupancy\n to: 'off'\n for:\n seconds: 120\n id: light_off\n - trigger: state\n entity_id: binary_sensor.night_mode_ctrl\n to: 'off'\n id: light_ctrl_off\n - trigger: event\n event_type: lights_check\n event_data:\n light: turn_off\n id: light_ctrl_off\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n - condition: state\n entity_id: binary_sensor.bed_occupancy\n state: 'on'\n - condition: state\n entity_id: binary_sensor.night_mode_ctrl\n state: 'on'\n - condition: state\n entity_id: light.shutter_bed\n state: 'off'\n sequence:\n - action: light.turn_on\n target:\n entity_id:\n - light.shutter_bed\n - conditions:\n - condition: trigger\n id:\n - light_off\n - condition: state\n entity_id: binary_sensor.bed_occupancy\n state: 'off'\n - condition: state\n entity_id: light.shutter_bed\n state: 'on'\n sequence:\n - action: light.turn_off\n target:\n entity_id:\n - light.shutter_bed\n - conditions:\n - condition: trigger\n id:\n - light_ctrl_off\n - condition: state\n entity_id: light.shutter_bed\n state: 'on'\n sequence:\n - action: light.turn_off\n target:\n entity_id:\n - light.shutter_bed\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n - condition: state\n entity_id: binary_sensor.bed_occupancy\n state: 'on'\n - condition: state\n entity_id: input_boolean.in_bed_dummy_switch\n state: 'off'\n - condition: state\n entity_id: light.bed_wardrobe\n state: 'off'\n sequence:\n - action: light.turn_on\n target:\n entity_id:\n - light.bed_wardrobe\n - conditions:\n - condition: trigger\n id:\n - light_off\n - condition: state\n entity_id: binary_sensor.bed_occupancy\n state: 'off'\n - condition: state\n entity_id: light.bed_wardrobe\n state: 'on'\n sequence:\n - action: light.turn_off\n target:\n entity_id:\n - light.bed_wardrobe\n - conditions:\n - condition: trigger\n id:\n - light_ctrl_off\n - condition: state\n entity_id: light.bed_wardrobe\n state: 'on'\n sequence:\n - action: light.turn_off\n target:\n entity_id:\n - light.bed_wardrobe",
|
|
"config": [
|
|
{
|
|
"name": "bed motion sensor",
|
|
"room": "bedroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bed_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed occupancy sensor",
|
|
"room": "bedroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bed_occupancy",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "night mode sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.night_mode",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed light",
|
|
"room": "bedroom",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.bed",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "night mode control sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.night_mode_ctrl",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "shutter bed light",
|
|
"room": "bedroom",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.shutter_bed",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "in bed dummy switch",
|
|
"room": "bedroom",
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.in_bed_dummy_switch",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed wardrobe light",
|
|
"room": "bedroom",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.bed_wardrobe",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "motion_light_extend",
|
|
"automation": "- alias: motion_light_extend\n id: motion_light_extend\n triggers:\n - trigger: state\n entity_id: binary_sensor.home_light_extend\n to: 'on'\n for:\n seconds: 5\n actions:\n - action: script.turn_on\n data:\n entity_id: script.lumi_double_switch_on",
|
|
"config": [
|
|
{
|
|
"name": "home light extend sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.home_light_extend",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Lumi Double Switch On",
|
|
"room": null,
|
|
"type": "script",
|
|
"id": {
|
|
"entity_id": "script.lumi_double_switch_on",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "change_pressure",
|
|
"automation": "- alias: change_pressure\n id: change_pressure\n triggers:\n - trigger: state\n entity_id: sensor.change_pressure\n conditions:\n condition: and\n conditions:\n - condition: template\n value_template: '{{ states(''sensor.change_pressure'') | float(0) | abs > states(''input_number.pressure_speed'')\n | float(0) }}'\n - condition: template\n value_template: \"{%- if state_attr('automation.change_pressure', 'last_triggered')\\\n \\ = None -%}\\n {{\\n now() - state_attr('automation.change_pressure', 'last_triggered')\\\n \\ >\\n timedelta(hours=1)\\n }}\\n{%- else -%}\\n True\\n{%- endif -%}\"\n actions:\n - action: script.all_notify\n data_template:\n icon_notify: '{{state_attr(''sensor.change_pressure'', ''icon'').split('':'')[1]}}'\n tit: pressure change\n msg: '{{states(''sensor.change_pressure'')}}'",
|
|
"config": [
|
|
{
|
|
"name": "change pressure sensor",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.change_pressure",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "pressure speed input number",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.pressure_speed",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "weather_alert",
|
|
"automation": "- alias: weather_alert\n id: weather_alert\n triggers:\n - trigger: state\n entity_id: binary_sensor.w_alert\n conditions:\n - condition: template\n value_template: '{{trigger.from_state.state = trigger.to_state.state}}'\n actions:\n - action: script.all_notify\n data_template:\n icon_notify: weather-cloudy-alert\n tit: weather\n msg: \"{%- if is_state('binary_sensor.w_alert', 'on') -%}\\n {{ state_attr('binary_sensor.w_alert',\\\n \\ 'awareness_type').split(';')[1] }} -{{ state_attr('binary_sensor.w_alert',\\\n \\ 'awareness_level').split(';')[1] }}\\n {{ state_attr('binary_sensor.w_alert',\\\n \\ 'expires') }}\\n{% else %}\\n alert expired\\n{% endif %}\"",
|
|
"config": [
|
|
{
|
|
"name": "weather alert sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.w_alert",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "temp_vent_notify",
|
|
"automation": "- alias: temp_vent_notify\n id: temp_vent_notify\n triggers:\n - trigger: state\n entity_id: binary_sensor.temp_ventilaton\n actions:\n - variables:\n tit: '{{ states(''sensor.temp_out'', with_unit=True) }} out'\n msg: \"{%-\\n set val = {\\n 'on': 'open window',\\n 'off': 'close\\\n \\ window',\\n }\\n -%}\\n{{ val[states('binary_sensor.temp_ventilaton')]\\\n \\ }}\"\n - action: logbook.log\n data:\n name: '{{ tit }}'\n message: '{{ msg }}'\n - action: persistent_notification.create\n data_template:\n title: '{{ tit }}'\n message: '{{ msg }}'\n - if:\n - condition: state\n entity_id: media_player.livingtv\n state: playing\n then:\n - action: notify.kodi\n data:\n data:\n icon: info\n displaytime: 15000\n title: '{{ tit }}'\n message: '{{ msg }}'\n else:\n - action: notify.gmail\n data_template:\n title: '{{ tit }}'\n message: '{{ msg }}'",
|
|
"config": [
|
|
{
|
|
"name": "temperature outside sensor",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.temp_out",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "temperature ventilation sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.temp_ventilaton",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living TV",
|
|
"room": "living_room",
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.livingtv",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "hall_light",
|
|
"automation": "- alias: hall_light\n id: hall_light\n initial_state: false\n triggers:\n - trigger: state\n entity_id: binary_sensor.hall_motion\n to: 'on'\n id: light_on\n - trigger: state\n entity_id: binary_sensor.hall_occupancy\n to: 'off'\n for:\n seconds: \"{%- if int(states('counter.hall_motion'), 30) > 6 -%}\\n 90\\n{%- elif\\\n \\ int(states('counter.hall_motion'), 30) > 3 -%}\\n 45\\n{%- else -%}\\n 30\\n\\\n {%- endif -%}\"\n id: light_off\n - trigger: event\n event_type: lights_check\n event_data:\n light: turn_off\n id: light_off\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n - condition: state\n entity_id: light.hall\n state: 'off'\n sequence:\n - action: light.turn_on\n target:\n entity_id: null\n - action: script.lights_on\n data:\n ctrl_light: light.hall\n ctrl_all: '{{ is_state(''binary_sensor.night_mode'', ''off'') }}'\n - conditions:\n - condition: trigger\n id:\n - light_off\n - condition: state\n entity_id: light.hall\n state: 'on'\n sequence:\n - action: script.lights_off\n data:\n ctrl_light: light.hall\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n sequence:\n - action: counter.increment\n data:\n entity_id:\n - counter.hall_motion\n - conditions:\n - condition: trigger\n id:\n - light_off\n sequence:\n - action: counter.reset\n data:\n entity_id:\n - counter.hall_motion",
|
|
"config": [
|
|
{
|
|
"name": "night mode sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.night_mode",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "hall motion sensor",
|
|
"room": "hall",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.hall_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "hall occupancy sensor",
|
|
"room": "hall",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.hall_occupancy",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "hall counter",
|
|
"room": "hall",
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.hall_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "hall light",
|
|
"room": "hall",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.hall",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "hall occupancy sensor",
|
|
"room": "hall",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.hall_occupancy",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "home_motion_detect",
|
|
"automation": "- alias: home_motion_detect\n id: home_motion_detect\n triggers:\n - trigger: state\n entity_id: binary_sensor.bed_motion\n to: 'on'\n - trigger: state\n entity_id: binary_sensor.living_motion\n to: 'on'\n - trigger: state\n entity_id: binary_sensor.hall_motion\n to: 'on'\n - trigger: state\n entity_id: binary_sensor.office_motion\n to: 'on'\n - trigger: state\n entity_id: input_boolean.home_motion\n to: 'off'\n conditions:\n - condition: template\n value_template: \"{{\\n not (\\n is_state('device_tracker.root', 'home')\\\n \\ or\\n states.device_tracker.root == None\\n )\\n\\n }}\"\n actions:\n - action: input_boolean.turn_on\n entity_id: input_boolean.home_motion",
|
|
"config": [
|
|
{
|
|
"name": "bed motion sensor",
|
|
"room": "bedroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bed_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living motion sensor",
|
|
"room": "living_room",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.living_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office motion sensor",
|
|
"room": "office",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.office_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "hall motion sensor",
|
|
"room": "hall",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.hall_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "home motion boolean",
|
|
"room": null,
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.home_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "device tracker root",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.root",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "notify_record",
|
|
"automation": "- alias: notify_record\n id: notify_record\n triggers:\n - trigger: state\n entity_id: sensor.video_rec\n actions:\n - action: script.all_notify\n data_template:\n icon_notify: record-rec\n tit: video rec\n msg: \"{%- if states.sensor.video_rec -%}\\n dur: {{ state_attr('sensor.video_rec',\\\n \\ 'duration') }}\\n size: {{ states('sensor.video_rec') }}\\n edl: {{ state_attr('sensor.video_rec',\\\n \\ 'edl') }}\\n name: {{ state_attr('sensor.video_rec', 'fname') }}\\n date:\\\n \\ {{ state_attr('sensor.video_rec', 'date') }}\\n{% else %}\\n err record\\n\\\n {% endif %}\"",
|
|
"config": [
|
|
{
|
|
"name": "video recording sensor",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.video_rec",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "in_call",
|
|
"automation": "- alias: in_call\n id: in_call\n triggers:\n - trigger: state\n entity_id: binary_sensor.in_call\n actions:\n - service_template: \"{%-\\n set scr = {\\n 'off': 'script.in_call_off',\\n\\\n \\ 'on': 'script.in_call_on'\\n }\\n -%}\\n{{ scr[trigger.to_state.state]\\\n \\ }}\"",
|
|
"config": [
|
|
{
|
|
"name": "in call sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.in_call",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "kitchen_light",
|
|
"automation": "- alias: kitchen_light\n id: kitchen_light\n initial_state: false\n triggers:\n - trigger: state\n entity_id: binary_sensor.kitchen_motion\n to: 'on'\n id: light_on\n - trigger: state\n entity_id: binary_sensor.kitchen_occupancy\n to: 'off'\n for:\n seconds: \"{%- if int(states('counter.kitchen_motion'), 30) > 14 -%}\\n 120\\n\\\n {%- elif int(states('counter.kitchen_motion'), 30) > 10 -%}\\n 90\\n{%- elif\\\n \\ int(states('counter.kitchen_motion'), 30 ) > 6 -%}\\n 60\\n{%- else -%}\\n\\\n \\ 15\\n{%- endif -%}\"\n id: kitchen_light_off\n - trigger: state\n entity_id: binary_sensor.office_motion\n to: 'on'\n id: light_off\n - trigger: state\n entity_id: binary_sensor.bed_motion\n to: 'on'\n id: light_off\n - trigger: event\n event_type: lights_check\n event_data:\n light: turn_off\n id: light_off\n mode: restart\n actions:\n - variables:\n brightness_pct: \"{%- if is_state('binary_sensor.night_mode', 'off') -%}\\n {{\\\n \\ range(80, 90, 1) | random }}\\n{%- else -%}\\n {{ range(30, 40, 1) | random\\\n \\ }}\\n{%- endif -%}\"\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n - condition: state\n entity_id: light.kitchen_led\n state: 'off'\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.kitchen_led\n - delay:\n milliseconds: \"{{\\n states('input_number.ctrl_delay') | int (100)\\n \\\n \\ }}\"\n - action: light.turn_on\n target:\n entity_id: light.kitchen_led\n data:\n brightness_pct: '{{ brightness_pct }}'\n - conditions:\n - condition: trigger\n id:\n - kitchen_light_off\n - light_off\n - condition: state\n entity_id: light.kitchen_led\n state: 'on'\n - condition: or\n conditions:\n - condition: state\n entity_id: binary_sensor.kitchen_occupancy\n state: 'off'\n - condition: state\n entity_id: binary_sensor.kodi_active\n state: 'on'\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.kitchen_led\n data:\n brightness_pct: 15\n - delay:\n milliseconds: \"{{\\n states('input_number.ctrl_delay') | int (100)\\n \\\n \\ }}\"\n - action: light.turn_off\n target:\n entity_id:\n - light.kitchen_led\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n sequence:\n - action: counter.increment\n data:\n entity_id:\n - counter.kitchen_motion\n - conditions:\n - condition: trigger\n id:\n - kitchen_light_off\n - light_off\n - condition: state\n entity_id: binary_sensor.kitchen_occupancy\n state: 'off'\n sequence:\n - action: counter.reset\n data:\n entity_id:\n - counter.kitchen_motion\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n - condition: state\n entity_id: binary_sensor.kodi_active\n state: 'off'\n sequence:\n - event: kitchen_light_1\n event_data:\n ctrl: kitchen_on\n brightness_pct: '{{ range(85, 95, 2) | random }}'\n temp: '{{ 4000 }}'\n transition: '{{ 1 }}'\n - conditions:\n - condition: trigger\n id:\n - kitchen_light_off\n sequence:\n - event: kitchen_light_1\n event_data:\n ctrl: kitchen_off\n transition: '{{ 1 }}'",
|
|
"config": [
|
|
{
|
|
"name": "bed motion sensor",
|
|
"room": "bedroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bed_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office motion sensor",
|
|
"room": "office",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.office_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "night mode sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.night_mode",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "kitchen motion sensor",
|
|
"room": "kitchen",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.kitchen_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "kitchen occupancy sensor",
|
|
"room": "kitchen",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.kitchen_occupancy",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "kitchen counter",
|
|
"room": "kitchen",
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.kitchen_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "kitchen kodi active sensor",
|
|
"room": "kitchen",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.kodi_active",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "kitchen LED light",
|
|
"room": "kitchen",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.kitchen_led",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "control delay input number",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.ctrl_delay",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "kitchen light",
|
|
"room": "kitchen",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.kitchen",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "kitchen_light_1",
|
|
"automation": "- alias: kitchen_light_1\n id: kitchen_light_1\n initial_state: true\n triggers:\n - trigger: event\n event_type: kitchen_light_1\n - trigger: event\n event_type: lights_check\n event_data:\n light: turn_off\n id: light_off\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: template\n value_template: '{{ trigger.event.data.ctrl == ''kitchen_on'' }}'\n - condition: numeric_state\n entity_id: sensor.living_window_lux\n value_template: '{{ float(state.state, 20) }}'\n below: 30\n - condition: state\n entity_id: binary_sensor.night_mode\n state: 'off'\n - condition: template\n value_template: '{{ not is_state_attr(''light.kitchen'', ''color_temp_kelvin'',\n 4000) }}'\n sequence:\n - delay:\n milliseconds: \"{{\\n states('input_number.ctrl_delay') | int (100)\\n \\\n \\ }}\"\n - action: light.turn_on\n target:\n entity_id: light.kitchen\n data:\n brightness_pct: 1\n transition: 0\n color_temp_kelvin: '{{ trigger.event.data.temp }}'\n - delay:\n milliseconds: \"{{\\n states('input_number.ctrl_delay') | int (100)\\n \\\n \\ }}\"\n - action: light.turn_on\n target:\n entity_id: light.kitchen\n data:\n brightness_pct: '{{ trigger.event.data.brightness_pct }}'\n transition: '{{ trigger.event.data.transition }}'\n - conditions:\n - condition: template\n value_template: '{{ trigger.event.data.ctrl == ''living_on'' }}'\n - condition: numeric_state\n entity_id: sensor.living_window_lux\n value_template: '{{ float(state.state, 10) }}'\n below: 20\n - condition: state\n entity_id: binary_sensor.night_mode\n state: 'off'\n - condition: state\n entity_id: light.kitchen\n state: 'off'\n - condition: state\n entity_id: binary_sensor.kodi_active\n state: 'off'\n sequence:\n - delay:\n milliseconds: \"{{\\n states('input_number.ctrl_delay') | int (100)\\n \\\n \\ }}\"\n - action: light.turn_on\n target:\n entity_id: light.kitchen\n data:\n brightness_pct: 1\n transition: 0\n color_temp_kelvin: '{{ trigger.event.data.temp }}'\n - delay:\n milliseconds: \"{{\\n states('input_number.ctrl_delay') | int (100)\\n \\\n \\ }}\"\n - action: light.turn_on\n target:\n entity_id: light.kitchen\n data:\n brightness_pct: '{{ trigger.event.data.brightness_pct }}'\n transition: '{{ trigger.event.data.transition }}'\n - conditions:\n - condition: template\n value_template: '{{ trigger.event.data.ctrl == ''kitchen_off'' }}'\n - condition: state\n entity_id: light.living\n state: 'on'\n - condition: state\n entity_id: binary_sensor.kodi_active\n state: 'off'\n - condition: numeric_state\n entity_id: sensor.living_window_lux\n value_template: '{{ float(state.state, 20) }}'\n below: 30\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.kitchen\n data:\n transition: 3\n brightness: '{{ state_attr(''light.living'', ''brightness'') | int(220)\n }}'\n color_temp_kelvin: '{{ state_attr(''light.living'', ''color_temp_kelvin'')\n | int(3000) }}'\n - conditions:\n - condition: template\n value_template: \"{{\\n trigger.event.data.ctrl in ['kitchen_off', 'living_off']\\\n \\ or\\n trigger.id == 'light_off'\\n }}\"\n - condition: state\n entity_id: light.kitchen\n state: 'on'\n - condition: or\n conditions:\n - condition: and\n conditions:\n - condition: template\n value_template: \"{{\\n not is_state ('binary_sensor.living_occupancy',\\\n \\ 'on')\\n }}\"\n - condition: numeric_state\n entity_id: counter.kitchen_motion\n below: 1\n - condition: state\n entity_id: binary_sensor.kodi_active\n state: 'on'\n sequence:\n - action: light.turn_off\n target:\n entity_id: light.kitchen\n data:\n transition: 5",
|
|
"config": [
|
|
{
|
|
"name": "night mode sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.night_mode",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "kitchen counter",
|
|
"room": "kitchen",
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.kitchen_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "kitchen kodi active sensor",
|
|
"room": "kitchen",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.kodi_active",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "control delay input number",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.ctrl_delay",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "kitchen light",
|
|
"room": "kitchen",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.kitchen",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living window lux sensor",
|
|
"room": "living_room",
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.living_window_lux",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living light",
|
|
"room": "living_room",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.living",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living occupancy sensor",
|
|
"room": "living_room",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.living_occupancy",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "kodi_sleep_timer",
|
|
"automation": "- alias: kodi sleep timer\n id: kodi_sleep_timer\n triggers:\n - trigger: event\n event_type: kodi_sleep_timer\n conditions:\n - condition: state\n entity_id: switch.tv_cec\n state: 'on'\n actions:\n - action: switch.turn_off\n entity_id: switch.tv_cec\n - delay:\n seconds: 100\n - action: media_player.volume_set\n data:\n entity_id: media_player.livingtv\n volume_level: 1.0\n - action: script.all_notify\n data:\n icon_notify: kodi\n tit: kodi\n msg: restore volume",
|
|
"config": [
|
|
{
|
|
"name": "living TV",
|
|
"room": "living_room",
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.livingtv",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Kodi sleep timer switch",
|
|
"room": null,
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.tv_cec",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "tv_ctrl",
|
|
"automation": "- alias: tv ctrl\n id: tv_ctrl\n initial_state: false\n triggers:\n - trigger: state\n entity_id: binary_sensor.kodi_screen_saver\n to: 'off'\n id: tv_on\n for:\n seconds: 1\n - trigger: state\n entity_id: binary_sensor.kodi_screen_saver\n to: 'on'\n for:\n seconds: 30\n id: tv_off\n - trigger: state\n entity_id: media_player.livingtv\n to: playing\n for:\n seconds: 1\n id: play\n - trigger: state\n entity_id: media_player.livingtv\n from: playing\n for:\n seconds: 1\n id: pause\n - trigger: state\n entity_id: media_player.livingtv\n to: paused\n for:\n seconds: 3\n id: pause_long\n - trigger: event\n event_type: tv_ctrl\n event_data:\n data: tv_off\n id: tv_off\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - tv_on\n - tv_off\n sequence:\n - action: kodi.call_method\n data:\n entity_id: media_player.livingtv\n method: XBMC.GetInfoBooleans\n booleans:\n - System.IdleTime(60)\n - delay:\n milliseconds: 500\n - choose:\n - conditions:\n - condition: trigger\n id:\n - tv_on\n - condition: state\n entity_id: media_player.livingtv\n state: idle\n - condition: state\n entity_id: switch.tv_cec\n state: 'off'\n sequence:\n - action: input_select.select_option\n data:\n entity_id: input_select.hyperion_select_effect\n option: Sparks\n - choose:\n - conditions:\n - condition: trigger\n id:\n - tv_on\n - condition: state\n entity_id: binary_sensor.kodi_idle\n state: 'off'\n sequence:\n - if:\n - condition: state\n entity_id: media_player.ht_mt500_501_b34d6a\n state: playing\n then:\n - action: media_player.turn_off\n data:\n entity_id: media_player.ht_mt500_501_b34d6a\n else:\n - action: shell_command.sound_bar_on\n - delay:\n seconds: 5\n - choose:\n - conditions:\n - condition: trigger\n id:\n - tv_on\n - condition: state\n entity_id: media_player.livingtv\n state: idle\n - condition: state\n entity_id: switch.tv_cec\n state: 'off'\n sequence:\n - if:\n - condition: state\n entity_id: binary_sensor.kodi_idle\n state: 'off'\n then:\n - action: switch.turn_on\n entity_id: switch.tv_cec\n - wait_template: \"{{\\n is_state('switch.tv_cec', 'on')\\n }}\"\n timeout:\n seconds: 30\n continue_on_timeout: true\n - delay:\n seconds: 5\n - action: script.is_hdmi1\n - delay:\n seconds: 5\n - action: script.as_hdmi1\n - delay:\n seconds: 5\n - action: script.tv_hdmi1_audio\n - delay:\n seconds: 5\n - action: script.as_hdmi1\n - delay:\n seconds: 5\n - action: script.tv_hdmi1_audio\n - action: script.state_kodi\n - delay:\n seconds: 5\n - action: script.as_hdmi1\n - delay:\n seconds: 5\n - action: script.tv_hdmi1_audio\n - action: script.turn_on\n data:\n entity_id:\n - script.light_extend_clear\n - action: songpal.set_sound_setting\n data:\n entity_id: media_player.soundbar\n name: subwooferLevel\n value: 6\n - action: songpal.set_sound_setting\n data:\n entity_id: media_player.soundbar\n name: voice\n value: type2\n - action: media_player.volume_set\n data:\n entity_id: media_player.soundbar\n volume_level: 0.24\n - action: notify.kodi\n data:\n title: cec on\n message: sequnce finised\n data:\n icon: info\n displaytime: 5000\n - event: tv_cec_control_done\n event_data:\n cec: 'on'\n else:\n - action: script.all_notify\n data:\n icon_notify: television\n tit: living tv\n msg: skip on\n - conditions:\n - condition: trigger\n id:\n - tv_off\n - condition: state\n entity_id: media_player.livingtv\n state: idle\n - condition: state\n entity_id: switch.tv_cec\n state: 'on'\n sequence:\n - action: switch.turn_off\n entity_id: switch.tv_cec\n - wait_template: \"{{\\n is_state('switch.tv_cec', 'off')\\n }}\"\n timeout:\n seconds: 20\n continue_on_timeout: true\n - choose:\n - conditions:\n - condition: state\n entity_id: switch.tv_cec\n state: 'on'\n sequence:\n - action: input_select.select_option\n data:\n entity_id: input_select.hyperion_select_effect\n option: Police Lights Solid\n - action: script.all_notify\n data:\n icon_notify: television\n tit: living tv\n msg: restart\n - delay:\n seconds: 30\n - action: script.living_tv_reboot\n default:\n - delay:\n seconds: 5\n - action: script.radio_on\n - action: input_select.select_option\n data:\n entity_id: input_select.hyperion_select_effect\n option: Matrix\n - event: tv_cec_control_done\n event_data:\n cec: 'off'\n - conditions:\n - condition: trigger\n id:\n - pause\n sequence:\n - action: input_select.select_option\n data:\n entity_id: input_select.hyperion_select_effect\n option: Lights\n - conditions:\n - condition: trigger\n id:\n - play\n sequence:\n - action: script.turn_on\n data:\n entity_id:\n - script.light_extend_clear\n - action: input_select.select_option\n data:\n entity_id: input_select.hyperion_select_effect\n option: None\n - conditions:\n - condition: trigger\n id:\n - pause_long\n sequence:\n - action: script.state_kodi\n - action: kodi.call_method\n data:\n entity_id: media_player.livingtv\n method: Addons.ExecuteAddon\n addonid: plugin.program.braviacontrol\n params: VolumeDown\n - delay:\n seconds: 1\n - action: kodi.call_method\n data:\n entity_id: media_player.livingtv\n method: Addons.ExecuteAddon\n addonid: plugin.program.braviacontrol\n params: VolumeUp",
|
|
"config": [
|
|
{
|
|
"name": "living TV",
|
|
"room": "living_room",
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.livingtv",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Kodi sleep timer switch",
|
|
"room": null,
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.tv_cec",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Kodi screen saver sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.kodi_screen_saver",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Kodi idle sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.kodi_idle",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "sound bar media player",
|
|
"room": null,
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.ht_mt500_501_b34d6a",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "hyperion select effect input select",
|
|
"room": null,
|
|
"type": "input_select",
|
|
"id": {
|
|
"entity_id": "input_select.hyperion_select_effect",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "soundbar media player",
|
|
"room": null,
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.soundbar",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Light Extend Clear",
|
|
"room": null,
|
|
"type": "script",
|
|
"id": {
|
|
"entity_id": "script.light_extend_clear",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Radio On",
|
|
"room": null,
|
|
"type": "script",
|
|
"id": {
|
|
"entity_id": "script.radio_on",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "kodi_clear_tv_db",
|
|
"automation": "- alias: kodi_clear_tv_db\n id: kodi_clear_tv_db\n triggers:\n - trigger: event\n event_type: tv_cec_control_done\n event_data:\n cec: 'off'\n conditions:\n - condition: state\n entity_id: media_player.livingtv\n state: idle\n actions:\n - action: kodi.call_method\n data:\n entity_id: media_player.livingtv\n method: Addons.SetAddonEnabled\n addonid: pvr.hts\n enabled: false\n - delay:\n seconds: 5\n - action: shell_command.tv_cleardb\n - delay:\n seconds: 5\n - action: kodi.call_method\n data:\n entity_id: media_player.livingtv\n method: Addons.SetAddonEnabled\n addonid: pvr.hts\n enabled: true\n - delay:\n seconds: 10\n - action: kodi.call_method\n data:\n entity_id: media_player.livingtv\n method: VideoLibrary.Clean",
|
|
"config": [
|
|
{
|
|
"name": "living TV",
|
|
"room": "living_room",
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.livingtv",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "update_video_db",
|
|
"automation": "- alias: update_video_db\n id: update_video_db\n triggers:\n - trigger: event\n event_type: tv_cec_control_done\n event_data:\n cec: 'on'\n - trigger: state\n entity_id: media_player.livingtv\n to: idle\n for:\n seconds: 10\n - trigger: state\n entity_id: media_player.livingtv\n to: paused\n for:\n seconds: 10\n actions:\n - action: script.update_video_db\n - action: logbook.log\n data_template:\n name: videodb\n message: trigger update\n - action: automation.turn_off\n entity_id: automation.update_video_db",
|
|
"config": [
|
|
{
|
|
"name": "living TV",
|
|
"room": "living_room",
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.livingtv",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Update Video DB",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.update_video_db",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "sonarr_radarr_db",
|
|
"automation": "- alias: sonarr_radarr_db\n id: sonarr_radarr_db\n triggers:\n - trigger: event\n event_type: update_video_db\n mode: queued\n actions:\n - action: script.all_notify\n data_template:\n icon_notify: download-outline\n tit: \"{{\\n trigger.event.data.name\\n }}\"\n msg: \"{{\\n trigger.event.data.eventtype\\n }}\"\n - choose:\n - conditions:\n - condition: template\n value_template: \"{{\\n trigger.event.data.eventtype in ['Download', 'Rename']\\n\\\n \\ }}\"\n sequence:\n - action: automation.turn_on\n entity_id: automation.update_video_db",
|
|
"config": [
|
|
{
|
|
"name": "Update Video DB",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.update_video_db",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "bazarr_subs",
|
|
"automation": "- alias: bazarr_subs\n id: bazarr_subs\n triggers:\n - trigger: event\n event_type: bazarr_subs\n actions:\n - action: script.all_notify\n data_template:\n icon_notify: subtitles-outline\n tit: bazarr\n msg: '{{trigger.event.data.message}}'",
|
|
"config": []
|
|
},
|
|
{
|
|
"id": "living_light",
|
|
"automation": "- alias: living_light\n id: living_light\n initial_state: false\n triggers:\n - trigger: state\n entity_id: binary_sensor.living_motion\n to: 'on'\n id: light_on\n - trigger: state\n entity_id: binary_sensor.living_occupancy\n to: 'off'\n for:\n seconds: 60\n id: light_off\n - trigger: state\n entity_id: binary_sensor.bed_motion\n to: 'on'\n id: light_off\n - trigger: state\n entity_id: binary_sensor.office_motion\n to: 'on'\n id: light_off\n - trigger: state\n entity_id: binary_sensor.light_video_pause\n to: 'on'\n id: light_on\n - trigger: state\n entity_id: binary_sensor.light_video_pause\n to: 'off'\n id: light_off_video\n - trigger: event\n event_type: lights_check\n event_data:\n light: turn_off\n id: light_off\n mode: restart\n actions:\n - variables:\n cfg: \"{% from 'tools.jinja' import light_cfg %} {{ light_cfg(\\n is_state('binary_sensor.night_mode',\\\n \\ 'off') and\\n is_state('binary_sensor.light_video_pause', 'off')\\n\\\n \\ ) | from_json\\n }}\"\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n - condition: state\n entity_id: light.living\n state: 'off'\n - condition: state\n entity_id: binary_sensor.kodi_active\n state: 'off'\n - condition: state\n entity_id: binary_sensor.day\n state: 'off'\n - condition: numeric_state\n entity_id: sensor.living_lux\n value_template: '{{ float(state.state, 30) }}'\n below: 40\n sequence:\n - action: script.lights_on\n data:\n ctrl_light: light.living\n ctrl_all: '{{ is_state(''binary_sensor.night_mode'', ''off'') }}'\n brightness_pct: '{{ cfg.brightness }}'\n transition: '{{ cfg.transition }}'\n color_temp: '{{ cfg.temp }}'\n - conditions:\n - condition: trigger\n id:\n - light_off\n - condition: state\n entity_id: light.living\n state: 'on'\n - condition: state\n entity_id: binary_sensor.light_video_pause\n state: 'off'\n - condition: or\n conditions:\n - condition: state\n entity_id: binary_sensor.living_occupancy\n state: 'off'\n - condition: state\n entity_id: binary_sensor.kodi_active\n state: 'on'\n sequence:\n - action: script.lights_off\n data:\n ctrl_light: light.living\n transition: '{{ cfg.transition }}'\n - conditions:\n - condition: trigger\n id:\n - light_off_video\n - condition: state\n entity_id: light.living\n state: 'on'\n sequence:\n - action: script.lights_off\n data:\n ctrl_light: light.living\n transition: '{{ cfg.transition }}'\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n sequence:\n - event: kitchen_light_1\n event_data:\n ctrl: living_on\n brightness_pct: '{{ cfg.brightness }}'\n temp: \"{%- if is_state('light.living', 'on') -%}\\n {{ state_attr('light.living',\\\n \\ 'color_temp_kelvin') }}\\n{%- else -%}\\n {{ cfg.temp }}\\n{%- endif -%}\"\n transition: '{{ cfg.transition }}'\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_off\n sequence:\n - event: kitchen_light_1\n event_data:\n ctrl: living_off\n transition: '{{ cfg.transition }}'",
|
|
"config": [
|
|
{
|
|
"name": "bed motion sensor",
|
|
"room": "bedroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bed_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living motion sensor",
|
|
"room": "living_room",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.living_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office motion sensor",
|
|
"room": "office",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.office_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "night mode sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.night_mode",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "day sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.day",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "kitchen kodi active sensor",
|
|
"room": "kitchen",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.kodi_active",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living light",
|
|
"room": "living_room",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.living",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living occupancy sensor",
|
|
"room": "living_room",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.living_occupancy",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "light video pause sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.light_video_pause",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living lux sensor",
|
|
"room": "living_room",
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.living_lux",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "other_living_light",
|
|
"automation": "- alias: other_living_light\n id: other_living_light\n triggers:\n - trigger: state\n entity_id:\n - binary_sensor.living_motion\n - binary_sensor.night_mode_ctrl\n to: 'on'\n id: light_on\n - trigger: state\n entity_id: binary_sensor.living_occupancy\n to: 'off'\n for:\n seconds: 120\n id: light_off\n - trigger: state\n entity_id: binary_sensor.night_mode_ctrl\n to: 'off'\n id: light_ctrl_off\n - trigger: event\n event_type: lights_check\n event_data:\n light: turn_off\n id: light_ctrl_off\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n - condition: state\n entity_id: binary_sensor.living_occupancy\n state: 'on'\n - condition: state\n entity_id: binary_sensor.night_mode_ctrl\n state: 'on'\n - condition: state\n entity_id: light.shutter_living\n state: 'off'\n sequence:\n - action: light.turn_on\n target:\n entity_id:\n - light.shutter_living\n - conditions:\n - condition: trigger\n id:\n - light_off\n - condition: state\n entity_id: binary_sensor.living_occupancy\n state: 'off'\n - condition: state\n entity_id: light.shutter_living\n state: 'on'\n sequence:\n - action: light.turn_off\n target:\n entity_id:\n - light.shutter_living\n - conditions:\n - condition: trigger\n id:\n - light_ctrl_off\n - condition: state\n entity_id: light.shutter_living\n state: 'on'\n sequence:\n - action: light.turn_off\n target:\n entity_id:\n - light.shutter_living",
|
|
"config": [
|
|
{
|
|
"name": "living motion sensor",
|
|
"room": "living_room",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.living_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "night mode sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.night_mode",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "night mode control sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.night_mode_ctrl",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living occupancy sensor",
|
|
"room": "living_room",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.living_occupancy",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "shutter living light",
|
|
"room": "living_room",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.shutter_living",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "n0ll_not_home",
|
|
"automation": "- alias: n0ll_not_home\n id: n0ll_not_home\n triggers:\n - trigger: state\n entity_id: device_tracker.n0ll\n to: not_home\n for:\n seconds: 90\n actions:\n - action: script.sound_bar_go_sleep",
|
|
"config": [
|
|
{
|
|
"name": "device tracker n0ll",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.n0ll",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "root_not_home",
|
|
"automation": "- alias: root_not_home\n id: root_not_home\n initial_state: false\n triggers:\n - trigger: zone\n entity_id: device_tracker.root\n zone: zone.home\n event: leave\n actions:\n - action: script.turn_on\n data:\n entity_id:\n - script.light_extend_clear\n - action: media_player.turn_off\n entity_id:\n - media_player.ht_mt500_501_b34d6a\n - media_player.bedroom_speaker\n - action: script.kodi_turn_off\n - action: automation.turn_off\n entity_id:\n - automation.just_home",
|
|
"config": [
|
|
{
|
|
"name": "bedroom speaker",
|
|
"room": "bedroom",
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.bedroom_speaker",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "device tracker root",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.root",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "sound bar media player",
|
|
"room": null,
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.ht_mt500_501_b34d6a",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Just Home",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.just_home",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Light Extend Clear",
|
|
"room": null,
|
|
"type": "script",
|
|
"id": {
|
|
"entity_id": "script.light_extend_clear",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "home_away",
|
|
"automation": "- alias: home_away\n id: home_away\n triggers:\n - trigger: numeric_state\n entity_id: sensor.home_root_distance\n above: 15\n id: away\n - trigger: state\n entity_id: input_boolean.away_skip\n for:\n seconds: 3\n id: away_skip\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: or\n conditions:\n - condition: trigger\n id:\n - away\n - condition: and\n conditions:\n - condition: trigger\n id:\n - away_skip\n - condition: state\n entity_id: input_boolean.away_skip\n state: 'off'\n - condition: numeric_state\n entity_id: sensor.home_root_distance\n above: 15\n sequence:\n - if:\n - condition: state\n entity_id: input_boolean.away_skip\n state: 'off'\n then:\n - action: notify.gmail\n data:\n message: home away trigger\n title: hass\n - action: script.turn_on\n target:\n entity_id:\n - script.doors_full_lock\n - action: switch.turn_off\n entity_id:\n - switch.living_tv\n - switch.bed_switch_1\n - action: automation.turn_on\n entity_id: automation.home_near\n - action: automation.turn_off\n entity_id: automation.home_away\n else:\n - action: script.all_notify\n data:\n tit: home_away\n msg: skip\n - choose:\n - conditions:\n - condition: trigger\n id:\n - away_skip\n sequence:\n - action: script.all_notify\n data:\n tit: home_away\n msg: \"{%- set _map = {\\n 'on': 'disabled',\\n 'off': 'enabled'\\n\\\n \\ }\\n -%}\\nis {{ _map[states('input_boolean.away_skip')] }}\"",
|
|
"config": [
|
|
{
|
|
"name": "living TV switch",
|
|
"room": "living_room",
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.living_tv",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed switch 1",
|
|
"room": "bedroom",
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.bed_switch_1",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "away skip boolean",
|
|
"room": null,
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.away_skip",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "home root distance sensor",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.home_root_distance",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Home Away",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.home_away",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Home Near",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.home_near",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Doors Full Lock",
|
|
"room": null,
|
|
"type": "script",
|
|
"id": {
|
|
"entity_id": "script.doors_full_lock",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "office_light",
|
|
"automation": "- alias: office_light\n id: office_light\n initial_state: false\n triggers:\n - trigger: state\n entity_id: binary_sensor.office_motion\n to: 'on'\n id: light_on\n - trigger: state\n entity_id: binary_sensor.office_occupancy\n to: 'off'\n for:\n seconds: 60\n id: light_off\n - trigger: state\n entity_id: binary_sensor.living_motion\n to: 'on'\n id: light_off\n - trigger: state\n entity_id: binary_sensor.bed_motion\n to: 'on'\n id: light_off\n - trigger: event\n event_type: lights_check\n event_data:\n light: turn_off\n id: light_off\n mode: restart\n actions:\n - variables:\n cfg: '{% from ''tools.jinja'' import light_cfg %} {{ light_cfg(is_state(''binary_sensor.night_mode'',\n ''off'')) | from_json }}'\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n - condition: state\n entity_id: light.office\n state: 'off'\n - condition: state\n entity_id: binary_sensor.day\n state: 'off'\n sequence:\n - if:\n - condition: state\n entity_id:\n - input_boolean.office_enter_dummy\n state: 'off'\n then:\n - action: script.lights_on\n data:\n ctrl_light: light.office\n ctrl_all: '{{ is_state(''binary_sensor.night_mode'', ''off'') }}'\n brightness_pct: '{{ cfg.brightness }}'\n transition: '{{ cfg.transition }}'\n color_temp: '{{ cfg.temp }}'\n else:\n - action: script.lights_on\n data:\n ctrl_light: light.office_desk\n ctrl_all: false\n brightness_pct: 70\n transition: 5\n color_temp: 4000\n - action: input_boolean.turn_off\n entity_id:\n - input_boolean.office_enter_dummy\n - conditions:\n - condition: trigger\n id:\n - light_off\n - condition: state\n entity_id: light.office\n state: 'on'\n - condition: state\n entity_id: binary_sensor.office_occupancy\n state: 'off'\n sequence:\n - action: script.lights_off\n data:\n ctrl_light: light.office\n transition: '{{ cfg.transition }}'",
|
|
"config": [
|
|
{
|
|
"name": "bed motion sensor",
|
|
"room": "bedroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bed_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living motion sensor",
|
|
"room": "living_room",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.living_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office motion sensor",
|
|
"room": "office",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.office_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "night mode sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.night_mode",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "day sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.day",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office occupancy sensor",
|
|
"room": "office",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.office_occupancy",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office enter dummy boolean",
|
|
"room": "office",
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.office_enter_dummy",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office light",
|
|
"room": "office",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.office",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office desk light",
|
|
"room": "office",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.office_desk",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "other_office_light",
|
|
"automation": "- alias: other_office_light\n id: other_office_light\n triggers:\n - trigger: state\n entity_id:\n - binary_sensor.office_motion\n - binary_sensor.night_mode_ctrl\n to: 'on'\n id: light_on\n - trigger: state\n entity_id: binary_sensor.office_occupancy\n to: 'off'\n for:\n seconds: 120\n id: light_off\n - trigger: state\n entity_id: binary_sensor.night_mode_ctrl\n to: 'off'\n id: light_ctrl_off\n - trigger: event\n event_type: lights_check\n event_data:\n light: turn_off\n id: light_ctrl_off\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n - condition: state\n entity_id: binary_sensor.office_occupancy\n state: 'on'\n - condition: state\n entity_id: binary_sensor.night_mode_ctrl\n state: 'on'\n - condition: state\n entity_id: light.shutter_office\n state: 'off'\n sequence:\n - action: light.turn_on\n target:\n entity_id:\n - light.shutter_office\n - condition: state\n entity_id: input_boolean.office_enter_dummy\n state: 'on'\n - action: input_boolean.turn_off\n entity_id:\n - input_boolean.office_enter_dummy\n - conditions:\n - condition: trigger\n id:\n - light_off\n - condition: state\n entity_id: binary_sensor.office_occupancy\n state: 'off'\n - condition: state\n entity_id: light.shutter_office\n state: 'on'\n sequence:\n - action: light.turn_off\n target:\n entity_id:\n - light.shutter_office\n - conditions:\n - condition: trigger\n id:\n - light_ctrl_off\n - condition: state\n entity_id: light.shutter_office\n state: 'on'\n sequence:\n - action: light.turn_off\n target:\n entity_id:\n - light.shutter_office\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n - condition: state\n entity_id: binary_sensor.office_occupancy\n state: 'on'\n - condition: state\n entity_id: input_boolean.in_bed_dummy_switch\n state: 'off'\n - condition: state\n entity_id: light.office_wardrobe\n state: 'off'\n sequence:\n - action: light.turn_on\n target:\n entity_id:\n - light.office_wardrobe\n - conditions:\n - condition: trigger\n id:\n - light_off\n - condition: state\n entity_id: binary_sensor.office_occupancy\n state: 'off'\n - condition: state\n entity_id: light.office_wardrobe\n state: 'on'\n sequence:\n - action: light.turn_off\n target:\n entity_id:\n - light.office_wardrobe\n - conditions:\n - condition: trigger\n id:\n - light_ctrl_off\n - condition: state\n entity_id: light.office_wardrobe\n state: 'on'\n sequence:\n - action: light.turn_off\n target:\n entity_id:\n - light.office_wardrobe",
|
|
"config": [
|
|
{
|
|
"name": "office motion sensor",
|
|
"room": "office",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.office_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "night mode sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.night_mode",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "night mode control sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.night_mode_ctrl",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "in bed dummy switch",
|
|
"room": "bedroom",
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.in_bed_dummy_switch",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office occupancy sensor",
|
|
"room": "office",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.office_occupancy",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office enter dummy boolean",
|
|
"room": "office",
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.office_enter_dummy",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office light",
|
|
"room": "office",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.office",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "shutter office light",
|
|
"room": "office",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.shutter_office",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office wardrobe light",
|
|
"room": "office",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.office_wardrobe",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "bath_heating",
|
|
"automation": "- id: bath_heating\n alias: bath_heating\n triggers:\n - trigger: state\n entity_id: switch.climate_control\n for:\n minutes: 3\n id: on_off\n - trigger: state\n entity_id: input_boolean.in_bed_dummy_switch\n to: 'on'\n for:\n minutes: 3\n id: bed_off\n - trigger: time\n at: 06:30:00\n id: time_on\n - trigger: time\n at: 00:15:00\n id: time_off\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - time_on\n - condition: state\n entity_id: device_tracker.root\n state: home\n - condition: state\n entity_id: climate.bath_tvr\n state:\n - heat\n sequence:\n - action: climate.set_hvac_mode\n data:\n entity_id: climate.bath_tvr\n hvac_mode: heat\n - delay:\n seconds: 3\n - action: climate.set_preset_mode\n data:\n entity_id: climate.bath_tvr\n preset_mode: manual\n - delay:\n seconds: 3\n - action: climate.set_temperature\n data:\n entity_id: climate.bath_tvr\n temperature: 22.5\n - delay:\n seconds: 3\n - action: switch.turn_on\n data:\n entity_id: switch.bath_tvr_boost\n - conditions:\n - condition: trigger\n id:\n - time_off\n - bed_off\n - condition: state\n entity_id: climate.bath_tvr\n state:\n - heat\n sequence:\n - action: climate.set_temperature\n data:\n entity_id: climate.bath_tvr\n temperature: 19.5\n - conditions:\n - condition: trigger\n id:\n - on_off\n - condition: state\n entity_id: switch.climate_control\n state: 'on'\n - condition: state\n entity_id: select.operation_mode\n state: heating\n - condition: state\n entity_id: climate.bath_tvr\n state:\n - 'off'\n sequence:\n - action: climate.set_hvac_mode\n data:\n entity_id: climate.bath_tvr\n hvac_mode: heat\n - delay:\n seconds: 3\n - action: climate.set_preset_mode\n data:\n entity_id: climate.bath_tvr\n preset_mode: manual\n - delay:\n seconds: 3\n - action: climate.set_temperature\n data:\n entity_id: climate.bath_tvr\n temperature: 20.5\n - conditions:\n - condition: trigger\n id:\n - on_off\n - condition: or\n conditions:\n - condition: and\n conditions:\n - condition: state\n entity_id: switch.climate_control\n state: 'off'\n - condition: state\n entity_id: select.operation_mode\n state: heating\n - condition: and\n conditions:\n - condition: state\n entity_id: switch.climate_control\n state: 'on'\n - condition: state\n entity_id: select.operation_mode\n state: cooling\n - condition: or\n conditions:\n - condition: state\n entity_id: climate.bath_tvr\n state:\n - heat\n - condition: numeric_state\n entity_id: climate.bath_tvr\n attribute: temperature\n above: 10.5\n sequence:\n - action: climate.set_hvac_mode\n data:\n entity_id: climate.bath_tvr\n hvac_mode: heat\n - delay:\n seconds: 3\n - action: climate.set_preset_mode\n data:\n entity_id: climate.bath_tvr\n preset_mode: manual\n - delay:\n seconds: 3\n - action: climate.set_temperature\n data:\n entity_id: climate.bath_tvr\n temperature: 10.5\n - delay:\n seconds: 3\n - action: climate.set_hvac_mode\n data:\n entity_id: climate.bath_tvr\n hvac_mode: 'off'\n default:\n - action: logbook.log\n data:\n name: bath_heating\n data_template:\n message: 'check automation using default - Id: {{trigger.id}} Idx: {{ trigger.idx\n }}'",
|
|
"config": [
|
|
{
|
|
"name": "in bed dummy switch",
|
|
"room": "bedroom",
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.in_bed_dummy_switch",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "device tracker root",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.root",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bath TVR climate",
|
|
"room": "bathroom",
|
|
"type": "climate",
|
|
"id": {
|
|
"entity_id": "climate.bath_tvr",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "climate control switch",
|
|
"room": null,
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.climate_control",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "operation mode select",
|
|
"room": null,
|
|
"type": "select",
|
|
"id": {
|
|
"entity_id": "select.operation_mode",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bath TVR boost switch",
|
|
"room": "bathroom",
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.bath_tvr_boost",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "bath_light",
|
|
"automation": "- id: bath_light\n alias: bath_light\n initial_state: false\n triggers:\n - trigger: state\n entity_id: binary_sensor.bath_motion\n to: 'on'\n id: light_on\n - trigger: state\n entity_id: binary_sensor.bath_occupancy\n to: 'off'\n for:\n seconds: \"{%- if int(states('counter.bath_motion'), 30) > 14 -%}\\n 120\\n{%-\\\n \\ elif int(states('counter.bath_motion'), 30) > 10 -%}\\n 90\\n{%- elif int(states('counter.bath_motion'),\\\n \\ 30) > 6 -%}\\n 60\\n{%- elif int(states('counter.bath_motion'), 30) > 3 -%}\\n\\\n \\ 45\\n{%- else -%}\\n 30\\n{%- endif -%}\"\n id: light_off\n - trigger: state\n entity_id: binary_sensor.bed_motion\n to: 'on'\n id: light_off\n - trigger: state\n entity_id: binary_sensor.living_motion\n to: 'on'\n id: light_off\n - trigger: event\n event_type: lights_check\n event_data:\n light: turn_off\n id: light_off\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n - condition: state\n entity_id: light.bath\n state: 'off'\n sequence:\n - action: script.lights_on\n data:\n ctrl_light: light.bath\n ctrl_all: '{{ is_state(''binary_sensor.night_mode'', ''off'') }}'\n - conditions:\n - condition: trigger\n id:\n - light_off\n - condition: state\n entity_id: light.bath\n state: 'on'\n - condition: state\n entity_id: binary_sensor.bath_occupancy\n state: 'off'\n sequence:\n - action: script.lights_off\n data:\n ctrl_light: light.bath",
|
|
"config": [
|
|
{
|
|
"name": "bed motion sensor",
|
|
"room": "bedroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bed_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living motion sensor",
|
|
"room": "living_room",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.living_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "night mode sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.night_mode",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bath motion sensor",
|
|
"room": "bathroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bath_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bath occupancy sensor",
|
|
"room": "bathroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bath_occupancy",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bath counter",
|
|
"room": "bathroom",
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.bath_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bath light",
|
|
"room": "bathroom",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.bath",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "bath_fan",
|
|
"automation": "- id: bath_fan\n alias: bath_fan\n triggers:\n - trigger: state\n entity_id: binary_sensor.bath_fan\n to: 'on'\n id: fan_on\n - trigger: state\n entity_id: binary_sensor.bath_fan\n to: 'off'\n id: fan_off\n - trigger: state\n entity_id: binary_sensor.showering\n id: shower\n to: null\n - trigger: state\n entity_id: input_boolean.fan_bath_time\n to: 'on'\n id: manual_on\n - trigger: state\n entity_id: input_boolean.fan_bath_time\n to: 'on'\n for:\n minutes: \"{{\\n int(states('input_number.fan_bath_time'), 1)\\n }}\"\n id: manual_off\n - trigger: event\n event_type: up_down_my\n event_data:\n data: start\n id: manual_off\n - trigger: state\n entity_id: binary_sensor.bath_motion\n to: 'on'\n id: motion\n - trigger: state\n entity_id: binary_sensor.bath_occupancy\n to: 'off'\n for:\n seconds: \"{%- if int(states('counter.bath_motion'), 30) > 12 -%}\\n 90\\n{%-\\\n \\ elif int(states('counter.bath_motion'), 30) > 8 -%}\\n 70\\n{%- elif int(states('counter.bath_motion'),\\\n \\ 30) > 4 -%}\\n 50\\n{%- else -%}\\n 30\\n{%- endif -%}\"\n id: no_motion\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: or\n conditions:\n - condition: and\n conditions:\n - condition: trigger\n id:\n - shower\n - condition: state\n entity_id: binary_sensor.showering\n state: 'on'\n - condition: trigger\n id:\n - fan_on\n - manual_on\n - condition: state\n entity_id: switch.bath_fan\n state: 'off'\n sequence:\n - action: switch.turn_on\n data:\n entity_id:\n - switch.bath_fan\n - conditions:\n - condition: trigger\n id:\n - shower\n - manual_off\n - fan_off\n - condition: or\n conditions:\n - condition: trigger\n id:\n - manual_off\n - condition: state\n entity_id: input_boolean.fan_bath_time\n state: 'off'\n - condition: state\n entity_id: binary_sensor.bath_fan\n state: 'off'\n - condition: state\n entity_id: binary_sensor.showering\n state: 'off'\n - condition: state\n entity_id: switch.bath_fan\n state: 'on'\n sequence:\n - action: switch.turn_off\n data:\n entity_id:\n - switch.bath_fan\n - choose:\n - conditions:\n - condition: trigger\n id:\n - shower\n - manual_off\n - condition: state\n entity_id: input_boolean.fan_bath_time\n state: 'on'\n sequence:\n - action: input_boolean.turn_off\n data:\n entity_id:\n - input_boolean.fan_bath_time\n - choose:\n - conditions:\n - condition: trigger\n id:\n - motion\n sequence:\n - action: counter.increment\n data:\n entity_id:\n - counter.bath_motion\n - conditions:\n - condition: trigger\n id:\n - no_motion\n sequence:\n - action: counter.reset\n data:\n entity_id:\n - counter.bath_motion",
|
|
"config": [
|
|
{
|
|
"name": "bath motion sensor",
|
|
"room": "bathroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bath_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bath occupancy sensor",
|
|
"room": "bathroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bath_occupancy",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bath counter",
|
|
"room": "bathroom",
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.bath_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bath fan sensor",
|
|
"room": "bathroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bath_fan",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bath fan switch",
|
|
"room": "bathroom",
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.bath_fan",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "showering sensor",
|
|
"room": "bathroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.showering",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "fan bath time boolean",
|
|
"room": "bathroom",
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.fan_bath_time",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "fan bath time input number",
|
|
"room": "bathroom",
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.fan_bath_time",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "in_shower",
|
|
"automation": "- id: in_shower\n alias: in_shower\n triggers:\n - trigger: state\n entity_id: binary_sensor.bath_motion_1\n to: 'on'\n id: resume\n - trigger: state\n entity_id: binary_sensor.bath_motion_2\n to: 'on'\n id: pause\n conditions:\n - condition: state\n entity_id: binary_sensor.showering\n state: 'on'\n mode: single\n max_exceeded: silent\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - pause\n - condition: state\n entity_id:\n - automation.water_city_1\n - automation.bath_light\n state: 'on'\n sequence:\n - action: automation.turn_off\n data:\n entity_id:\n - automation.water_city_1\n - automation.bath_light\n - conditions:\n - condition: trigger\n id:\n - resume\n - condition: state\n entity_id:\n - automation.water_city_1\n - automation.bath_light\n state: 'off'\n sequence:\n - action: automation.turn_on\n data:\n entity_id:\n - automation.water_city_1\n - automation.bath_light",
|
|
"config": [
|
|
{
|
|
"name": "bath motion sensor",
|
|
"room": "bathroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bath_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "showering sensor",
|
|
"room": "bathroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.showering",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bath motion 1 sensor",
|
|
"room": "bathroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bath_motion_1",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bath motion 2 sensor",
|
|
"room": "bathroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bath_motion_2",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Bath Light",
|
|
"room": "Bathroom",
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.bath_light",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Water City 1",
|
|
"room": "City",
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.water_city_1",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "in_bed",
|
|
"automation": "- alias: in_bed\n id: in_bed\n triggers:\n - trigger: state\n entity_id: binary_sensor.bed_in\n to: 'on'\n id: trigger_on\n - trigger: state\n entity_id: binary_sensor.hall_motion\n to: 'on'\n id: trigger_off\n - trigger: state\n entity_id: device_tracker.n0ll\n to: home\n id: trigger_off\n - trigger: event\n event_type: android_alarm\n id: trigger_off\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - trigger_on\n - condition: state\n entity_id: input_boolean.in_bed_dummy_switch\n state: 'off'\n - condition: state\n entity_id: device_tracker.root\n state: home\n - condition: template\n value_template: '{{ not is_state(''media_player.livingtv'', ''playing'') }}'\n - condition: state\n entity_id: device_tracker.n0ll\n state: not_home\n - condition: time\n after: '23:00:00'\n before: 07:00:00\n sequence:\n - action: script.light_extend_clear\n - wait_template: \"{{\\n is_state('timer.lumi_double_switch_1_timer', 'idle')\\n\\\n \\ }}\"\n timeout:\n seconds: 30\n continue_on_timeout: true\n - action: input_boolean.turn_on\n data:\n entity_id: input_boolean.in_bed_dummy_switch\n - action: automation.turn_off\n data:\n entity_id: automation.bed_light\n - delay:\n seconds: 3\n - action: timer.start\n entity_id: timer.dummy_in_bed\n data:\n duration: 00:00:45\n - conditions:\n - condition: trigger\n id:\n - trigger_off\n - condition: state\n entity_id: input_boolean.in_bed_dummy_switch\n state: 'on'\n - condition: state\n entity_id: device_tracker.root\n state: home\n sequence:\n - action: input_boolean.turn_off\n data:\n entity_id: input_boolean.in_bed_dummy_switch\n - action: automation.turn_on\n data:\n entity_id: automation.bed_light",
|
|
"config": [
|
|
{
|
|
"name": "in bed dummy switch",
|
|
"room": "bedroom",
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.in_bed_dummy_switch",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living TV",
|
|
"room": "living_room",
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.livingtv",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "hall motion sensor",
|
|
"room": "hall",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.hall_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "device tracker root",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.root",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "device tracker n0ll",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.n0ll",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed in sensor",
|
|
"room": "bedroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bed_in",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "dummy in bed timer",
|
|
"room": "bedroom",
|
|
"type": "timer",
|
|
"id": {
|
|
"entity_id": "timer.dummy_in_bed",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "lumi double switch 1 timer",
|
|
"room": null,
|
|
"type": "timer",
|
|
"id": {
|
|
"entity_id": "timer.lumi_double_switch_1_timer",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Bed Light",
|
|
"room": "Bedroom",
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.bed_light",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Light Extend Clear",
|
|
"room": null,
|
|
"type": "script",
|
|
"id": {
|
|
"entity_id": "script.light_extend_clear",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "in_bed_light",
|
|
"automation": "- alias: in_bed_light\n id: in_bed_light\n triggers:\n - trigger: event\n event_type:\n - timer.finished\n - timer.restarted\n - timer.started\n event_data:\n entity_id: timer.dummy_in_bed\n conditions:\n - condition: and\n conditions:\n - condition: template\n value_template: \"{{\\n is_state('binary_sensor.day', 'off') or\\n is_state('light.bed',\\\n \\ 'on')\\n }}\"\n actions:\n - variables:\n cfg: '{% from ''tools.jinja'' import light_cfg %} {{ light_cfg(is_state(''binary_sensor.night_mode'',\n ''off'')) | from_json }}'\n - action: script.turn_on\n data:\n entity_id: \"{%-\\n set scr = {\\n 'timer.finished': 'script.lights_off',\\n\\\n \\ 'timer.started': 'script.lights_on',\\n 'timer.restarted': 'script.lights_on'\\n\\\n \\ }\\n -%}\\n{{ scr[trigger.event.event_type] }}\"\n variables:\n ctrl_light: light.bed\n ctrl_all: '{{ is_state(''binary_sensor.night_mode'', ''off'') }}'\n brightness_pct: '{{ cfg.brightness }}'\n transition: '{{ cfg.transition }}'\n color_temp: '{{ cfg.temp }}'",
|
|
"config": [
|
|
{
|
|
"name": "night mode sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.night_mode",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed light",
|
|
"room": "bedroom",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.bed",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "day sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.day",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "dummy in bed timer",
|
|
"room": "bedroom",
|
|
"type": "timer",
|
|
"id": {
|
|
"entity_id": "timer.dummy_in_bed",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "bed_charger",
|
|
"automation": "- alias: bed_charger\n id: bed_charger\n triggers:\n - trigger: zone\n entity_id: device_tracker.root\n zone: zone.home\n event: enter\n id: home_enter\n - trigger: zone\n entity_id: device_tracker.root\n zone: zone.home\n event: leave\n id: home_exit\n - trigger: numeric_state\n entity_id: sensor.pixel_6a_battery_level\n below: 10\n id: charge_start\n - trigger: time\n at: 05:50:00\n id: time_start\n - trigger: state\n entity_id: sensor.pixel_6a_charger_type\n to: none\n id: charge_stop\n for:\n seconds: 30\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: or\n conditions:\n - condition: trigger\n id:\n - time_start\n - condition: and\n conditions:\n - condition: numeric_state\n entity_id: sensor.pixel_6a_battery_level\n below: 5\n - condition: trigger\n id:\n - home_enter\n - charge_start\n - condition: state\n entity_id: device_tracker.root\n state: home\n - condition: state\n entity_id: switch.bed_switch_2\n state: 'off'\n sequence:\n - action: switch.turn_on\n entity_id:\n - switch.bed_switch_2\n - conditions:\n - condition: or\n conditions:\n - condition: and\n conditions:\n - condition: trigger\n id:\n - charge_stop\n - condition: numeric_state\n entity_id: sensor.pixel_6a_battery_level\n above: 95\n - condition: and\n conditions:\n - condition: trigger\n id:\n - home_exit\n - condition: state\n entity_id: sensor.pixel_6a_charger_type\n state: none\n - condition: state\n entity_id: switch.bed_switch_2\n state: 'on'\n sequence:\n - action: switch.turn_off\n entity_id:\n - switch.bed_switch_2",
|
|
"config": [
|
|
{
|
|
"name": "device tracker root",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.root",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "pixel 6a battery level sensor",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.pixel_6a_battery_level",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "pixel 6a charger type sensor",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.pixel_6a_charger_type",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed switch 2",
|
|
"room": "bedroom",
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.bed_switch_2",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "ligth_city_2",
|
|
"automation": "- alias: ligth_city_2\n id: ligth_city_2\n triggers:\n - trigger: state\n entity_id: binary_sensor.motion_city_2\n to: 'on'\n id: light_on\n - trigger: state\n entity_id: light.city_2\n to: 'on'\n for:\n minutes: 5\n seconds: 30\n id: light_off\n - trigger: state\n entity_id: binary_sensor.motion_city_2\n to: 'off'\n for:\n seconds: 90\n id: light_off\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n - condition: state\n entity_id: light.city_2\n state: 'off'\n - condition: sun\n after: sunset\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.city_2\n data:\n brightness_pct: 90\n - delay:\n milliseconds: 250\n - action: light.turn_on\n target:\n entity_id: light.city_2\n data:\n color_temp_kelvin: 3300\n - conditions:\n - condition: trigger\n id:\n - light_off\n - condition: and\n conditions:\n - condition: state\n entity_id: light.city_2\n state: 'on'\n - condition: state\n entity_id: binary_sensor.motion_city_2\n state: 'off'\n sequence:\n - action: light.turn_off\n target:\n entity_id: light.city_2",
|
|
"config": [
|
|
{
|
|
"name": "city 2 light",
|
|
"room": "city",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.city_2",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "motion city 2 sensor",
|
|
"room": "city",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.motion_city_2",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "remote_city_2",
|
|
"automation": "- alias: remote_city_2\n id: remote_city_2\n triggers:\n - trigger: mqtt\n topic: tele/zha-bridge-city/054B/SENSOR\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: template\n value_template: \"{{\\n trigger.payload_json.ZbReceived[\\\"0x054B\\\"] is defined\\\n \\ and\\n trigger.payload_json.ZbReceived[\\\"0x054B\\\"].Power == 0\\n}}\"\n - condition: state\n entity_id: light.city_2\n state: 'on'\n sequence:\n - action: light.turn_off\n target:\n entity_id: light.city_2\n - condition: state\n entity_id: automation.ligth_city_2\n state: 'off'\n - action: automation.turn_on\n target:\n entity_id: automation.ligth_city_2\n - conditions:\n - condition: template\n value_template: \"{{\\n trigger.payload_json.ZbReceived[\\\"0x054B\\\"] is defined\\\n \\ and\\n trigger.payload_json.ZbReceived[\\\"0x054B\\\"].Power == 0\\n}}\"\n - condition: state\n entity_id: light.city_2\n state: 'off'\n - condition: state\n entity_id: automation.ligth_city_2\n state: 'on'\n sequence:\n - action: automation.turn_off\n target:\n entity_id: automation.ligth_city_2\n - action: light.turn_on\n target:\n entity_id: light.city_2\n data:\n brightness_pct: 95\n - action: light.turn_on\n target:\n entity_id: light.city_2\n data:\n color_temp_kelvin: 2850\n - conditions:\n - condition: template\n value_template: \"{{\\n trigger.payload_json.ZbReceived[\\\"0x054B\\\"] is defined\\\n \\ and\\n trigger.payload_json.ZbReceived[\\\"0x054B\\\"].Power == 1\\n}}\"\n - condition: state\n entity_id: light.city_2\n state: 'on'\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.city_2\n data:\n color_temp_kelvin: \"{% from 'tools.jinja' import to_temp %} {%- set var\\\n \\ = state_attr('light.city_2', 'color_temp') | float(0) + ((454 - 250)\\\n \\ / 8) -%} {%- if var > 454 -%}\\n {%- set var = 250 -%}\\n{%- endif -%}\\\n \\ {{ to_temp(var) }}\"\n - conditions:\n - condition: template\n value_template: \"{{\\n trigger.payload_json.ZbReceived[\\\"0x054B\\\"] is defined\\\n \\ and\\n trigger.payload_json.ZbReceived[\\\"0x054B\\\"].Power == 2\\n }}\"\n - condition: state\n entity_id: light.city_2\n state: 'on'\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.city_2\n data:\n brightness: \"{%- set var = state_attr('light.city_2', 'brightness') | float(0)\\\n \\ + ((254 - 1) / 8) -%} {%- if var > 254 -%}\\n {%- set var = 1 -%}\\n\\\n {%- endif -%} {{ var | int(0) }}\"\n - conditions:\n - condition: template\n value_template: \"{{\\n trigger.payload_json.ZbReceived[\\\"0x054B\\\"] is defined\\\n \\ and\\n trigger.payload_json.ZbReceived[\\\"0x054B\\\"].Power == 1\\n }}\"\n - condition: state\n entity_id: light.city_2\n state: 'off'\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.city_2\n data:\n brightness_pct: 85\n - conditions:\n - condition: template\n value_template: \"{{\\n trigger.payload_json.ZbReceived[\\\"0x054B\\\"] is defined\\\n \\ and\\n trigger.payload_json.ZbReceived[\\\"0x054B\\\"].Power == 2\\n}}\"\n - condition: state\n entity_id: light.city_2\n state: 'off'\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.city_2\n data:\n brightness_pct: 1",
|
|
"config": [
|
|
{
|
|
"name": "city 2 light",
|
|
"room": "city",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.city_2",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Light City 2",
|
|
"room": "City",
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.ligth_city_2",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "heat_city_2",
|
|
"automation": "- alias: heat_city_2\n id: heat_city_2\n triggers:\n - trigger: zone\n entity_id: device_tracker.root\n zone: zone.city\n event: enter\n id: trigger_on\n - trigger: zone\n entity_id: device_tracker.root\n zone: zone.city\n event: leave\n id: trigger_off\n - trigger: numeric_state\n entity_id: sensor.city_root_distance\n above: 15\n id: trigger_auto_off\n - trigger: time\n at: '23:30:00'\n id: trigger_off\n - trigger: time\n at: '10:45:00'\n id: trigger_on\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - trigger_on\n - condition: zone\n entity_id: device_tracker.root\n zone: zone.city\n - condition: time\n after: '10:45:00'\n before: '23:50:00'\n - condition: state\n entity_id: climate.city_2\n state: 'off'\n sequence:\n - action: climate.set_hvac_mode\n data:\n entity_id: climate.city_2\n hvac_mode: heat\n - conditions:\n - condition: trigger\n id:\n - trigger_off\n - condition: state\n entity_id: climate.city_2\n state: heat\n sequence:\n - action: climate.set_hvac_mode\n data:\n entity_id: climate.city_2\n hvac_mode: 'off'\n - conditions:\n - condition: trigger\n id:\n - trigger_auto_off\n sequence:\n - action: climate.set_hvac_mode\n data:\n entity_id: climate.city_2\n hvac_mode: 'off'\n - action: automation.turn_off\n data:\n entity_id: automation.heat_city_2",
|
|
"config": [
|
|
{
|
|
"name": "device tracker root",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.root",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "city 2 climate",
|
|
"room": "city",
|
|
"type": "climate",
|
|
"id": {
|
|
"entity_id": "climate.city_2",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "city root distance sensor",
|
|
"room": "city",
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.city_root_distance",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Heat City 2",
|
|
"room": "City",
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.heat_city_2",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "waterheater_city",
|
|
"automation": "- alias: waterheater_city\n id: waterheater_city\n triggers:\n - trigger: numeric_state\n entity_id: sensor.city_root_distance\n below: 25\n id: trigger_on\n - trigger: numeric_state\n entity_id: sensor.city_root_distance\n above: 45\n id: trigger_off\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - trigger_on\n - condition: state\n entity_id: switch.waterheater_city_schedule\n state: 'off'\n sequence:\n - action: switch.turn_on\n target:\n entity_id:\n - switch.waterheater_city_schedule\n - event: waterheater\n event_data:\n city: schedule_on\n - conditions:\n - condition: trigger\n id:\n - trigger_off\n - condition: state\n entity_id: switch.waterheater_city_schedule\n state: 'on'\n sequence:\n - action: switch.turn_off\n target:\n entity_id:\n - switch.waterheater_city_schedule\n - event: waterheater\n event_data:\n city: schedule_off",
|
|
"config": [
|
|
{
|
|
"name": "city root distance sensor",
|
|
"room": "city",
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.city_root_distance",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "waterheater city schedule switch",
|
|
"room": "city",
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.waterheater_city_schedule",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "waterheater city switch",
|
|
"room": "city",
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.waterheater_city",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "waterheater_city_reheat",
|
|
"automation": "- alias: waterheater_city_reheat\n id: waterheater_city_reheat\n triggers:\n - trigger: numeric_state\n entity_id: sensor.waterheater_city\n below: 19.5\n id: trigger_on\n - trigger: numeric_state\n entity_id: sensor.waterheater_city\n above: 35.5\n id: trigger_off\n - trigger: event\n event_type: waterheater\n event_data:\n city: schedule_on\n id: check_on\n - trigger: event\n event_type: waterheater\n event_data:\n city: trigger_off\n id: check_off\n conditions:\n - condition: state\n entity_id: switch.waterheater_city_schedule\n state: 'on'\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - trigger_on\n - condition: time\n after: 08:00:00\n before: '20:30:00'\n - condition: state\n entity_id: switch.waterheater_city\n state: 'off'\n sequence:\n - action: switch.turn_on\n target:\n entity_id: switch.waterheater_city\n - conditions:\n - condition: trigger\n id:\n - trigger_off\n - condition: time\n after: 08:00:00\n - condition: state\n entity_id: switch.waterheater_city\n state: 'on'\n sequence:\n - action: switch.turn_off\n target:\n entity_id: switch.waterheater_city\n - choose:\n - conditions:\n - condition: trigger\n id:\n - check_on\n - condition: time\n after: '13:00:00'\n before: '19:30:00'\n - condition: numeric_state\n entity_id: sensor.waterheater_city\n below: 33\n - condition: state\n entity_id: switch.waterheater_city\n state: 'off'\n sequence:\n - action: switch.turn_on\n target:\n entity_id: switch.waterheater_city\n - conditions:\n - condition: trigger\n id:\n - check_off\n - condition: state\n entity_id: switch.waterheater_city\n state: 'on'\n sequence:\n - action: switch.turn_off\n target:\n entity_id: switch.waterheater_city",
|
|
"config": [
|
|
{
|
|
"name": "waterheater city schedule switch",
|
|
"room": "city",
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.waterheater_city_schedule",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "waterheater city sensor",
|
|
"room": "city",
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.waterheater_city",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "waterheater city switch",
|
|
"room": "city",
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.waterheater_city",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "av_switch_city_1",
|
|
"automation": "- alias: av_switch_city_1\n id: av_switch_city_1\n triggers:\n - trigger: zone\n entity_id: device_tracker.root\n zone: zone.city\n event: enter\n id: trigger_on\n - trigger: numeric_state\n entity_id: sensor.city_root_distance\n above: 45\n id: trigger_off\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - trigger_on\n - condition: state\n entity_id: switch.switch_city_av\n state: 'off'\n sequence:\n - action: switch.turn_on\n data:\n entity_id:\n - switch.switch_city_av\n - conditions:\n - condition: trigger\n id:\n - trigger_off\n - condition: state\n entity_id: switch.switch_city_av\n state: 'on'\n sequence:\n - action: switch.turn_off\n data:\n entity_id:\n - switch.switch_city_av",
|
|
"config": [
|
|
{
|
|
"name": "device tracker root",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.root",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "city root distance sensor",
|
|
"room": "city",
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.city_root_distance",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "city AV switch",
|
|
"room": "city",
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.switch_city_av",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "cliamate_city1_swing_set",
|
|
"automation": "- alias: cliamate_city1_swing_set\n id: cliamate_city1_swing_set\n triggers:\n - trigger: state\n entity_id:\n - input_select.cliamate_city1_swingv\n id: trigger_v\n - trigger: state\n entity_id:\n - input_select.cliamate_city1_swingh\n id: trigger_h\n mode: parallel\n max: 2\n max_exceeded: warning\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - trigger_v\n sequence:\n - action: tasmota_irhvac.set_swingv\n data:\n entity_id: climate.city_1\n swingv: \"{{\\n states(trigger.entity_id)\\n }}\"\n - conditions:\n - condition: trigger\n id:\n - trigger_h\n sequence:\n - action: tasmota_irhvac.set_swingh\n data:\n entity_id: climate.city_1\n swingh: \"{{\\n states(trigger.entity_id)\\n }}\"",
|
|
"config": [
|
|
{
|
|
"name": "city 1 climate",
|
|
"room": "city",
|
|
"type": "climate",
|
|
"id": {
|
|
"entity_id": "climate.city_1",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "climate city1 swingv input select",
|
|
"room": "city",
|
|
"type": "input_select",
|
|
"id": {
|
|
"entity_id": "input_select.cliamate_city1_swingv",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "climate city1 swingh input select",
|
|
"room": "city",
|
|
"type": "input_select",
|
|
"id": {
|
|
"entity_id": "input_select.cliamate_city1_swingh",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "climate_night",
|
|
"automation": "- id: climate_night\n alias: climate_night\n triggers:\n - trigger: state\n entity_id: binary_sensor.climate_night\n to: 'on'\n id: to_on\n - trigger: state\n entity_id: binary_sensor.climate_night\n to: 'off'\n id: to_off\n - trigger: state\n entity_id: switch.climate_control\n to: 'off'\n id: to_off\n conditions:\n - condition: template\n value_template: \"{{\\n trigger.from_state.state not in ['unknown', 'unavailable']\\n\\\n \\ }}\"\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - to_on\n - condition: state\n entity_id: switch.climate_control\n state: 'on'\n sequence:\n - action: scene.create\n data:\n scene_id: restore_night_mode\n snapshot_entities:\n - fan.bed_climate\n - fan.office_climate\n - fan.living_climate\n - climate.temp_bed\n - climate.temp_office\n - climate.temp_living\n - number.temperature_control\n - action: number.set_value\n data:\n entity_id:\n - number.temperature_control\n value: \"{%-\\n set val = {\\n 'auto': state_attr('climate.pump', 'temperature'),\\n\\\n \\ 'heating': state_attr('climate.pump', 'temperature') - 1,\\n \\\n \\ 'cooling': state_attr('climate.pump', 'temperature') + 1,\\n }\\n\\\n -%} {{ val[states('select.operation_mode')] }}\"\n - action: climate.set_temperature\n data:\n entity_id: climate.temp_living\n temperature: \"{%-\\n set val = {\\n 'auto': state_attr('climate.temp_living',\\\n \\ 'temperature'),\\n 'heating': state_attr('climate.temp_living',\\\n \\ 'temperature') - 0.5,\\n 'cooling': state_attr('climate.temp_living',\\\n \\ 'temperature') + 0.5,\\n }\\n-%} {{ val[states('select.operation_mode')]\\\n \\ }}\"\n - action: climate.set_temperature\n data:\n entity_id: climate.temp_office\n temperature: \"{%-\\n set val = {\\n 'auto': state_attr('climate.temp_office',\\\n \\ 'temperature'),\\n 'heating': state_attr('climate.temp_office',\\\n \\ 'temperature') - 0.5,\\n 'cooling': state_attr('climate.temp_office',\\\n \\ 'temperature') + 0.5,\\n }\\n-%} {{ val[states('select.operation_mode')]\\\n \\ }}\"\n - action: climate.set_temperature\n data:\n entity_id: climate.temp_bed\n temperature: \"{%-\\n set val = {\\n 'auto': state_attr('climate.temp_bed',\\\n \\ 'temperature'),\\n 'heating': state_attr('climate.temp_bed', 'temperature')\\\n \\ - 0.5,\\n 'cooling': state_attr('climate.temp_bed', 'temperature')\\\n \\ + 0.5,\\n }\\n-%} {{ val[states('select.operation_mode')] }}\"\n - action: fan.set_preset_mode\n data:\n entity_id:\n - fan.living_climate\n - fan.office_climate\n - fan.bed_climate\n preset_mode: night\n - conditions:\n - condition: trigger\n id:\n - to_off\n - condition: template\n value_template: \"{{\\n states.scene.restore_night_mode.state is defined\\n\\\n \\ }}\"\n sequence:\n - action: scene.turn_on\n data:\n entity_id: scene.restore_night_mode\n - action: scene.delete\n data:\n entity_id: scene.restore_night_mode",
|
|
"config": [
|
|
{
|
|
"name": "climate control switch",
|
|
"room": null,
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.climate_control",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "operation mode select",
|
|
"room": null,
|
|
"type": "select",
|
|
"id": {
|
|
"entity_id": "select.operation_mode",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "climate night sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.climate_night",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed climate fan",
|
|
"room": "bedroom",
|
|
"type": "fan",
|
|
"id": {
|
|
"entity_id": "fan.bed_climate",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office climate fan",
|
|
"room": "office",
|
|
"type": "fan",
|
|
"id": {
|
|
"entity_id": "fan.office_climate",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living climate fan",
|
|
"room": "living_room",
|
|
"type": "fan",
|
|
"id": {
|
|
"entity_id": "fan.living_climate",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed temp climate",
|
|
"room": "bedroom",
|
|
"type": "climate",
|
|
"id": {
|
|
"entity_id": "climate.temp_bed",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office temp climate",
|
|
"room": "office",
|
|
"type": "climate",
|
|
"id": {
|
|
"entity_id": "climate.temp_office",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living temp climate",
|
|
"room": "living_room",
|
|
"type": "climate",
|
|
"id": {
|
|
"entity_id": "climate.temp_living",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "temperature control number",
|
|
"room": null,
|
|
"type": "number",
|
|
"id": {
|
|
"entity_id": "number.temperature_control",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "pump climate",
|
|
"room": null,
|
|
"type": "climate",
|
|
"id": {
|
|
"entity_id": "climate.pump",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Restore Night Mode",
|
|
"room": null,
|
|
"type": "scene",
|
|
"id": {
|
|
"entity_id": "scene.restore_night_mode",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "clima_max_restore_fans",
|
|
"automation": "- id: clima_max_restore_fans\n alias: clima_max_restore_fans\n triggers:\n - trigger: state\n entity_id: device_tracker.root\n from: not_home\n to: home\n for:\n minutes: 10\n id: to_home\n - trigger: state\n entity_id: device_tracker.root\n from: home\n to: not_home\n for:\n minutes: 10\n id: to_away\n - trigger: state\n entity_id: input_boolean.clima_max\n to: 'off'\n for:\n seconds: 5\n id: to_timeout\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - to_home\n - to_away\n - to_timeout\n sequence:\n - action: scene.turn_on\n data:\n entity_id: scene.clima_max_mode_fan\n - action: automation.turn_off\n data:\n entity_id: automation.clima_max_restore_fans",
|
|
"config": [
|
|
{
|
|
"name": "device tracker root",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.root",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "clima max boolean",
|
|
"room": null,
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.clima_max",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Clima Max Restore Fans",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.clima_max_restore_fans",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Clima Max Mode Fan",
|
|
"room": null,
|
|
"type": "scene",
|
|
"id": {
|
|
"entity_id": "scene.clima_max_mode_fan",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "clima_max_restore_temps",
|
|
"automation": "- id: clima_max_restore_temps\n alias: clima_max_restore_temps\n triggers:\n - trigger: state\n entity_id: device_tracker.root\n from: not_home\n to: home\n for:\n minutes: 10\n id: to_home\n - trigger: state\n entity_id: device_tracker.root\n from: home\n to: not_home\n for:\n minutes: 10\n id: to_away\n - trigger: state\n entity_id: input_boolean.clima_max\n to: 'off'\n for:\n seconds: 5\n id: to_timeout\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - to_home\n - to_away\n - to_timeout\n sequence:\n - action: scene.turn_on\n data:\n entity_id: scene.clima_max_mode_temp\n - action: automation.turn_off\n data:\n entity_id: automation.clima_max_restore_temps",
|
|
"config": [
|
|
{
|
|
"name": "device tracker root",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.root",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "clima max boolean",
|
|
"room": null,
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.clima_max",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Clima Max Restore Temps",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.clima_max_restore_temps",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Clima Max Mode Temp",
|
|
"room": null,
|
|
"type": "scene",
|
|
"id": {
|
|
"entity_id": "scene.clima_max_mode_temp",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "clima_max_restore_switch",
|
|
"automation": "- id: clima_max_restore_switch\n alias: clima_max_restore_switch\n triggers:\n - trigger: state\n entity_id: input_boolean.clima_max\n to: 'off'\n for:\n minutes: 20\n id: turn_off\n - trigger: state\n entity_id: alert.clima_max_restore_switch\n to: 'off'\n id: cancel\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - turn_off\n sequence:\n - action: notify.gmail\n data:\n title: clima max\n message: heat pump auto swiched off\n - action: switch.turn_off\n data:\n entity_id:\n - switch.climate_control\n - conditions:\n - condition: trigger\n id:\n - cancel\n sequence:\n - action: notify.gmail\n data:\n title: clima max\n message: heat pump skip restore\n - action: alert.turn_on\n data:\n entity_id:\n - alert.clima_max_restore_switch\n - action: automation.turn_off\n data:\n entity_id:\n - automation.clima_max_restore_switch",
|
|
"config": [
|
|
{
|
|
"name": "climate control switch",
|
|
"room": null,
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.climate_control",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "clima max boolean",
|
|
"room": null,
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.clima_max",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "clima max restore switch alert",
|
|
"room": null,
|
|
"type": "alert",
|
|
"id": {
|
|
"entity_id": "alert.clima_max_restore_switch",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Clima Max Restore Switch",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.clima_max_restore_switch",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "clima_sync",
|
|
"automation": "- id: clima_sync\n alias: clima_sync\n triggers:\n - trigger: state\n entity_id: select.operation_mode\n for:\n seconds: 10\n id: mode\n - trigger: state\n entity_id:\n - switch.climate_control\n to: 'on'\n for:\n seconds: 10\n id: state\n - trigger: state\n entity_id:\n - binary_sensor.pump_temp_on_off\n to: 'on'\n for:\n seconds: 15\n id: state_temp\n - trigger: state\n entity_id:\n - switch.climate_control\n to: 'off'\n for:\n minutes: 15\n id: state\n - trigger: state\n entity_id:\n - binary_sensor.pump_temp_on_off\n to: 'off'\n for:\n minutes: 15\n id: state_temp\n - trigger: homeassistant\n event: start\n id: start_up\n - trigger: state\n entity_id: automation.clima_max_restore_fans\n to: 'off'\n for:\n seconds: 10\n id: max_off\n - trigger: state\n entity_id:\n - binary_sensor.space_cooling\n - binary_sensor.space_heating\n id: thermostat_on_off\n for:\n seconds: 10\n - trigger: state\n entity_id: binary_sensor.thermostat_pump\n to: 'on'\n for:\n seconds: 10\n id: thermostat_on_off\n conditions:\n - condition: or\n conditions:\n - condition: template\n value_template: \"{{\\n trigger.from_state.state not in ['unknown', 'unavailable']\\\n \\ and\\n trigger.to_state.state not in ['unknown', 'unavailable']\\n }}\"\n - condition: trigger\n id:\n - start_up\n - max_off\n mode: queued\n trace:\n stored_traces: 20\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - mode\n sequence:\n - action: script.turn_on\n target:\n entity_id: \"{%-\\n set val = {\\n 'auto': 'script.climate_auto',\\n\\\n \\ 'heating': 'script.climate_heat',\\n 'cooling': 'script.climate_cool',\\n\\\n \\ }\\n-%} {{ val[trigger.to_state.state] }}\"\n - choose:\n - conditions:\n - condition: or\n conditions:\n - condition: trigger\n id:\n - state\n - condition: and\n conditions:\n - condition: trigger\n id:\n - state_temp\n - condition: state\n entity_id:\n - switch.climate_control\n state: 'on'\n sequence:\n - action: \"{%-\\n set val = {\\n 'off': 'fan.turn_off',\\n 'on': 'fan.turn_on'\\n\\\n \\ }\\n -%}\\n{{ val[trigger.to_state.state] }}\"\n target:\n entity_id:\n - fan.living_climate\n - fan.bed_climate\n - fan.office_climate\n - choose:\n - conditions:\n - condition: or\n conditions:\n - condition: trigger\n id: start_up\n - condition: and\n conditions:\n - condition: trigger\n id:\n - state\n - condition: state\n entity_id:\n - switch.climate_control\n state: 'on'\n - condition: state\n entity_id:\n - automation.clima_max_restore_fans\n state: 'off'\n - condition: and\n conditions:\n - condition: trigger\n id:\n - max_off\n - condition: state\n entity_id:\n - automation.fans_speed_modulation\n state: 'on'\n sequence:\n - delay:\n seconds: 5\n - action: fan.set_preset_mode\n data:\n entity_id:\n - fan.living_climate\n - fan.bed_climate\n - fan.office_climate\n preset_mode: silent\n - delay:\n seconds: 5\n - action: fan.set_preset_mode\n data:\n entity_id:\n - fan.living_climate\n - fan.bed_climate\n - fan.office_climate\n preset_mode: auto\n - choose:\n - conditions:\n - condition: trigger\n id:\n - thermostat_on_off\n - condition: state\n entity_id: binary_sensor.space_heating\n state: 'on'\n - condition: state\n entity_id: switch.pump_ctrl_heating\n state: 'off'\n sequence:\n - action: switch.turn_on\n entity_id: switch.pump_ctrl_heating\n - conditions:\n - condition: trigger\n id:\n - thermostat_on_off\n - condition: state\n entity_id: binary_sensor.space_heating\n state: 'off'\n - condition: state\n entity_id: switch.pump_ctrl_heating\n state: 'on'\n sequence:\n - action: switch.turn_off\n entity_id: switch.pump_ctrl_heating\n - conditions:\n - condition: trigger\n id:\n - thermostat_on_off\n - condition: state\n entity_id: binary_sensor.space_cooling\n state: 'on'\n - condition: state\n entity_id: switch.pump_ctrl_cooling\n state: 'off'\n sequence:\n - action: switch.turn_on\n entity_id: switch.pump_ctrl_cooling\n - conditions:\n - condition: trigger\n id:\n - thermostat_on_off\n - condition: state\n entity_id: binary_sensor.space_cooling\n state: 'off'\n - condition: state\n entity_id: switch.pump_ctrl_cooling\n state: 'on'\n sequence:\n - action: switch.turn_off\n entity_id: switch.pump_ctrl_cooling",
|
|
"config": [
|
|
{
|
|
"name": "climate control switch",
|
|
"room": null,
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.climate_control",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "operation mode select",
|
|
"room": null,
|
|
"type": "select",
|
|
"id": {
|
|
"entity_id": "select.operation_mode",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed climate fan",
|
|
"room": "bedroom",
|
|
"type": "fan",
|
|
"id": {
|
|
"entity_id": "fan.bed_climate",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office climate fan",
|
|
"room": "office",
|
|
"type": "fan",
|
|
"id": {
|
|
"entity_id": "fan.office_climate",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living climate fan",
|
|
"room": "living_room",
|
|
"type": "fan",
|
|
"id": {
|
|
"entity_id": "fan.living_climate",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "pump temp on off sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.pump_temp_on_off",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "space cooling sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.space_cooling",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "space heating sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.space_heating",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "thermostat pump sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.thermostat_pump",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "pump ctrl heating switch",
|
|
"room": null,
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.pump_ctrl_heating",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "pump ctrl cooling switch",
|
|
"room": null,
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.pump_ctrl_cooling",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Clima Max Restore Fans",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.clima_max_restore_fans",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Fans Speed Modulation",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.fans_speed_modulation",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "clima_max",
|
|
"automation": "- id: clima_max\n alias: clima_max\n triggers:\n - trigger: state\n entity_id: input_boolean.clima_max\n to: 'on'\n id: to_on\n - trigger: state\n entity_id: input_boolean.clima_max\n to: 'on'\n for:\n minutes: '{{ states(''input_number.clima_max'') |int(10) }}'\n id: to_timeout\n mode: restart\n actions:\n - variables:\n pump_temp: \"{%-\\n set val = {\\n 'auto': state_attr('climate.pump',\\\n \\ 'temperature'),\\n 'heating': state_attr('climate.pump', 'temperature')\\\n \\ + 1,\\n 'cooling': state_attr('climate.pump', 'temperature') - 1,\\n\\\n \\ }\\n -%}\\n{{\\n max(\\n [\\n min(\\n [\\n \\\n \\ val[states('select.operation_mode')],\\n state_attr('climate.pump',\\\n \\ 'max_temp')\\n ]\\n ),\\n state_attr('climate.pump',\\\n \\ 'min_temp')\\n ]\\n )\\n }}\\n\"\n clima_temp: \"{%-\\n set val = {\\n 'auto': state_attr('climate.temp_living',\\\n \\ 'temperature'),\\n 'heating': state_attr('climate.temp_living', 'temperature')\\\n \\ + 1.5,\\n 'cooling': state_attr('climate.temp_living', 'temperature')\\\n \\ - 1.5,\\n }\\n -%}\\n{{\\n max(\\n [\\n min(\\n \\\n \\ [\\n val[states('select.operation_mode')],\\n \\\n \\ state_attr('climate.temp_living', 'max_temp')\\n ]\\n \\\n \\ ),\\n state_attr('climate.temp_living', 'min_temp')\\n \\\n \\ ]\\n )\\n }}\\n\"\n - choose:\n - conditions:\n - condition: or\n conditions:\n - condition: trigger\n id:\n - to_on\n sequence:\n - if:\n - condition: state\n entity_id:\n - fan.bed_climate\n - fan.office_climate\n - fan.living_climate\n state: 'off'\n then:\n - action: fan.turn_on\n data:\n entity_id:\n - fan.bed_climate\n - fan.office_climate\n - fan.living_climate\n - action: scene.create\n data:\n scene_id: clima_max_mode_fan\n snapshot_entities:\n - fan.bed_climate\n - fan.office_climate\n - fan.living_climate\n - if:\n - condition: state\n entity_id: select.operation_mode\n state:\n - cooling\n - auto\n then:\n - action: scene.create\n data:\n scene_id: clima_max_mode_temp\n snapshot_entities:\n - climate.temp_bed\n - climate.temp_office\n - climate.temp_living\n - number.temperature_control\n - if:\n - condition: state\n entity_id: select.operation_mode\n state: heating\n then:\n - action: scene.create\n data:\n scene_id: clima_max_mode_temp\n snapshot_entities:\n - climate.temp_bed\n - climate.temp_office\n - climate.temp_living\n - climate.bath_tvr\n - number.temperature_control\n - action: fan.set_preset_mode\n data:\n entity_id:\n - fan.living_climate\n - fan.office_climate\n - fan.bed_climate\n preset_mode: max\n - if:\n - condition: state\n entity_id: select.operation_mode\n state:\n - cooling\n - auto\n then:\n - action: climate.set_temperature\n data:\n entity_id:\n - climate.temp_bed\n - climate.temp_living\n - climate.temp_office\n temperature: '{{ clima_temp }}\n\n '\n - if:\n - condition: state\n entity_id: select.operation_mode\n state: heating\n then:\n - action: climate.set_hvac_mode\n data:\n entity_id: climate.bath_tvr\n hvac_mode: heat\n - delay:\n milliseconds: 500\n - action: climate.set_preset_mode\n data:\n entity_id: climate.bath_tvr\n preset_mode: manual\n - delay:\n milliseconds: 500\n - action: climate.set_temperature\n data:\n entity_id:\n - climate.temp_bed\n - climate.temp_living\n - climate.temp_office\n - climate.bath_tvr\n temperature: '{{ clima_temp }}\n\n '\n - action: number.set_value\n data:\n entity_id:\n - number.temperature_control\n value: '{{ pump_temp }}'\n - action: automation.turn_on\n data:\n entity_id:\n - automation.clima_max_restore_fans\n - automation.clima_max_restore_temps\n - if:\n - condition: state\n entity_id: switch.climate_control\n state: 'off'\n then:\n - action: automation.turn_on\n data:\n entity_id:\n - automation.clima_max_restore_switch\n - action: switch.turn_on\n data:\n entity_id:\n - switch.climate_control\n else:\n - action: notify.gmail\n data:\n title: clima max\n message: heat pump skip auto swich off\n - conditions:\n - condition: or\n conditions:\n - condition: trigger\n id:\n - to_timeout\n sequence:\n - action: input_boolean.turn_off\n data:\n entity_id:\n - input_boolean.clima_max",
|
|
"config": [
|
|
{
|
|
"name": "bath TVR climate",
|
|
"room": "bathroom",
|
|
"type": "climate",
|
|
"id": {
|
|
"entity_id": "climate.bath_tvr",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "climate control switch",
|
|
"room": null,
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.climate_control",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "operation mode select",
|
|
"room": null,
|
|
"type": "select",
|
|
"id": {
|
|
"entity_id": "select.operation_mode",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed climate fan",
|
|
"room": "bedroom",
|
|
"type": "fan",
|
|
"id": {
|
|
"entity_id": "fan.bed_climate",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office climate fan",
|
|
"room": "office",
|
|
"type": "fan",
|
|
"id": {
|
|
"entity_id": "fan.office_climate",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living climate fan",
|
|
"room": "living_room",
|
|
"type": "fan",
|
|
"id": {
|
|
"entity_id": "fan.living_climate",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed temp climate",
|
|
"room": "bedroom",
|
|
"type": "climate",
|
|
"id": {
|
|
"entity_id": "climate.temp_bed",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office temp climate",
|
|
"room": "office",
|
|
"type": "climate",
|
|
"id": {
|
|
"entity_id": "climate.temp_office",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living temp climate",
|
|
"room": "living_room",
|
|
"type": "climate",
|
|
"id": {
|
|
"entity_id": "climate.temp_living",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "temperature control number",
|
|
"room": null,
|
|
"type": "number",
|
|
"id": {
|
|
"entity_id": "number.temperature_control",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "pump climate",
|
|
"room": null,
|
|
"type": "climate",
|
|
"id": {
|
|
"entity_id": "climate.pump",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "clima max boolean",
|
|
"room": null,
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.clima_max",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "clima max input number",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.clima_max",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Clima Max Restore Fans",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.clima_max_restore_fans",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Clima Max Restore Switch",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.clima_max_restore_switch",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Clima Max Restore Temps",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.clima_max_restore_temps",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "fans_speed_modulation",
|
|
"automation": "- alias: fans_speed_modulation\n id: fans_speed_modulation\n triggers:\n - trigger: numeric_state\n entity_id:\n - sensor.speed_living_climate\n - sensor.speed_office_climate\n - sensor.speed_bed_climate\n below: 1230\n above: 1210\n for:\n minutes: 20\n id: to_max\n - trigger: numeric_state\n entity_id:\n - sensor.speed_living_climate\n - sensor.speed_office_climate\n - sensor.speed_bed_climate\n below: 560\n above: 540\n for:\n minutes: 10\n id: to_max\n - trigger: numeric_state\n entity_id:\n - sensor.speed_living_climate\n - sensor.speed_office_climate\n - sensor.speed_bed_climate\n below: 100\n id: to_max\n - trigger: numeric_state\n entity_id:\n - sensor.speed_living_climate\n - sensor.speed_office_climate\n - sensor.speed_bed_climate\n below: 690\n above: 670\n for:\n minutes: 10\n id: to_auto\n - trigger: numeric_state\n entity_id:\n - sensor.speed_living_climate\n - sensor.speed_office_climate\n - sensor.speed_bed_climate\n above: 1690\n for:\n minutes: 10\n id: to_auto\n conditions:\n - condition: state\n entity_id: switch.climate_control\n state: 'on'\n - condition: state\n entity_id:\n - fan.living_climate\n - fan.bed_climate\n - fan.office_climate\n attribute: preset_mode\n state:\n - auto\n - max\n - condition: state\n entity_id:\n - automation.clima_max_restore_fans\n state: 'off'\n mode: parallel\n max: 10\n trace:\n stored_traces: 30\n actions:\n - variables:\n fan: \"{%-\\n set map = {\\n 'sensor.speed_living_climate': 'fan.living_climate',\\n\\\n \\ 'sensor.speed_office_climate': 'fan.office_climate',\\n 'sensor.speed_bed_climate':\\\n \\ 'fan.bed_climate',\\n }\\n -%}\\n{{ map[trigger.entity_id] }}\"\n - choose:\n - conditions:\n - condition: trigger\n id:\n - to_auto\n - condition: template\n value_template: \"{{\\n is_state_attr( fan, 'preset_mode', 'max' )\\n }}\"\n sequence:\n - action: fan.set_preset_mode\n data:\n entity_id: \"{{\\n fan\\n }}\"\n preset_mode: auto\n - conditions:\n - condition: trigger\n id:\n - to_max\n - condition: template\n value_template: \"{{\\n is_state_attr( fan, 'preset_mode', 'auto' )\\n }}\"\n sequence:\n - action: fan.set_preset_mode\n data:\n entity_id: \"{{\\n fan\\n }}\"\n preset_mode: max",
|
|
"config": [
|
|
{
|
|
"name": "climate control switch",
|
|
"room": null,
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.climate_control",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed climate fan",
|
|
"room": "bedroom",
|
|
"type": "fan",
|
|
"id": {
|
|
"entity_id": "fan.bed_climate",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office climate fan",
|
|
"room": "office",
|
|
"type": "fan",
|
|
"id": {
|
|
"entity_id": "fan.office_climate",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living climate fan",
|
|
"room": "living_room",
|
|
"type": "fan",
|
|
"id": {
|
|
"entity_id": "fan.living_climate",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "speed living climate sensor",
|
|
"room": "living_room",
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.speed_living_climate",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "speed office climate sensor",
|
|
"room": "office",
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.speed_office_climate",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "speed bed climate sensor",
|
|
"room": "bedroom",
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.speed_bed_climate",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Clima Max Restore Fans",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.clima_max_restore_fans",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "apply_offsets",
|
|
"automation": "- alias: apply_offsets\n id: apply_offsets\n triggers:\n - trigger: state\n entity_id:\n - input_number.living_offset\n - input_number.office_offset\n - input_number.bed_offset\n mode: parallel\n max: 10\n trace:\n stored_traces: 20\n max_exceeded: warning\n actions:\n - action: modbus.write_register\n data:\n hub: gw_rs485\n slave: \"{%-\\n set map = {\\n 'input_number.living_offset': 10,\\n \\\n \\ 'input_number.office_offset': 30,\\n 'input_number.bed_offset':\\\n \\ 20,\\n }\\n -%}\\n{{ map[trigger.entity_id] }}\"\n address: 242\n value: \"{{\\n (states(trigger.entity_id) | float(0) * 10) | int (0) |\\n \\\n \\ pack('>h') | unpack('>H')\\n }}\"\n - delay:\n milliseconds: 10000\n - action: homeassistant.update_entity\n data:\n entity_id: \"{%-\\n set map = {\\n 'input_number.living_offset': 'climate.temp_living',\\n\\\n \\ 'input_number.office_offset': 'climate.temp_office',\\n 'input_number.bed_offset':\\\n \\ 'climate.temp_bed',\\n }\\n -%}\\n{{ map[trigger.entity_id] }}\"",
|
|
"config": [
|
|
{
|
|
"name": "bed temp climate",
|
|
"room": "bedroom",
|
|
"type": "climate",
|
|
"id": {
|
|
"entity_id": "climate.temp_bed",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office temp climate",
|
|
"room": "office",
|
|
"type": "climate",
|
|
"id": {
|
|
"entity_id": "climate.temp_office",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living temp climate",
|
|
"room": "living_room",
|
|
"type": "climate",
|
|
"id": {
|
|
"entity_id": "climate.temp_living",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living offset input number",
|
|
"room": "living_room",
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.living_offset",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office offset input number",
|
|
"room": "office",
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.office_offset",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed offset input number",
|
|
"room": "bedroom",
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.bed_offset",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "climate_offset",
|
|
"automation": "- id: climate_offset\n alias: climate_offset\n triggers:\n - trigger: state\n entity_id:\n - switch.climate_control\n to: 'on'\n for:\n seconds: 10\n id: to_on\n variables:\n run: \"{%- if state_attr('automation.climate_offset', 'last_triggered') -%}\\n\\\n \\ {{\\n now() - state_attr('automation.climate_offset', 'last_triggered')\\\n \\ > timedelta(hours=20)\\n }}\\n{%- else -%}\\n true\\n{%- endif -%}\"\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - to_on\n sequence:\n - if:\n - condition: template\n value_template: \"{{\\n run\\n }}\"\n then:\n - action: input_number.set_value\n data:\n entity_id:\n - input_number.living_offset\n - input_number.office_offset\n - input_number.bed_offset\n value: 0.0\n - wait_for_trigger:\n - trigger: state\n entity_id:\n - automation.apply_offsets\n attribute: current\n to: 0\n for:\n seconds: 15\n timeout:\n seconds: 30\n continue_on_timeout: true\n - delay:\n seconds: '{{ wait.remaining }}'\n - variables:\n living: '{{ (states(''sensor.temp_living'') | float - state_attr(''climate.temp_living'',\n ''current_temperature'')) | round(1, ''ceil'') }}'\n office: '{{ (states(''sensor.office_temp'') | float - state_attr(''climate.temp_office'',\n ''current_temperature'')) | round(1, ''ceil'') }}'\n bed: '{{ (states(''sensor.bed_temp'') | float - state_attr(''climate.temp_bed'',\n ''current_temperature'')) | round(1, ''ceil'') }}'\n - action: persistent_notification.create\n data:\n title: temp diff\n message: 'living: {{ living }} office: {{ office }} bed: {{ bed }}'\n - action: input_number.set_value\n data:\n entity_id:\n - input_number.living_offset\n value: '{{ living }}'\n - action: input_number.set_value\n data:\n entity_id:\n - input_number.office_offset\n value: '{{ office }}'\n - action: input_number.set_value\n data:\n entity_id:\n - input_number.bed_offset\n value: '{{ bed }}'\n else:\n - action: logbook.log\n data_template:\n name: climate_offset\n message: skipped",
|
|
"config": [
|
|
{
|
|
"name": "climate control switch",
|
|
"room": null,
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.climate_control",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed temp climate",
|
|
"room": "bedroom",
|
|
"type": "climate",
|
|
"id": {
|
|
"entity_id": "climate.temp_bed",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office temp climate",
|
|
"room": "office",
|
|
"type": "climate",
|
|
"id": {
|
|
"entity_id": "climate.temp_office",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living temp climate",
|
|
"room": "living_room",
|
|
"type": "climate",
|
|
"id": {
|
|
"entity_id": "climate.temp_living",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living offset input number",
|
|
"room": "living_room",
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.living_offset",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office offset input number",
|
|
"room": "office",
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.office_offset",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed offset input number",
|
|
"room": "bedroom",
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.bed_offset",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living temperature sensor",
|
|
"room": "living_room",
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.temp_living",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office temperature sensor",
|
|
"room": "office",
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.office_temp",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed temperature sensor",
|
|
"room": "bedroom",
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.bed_temp",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Apply Offsets",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.apply_offsets",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "tariff_switch",
|
|
"automation": "- alias: tariff_switch\n id: tariff_switch\n triggers:\n - trigger: time\n at: 06:00:00\n id: peak\n variables:\n s: win\n - trigger: time\n at: 07:00:00\n id: peak\n variables:\n s: sum\n - trigger: time\n at: '22:00:00'\n id: offpeak\n variables:\n s: win\n - trigger: time\n at: '23:00:00'\n id: offpeak\n variables:\n s: sum\n conditions:\n - condition: template\n value_template: \"{%- set data = {\\n 'win' : [1, 2, 3, 11, 12],\\n \\\n \\ 'sum' : [4, 5, 6, 7, 8, 9, 10],\\n }\\n -%}\\n{{ now().month in data[s]\\\n \\ }}\"\n mode: restart\n actions:\n - action: select.select_option\n target:\n entity_id:\n - select.monthly_energy\n - select.daily_energy\n data:\n option: '{{ trigger.id }}'",
|
|
"config": [
|
|
{
|
|
"name": "monthly energy select",
|
|
"room": null,
|
|
"type": "select",
|
|
"id": {
|
|
"entity_id": "select.monthly_energy",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "daily energy select",
|
|
"room": null,
|
|
"type": "select",
|
|
"id": {
|
|
"entity_id": "select.daily_energy",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "n0ll_home",
|
|
"automation": "- alias: n0ll_home\n id: n0ll_home\n triggers:\n - trigger: state\n entity_id: device_tracker.n0ll\n from: not_home\n to: home\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: state\n entity_id: media_player.livingtv\n state: idle\n sequence:\n - action: \"{%-\\n set scr = {\\n 'off': 'shell_command.kodi_screensaver',\\n\\\n \\ 'on': 'script.radio_on'\\n }\\n -%}\\n{{ scr[states('binary_sensor.kodi_screen_saver')]\\\n \\ }}\"\n - condition: state\n entity_id: media_player.ht_mt500_501_b34d6a\n state: playing\n - action: timer.pause\n entity_id: timer.sound_bar",
|
|
"config": [
|
|
{
|
|
"name": "living TV",
|
|
"room": "living_room",
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.livingtv",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Kodi screen saver sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.kodi_screen_saver",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "sound bar media player",
|
|
"room": null,
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.ht_mt500_501_b34d6a",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "device tracker n0ll",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.n0ll",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "sound bar timer",
|
|
"room": null,
|
|
"type": "timer",
|
|
"id": {
|
|
"entity_id": "timer.sound_bar",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Radio On",
|
|
"room": null,
|
|
"type": "script",
|
|
"id": {
|
|
"entity_id": "script.radio_on",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "home_near",
|
|
"automation": "- alias: home_near\n id: home_near\n triggers:\n - trigger: numeric_state\n entity_id: sensor.home_root_distance\n below: 35\n - trigger: numeric_state\n entity_id: sensor.home_root_distance\n below: 10\n mode: restart\n actions:\n - action: notify.gmail\n data:\n message: home near trigger\n title: hass\n - action: automation.turn_on\n data:\n entity_id:\n - automation.home_away\n - automation.living_tv\n - action: switch.turn_on\n data:\n entity_id:\n - switch.living_tv\n - switch.bed_switch_1\n - action: automation.turn_off\n data:\n entity_id: automation.home_near",
|
|
"config": [
|
|
{
|
|
"name": "living TV switch",
|
|
"room": "living_room",
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.living_tv",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed switch 1",
|
|
"room": "bedroom",
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.bed_switch_1",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "home root distance sensor",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.home_root_distance",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Home Away",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.home_away",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Home Near",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.home_near",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Living TV",
|
|
"room": "Living Room",
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.living_tv",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "root_home",
|
|
"automation": "- alias: root_home\n id: root_home\n initial_state: false\n triggers:\n - trigger: zone\n entity_id: device_tracker.root\n zone: zone.home\n event: enter\n conditions:\n - condition: template\n value_template: \"{{\\n trigger.from_state != None\\n }}\"\n actions:\n - action: automation.turn_on\n entity_id: automation.just_home",
|
|
"config": [
|
|
{
|
|
"name": "device tracker root",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.root",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Just Home",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.just_home",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "just_home",
|
|
"automation": "- alias: just_home\n id: just_home\n triggers:\n - trigger: state\n entity_id: binary_sensor.hall_motion\n to: 'on'\n - trigger: state\n entity_id: binary_sensor.living_motion\n to: 'on'\n - trigger: state\n entity_id: binary_sensor.door\n to: 'on'\n mode: single\n max_exceeded: silent\n actions:\n - action: input_boolean.turn_off\n entity_id: input_boolean.home_motion\n - choose:\n - conditions:\n - condition: state\n entity_id: media_player.livingtv\n state: idle\n sequence:\n - action: script.turn_on\n data:\n entity_id:\n - script.radio_on\n - choose:\n - conditions:\n - condition: state\n entity_id: input_boolean.lumi_double_switch_1\n state: 'off'\n - condition: state\n entity_id: binary_sensor.day\n state: 'off'\n sequence:\n - action: script.turn_on\n target:\n entity_id: script.lumi_all_lights_on\n data:\n variables:\n bri_t: 85\n time_t: '{{ (states(''input_number.just_home_light_timer'') | float(2)\n * 60.0) | int(60) }}'\n - action: automation.turn_off\n data:\n entity_id:\n - automation.just_home",
|
|
"config": [
|
|
{
|
|
"name": "living motion sensor",
|
|
"room": "living_room",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.living_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "day sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.day",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living TV",
|
|
"room": "living_room",
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.livingtv",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "hall motion sensor",
|
|
"room": "hall",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.hall_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "home motion boolean",
|
|
"room": null,
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.home_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "just home light timer input number",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.just_home_light_timer",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "lumi double switch 1 boolean",
|
|
"room": null,
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.lumi_double_switch_1",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "door sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.door",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Just Home",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.just_home",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Lumi All Lights On",
|
|
"room": null,
|
|
"type": "script",
|
|
"id": {
|
|
"entity_id": "script.lumi_all_lights_on",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Radio On",
|
|
"room": null,
|
|
"type": "script",
|
|
"id": {
|
|
"entity_id": "script.radio_on",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "living_tv",
|
|
"automation": "- alias: living_tv\n id: living_tv\n triggers:\n - trigger: state\n entity_id: device_tracker.livingtv\n to: home\n for:\n seconds: 45\n actions:\n - action: notify.gmail\n data:\n message: living near trigger\n title: hass\n - action: automation.turn_off\n data:\n entity_id: automation.living_tv",
|
|
"config": [
|
|
{
|
|
"name": "living TV device tracker",
|
|
"room": "living_room",
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.livingtv",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Living TV",
|
|
"room": "Living Room",
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.living_tv",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "reload_homeconect",
|
|
"automation": "- alias: reload_homeconect\n id: reload_homeconect\n triggers:\n - trigger: state\n entity_id:\n - device_tracker.washer\n - device_tracker.dryer\n - device_tracker.dishwasher\n to: home\n for:\n seconds: 15\n actions:\n - action: button.press\n data:\n entity_id: button.home_connect_refresh",
|
|
"config": [
|
|
{
|
|
"name": "washer device tracker",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.washer",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "dryer device tracker",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.dryer",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "dishwasher device tracker",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.dishwasher",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "home connect refresh button",
|
|
"room": null,
|
|
"type": "button",
|
|
"id": {
|
|
"entity_id": "button.home_connect_refresh",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "auto_lock",
|
|
"automation": "- alias: auto_lock\n id: auto_lock\n trace:\n stored_traces: 20\n triggers:\n - trigger: state\n entity_id: binary_sensor.door\n from: 'on'\n to: 'off'\n id: lock_on_door\n for:\n seconds: 30\n - trigger: state\n entity_id: lock.building\n to: locked\n for:\n minutes: 1\n id: lock_on_building\n - trigger: zone\n entity_id: device_tracker.root\n zone: zone.home\n event: enter\n id: lock_off\n - trigger: zone\n entity_id: device_tracker.root\n zone: zone.home\n event: leave\n id: lock_on\n - trigger: state\n entity_id: input_boolean.in_bed_dummy_switch\n to: 'on'\n for:\n minutes: 1\n id: lock_on\n - trigger: mqtt\n topic: nuki/opener/trigger\n payload: button\n id: lock_off_building\n conditions:\n - condition: template\n value_template: \"{{\\n trigger.from_state != None\\n }}\"\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - lock_on_door\n - condition: state\n entity_id: lock.door\n state: unlocked\n - condition: state\n entity_id: input_boolean.auto_lock\n state: 'on'\n sequence:\n - action: lock.lock\n target:\n entity_id: lock.door\n - conditions:\n - condition: or\n conditions:\n - condition: trigger\n id:\n - lock_on\n - condition: and\n conditions:\n - condition: trigger\n id:\n - lock_on_building\n - condition: state\n entity_id:\n - device_tracker.root\n state: not_home\n - condition: state\n entity_id: lock.door\n state: unlocked\n sequence:\n - if:\n - condition: state\n entity_id: binary_sensor.door\n state: 'off'\n then:\n - action: lock.lock\n target:\n entity_id: lock.door\n else:\n - action: notify.gmail\n data:\n title: front door\n message: \"{%-\\n set door = {\\n 'on': 'open',\\n 'off': 'close'\\n\\\n \\ }\\n -%}\\nis {{ door[states('binary_sensor.door')]}}\"\n - choose:\n - conditions:\n - condition: trigger\n id:\n - lock_on\n - condition: state\n entity_id: lock.building\n state: unlocked\n sequence:\n - action: lock.lock\n target:\n entity_id: lock.building\n - conditions:\n - condition: trigger\n id:\n - lock_off\n - condition: state\n entity_id: lock.building\n state: locked\n sequence:\n - action: script.turn_on\n target:\n entity_id: script.doors_full_unlock\n - choose:\n - conditions:\n - condition: trigger\n id:\n - lock_off_building\n - condition: state\n entity_id: lock.building\n state: unlocked\n - condition: state\n entity_id: lock.door\n state: locked\n sequence:\n - action: lock.unlock\n target:\n entity_id: lock.door",
|
|
"config": [
|
|
{
|
|
"name": "in bed dummy switch",
|
|
"room": "bedroom",
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.in_bed_dummy_switch",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "device tracker root",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.root",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "door sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.door",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "door lock",
|
|
"room": null,
|
|
"type": "lock",
|
|
"id": {
|
|
"entity_id": "lock.door",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "auto lock boolean",
|
|
"room": null,
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.auto_lock",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "building lock",
|
|
"room": null,
|
|
"type": "lock",
|
|
"id": {
|
|
"entity_id": "lock.building",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Doors Full Unlock",
|
|
"room": null,
|
|
"type": "script",
|
|
"id": {
|
|
"entity_id": "script.doors_full_unlock",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "ring_notify",
|
|
"automation": "- alias: ring_notify\n id: ring_notify\n triggers:\n - trigger: state\n entity_id: binary_sensor.building_ring\n to: 'on'\n mode: single\n max_exceeded: silent\n actions:\n - action: script.all_notify\n data:\n icon_notify: door\n tit: ring\n msg: door\n - delay:\n seconds: 60",
|
|
"config": [
|
|
{
|
|
"name": "building ring sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.building_ring",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "shutter_wind",
|
|
"automation": "- alias: shutter_wind\n id: shutter_wind\n triggers:\n - trigger: numeric_state\n entity_id: sensor.shutters_vibration\n above: 2.5\n id: notify\n - trigger: numeric_state\n entity_id: sensor.shutters_vibration\n above: 0\n id: detected\n - trigger: numeric_state\n entity_id: sensor.shutters_vibration\n above: 5.5\n id: move_first\n - trigger: numeric_state\n entity_id: sensor.shutters_vibration\n above: 10.5\n id: move_second\n - trigger: numeric_state\n entity_id: sensor.wind_vibration\n above: 15.0\n id: move_tilt\n - trigger: template\n value_template: \"{{\\n (\\n float(state_attr('sensor.shutters_open_speed_wind',\\\n \\ 'speed_open'), 5) >\\n float(states('sensor.local_wind_speed'), 6)\\n\\\n \\ ) and\\n (\\n float(states('sensor.local_wind_speed'), 5) >\\n\\\n \\ float(states('sensor.local_forecast_wind_speed'), 6)\\n ) and\\n\\\n \\ (\\n float(state_attr('sensor.shutters_open_speed_wind', 'forecast_speed_open'),\\\n \\ 5) >\\n float(states('sensor.local_forecast_wind_speed'), 6)\\n \\\n \\ ) and\\n (\\n float(states('sensor.wind_vibration'), 6) < 3.0\\n\\\n \\ )\\n }}\"\n id: move_restore\n - trigger: event\n event_type: up_down_my\n event_data:\n data: start\n id: start\n conditions:\n - condition: template\n value_template: \"{{\\n ( trigger.from_state is defined and\\n trigger.from_state.state\\\n \\ not in ['unknown', 'unavailable'] and\\n trigger.to_state.state not\\\n \\ in ['unknown', 'unavailable']\\n ) or\\n trigger.id == 'start'\\n \\\n \\ }}\"\n mode: queued\n trace:\n stored_traces: 30\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - notify\n - condition: numeric_state\n entity_id: cover.bed\n attribute: current_tilt_position\n below: 80\n sequence:\n - action: script.all_notify\n data:\n icon_notify: window-shutter-alert\n tit: shutters\n msg: detected vibration\n - event: shutter_event\n event_data:\n wind: notify\n - conditions:\n - condition: trigger\n id:\n - detected\n - condition: numeric_state\n entity_id: cover.bed\n attribute: current_tilt_position\n above: 80\n - condition: numeric_state\n entity_id: cover.bed\n attribute: current_position\n above: 30\n sequence:\n - action: script.all_notify\n data:\n icon_notify: window-shutter-alert\n tit: shutters\n msg: detected vibration while opned\n - event: shutter_event\n event_data:\n wind: detected\n - choose:\n - conditions:\n - condition: trigger\n id:\n - move_second\n - condition: numeric_state\n entity_id: sensor.temp_out\n value_template: '{{ float( float(state.state, states(''sensor.local_temperature'')),\n -1) }}'\n above: 0.0\n - condition: numeric_state\n entity_id: cover.bed\n attribute: current_position\n below: 30\n sequence:\n - action: cover.open_cover\n data:\n entity_id: cover.shutters\n - action: script.all_notify\n data:\n icon_notify: window-shutter-alert\n tit: shutter\n msg: open\n - event: shutter_event\n event_data:\n wind: open\n - conditions:\n - condition: trigger\n id:\n - move_first\n - condition: numeric_state\n entity_id: sensor.temp_out\n value_template: '{{ float( float(state.state, states(''sensor.local_temperature'')),\n -1) }}'\n above: 0.0\n sequence:\n - if:\n - condition: numeric_state\n entity_id: cover.bed\n attribute: current_tilt_position\n below: 80\n then:\n - action: cover.open_cover_tilt\n data:\n entity_id: cover.shutters\n - action: script.all_notify\n data:\n icon_notify: window-shutter-alert\n tit: shutter\n msg: tilt open\n - event: shutter_event\n event_data:\n wind: tilt_open_shutters\n else:\n - action: cover.open_cover\n data:\n entity_id: cover.shutters\n - action: script.all_notify\n data:\n icon_notify: window-shutter-alert\n tit: shutter\n msg: open\n - event: shutter_event\n event_data:\n wind: open\n - conditions:\n - condition: trigger\n id:\n - move_restore\n - condition: numeric_state\n entity_id: sensor.temp_out\n value_template: '{{ float( float(state.state, states(''sensor.local_temperature'')),\n -1) }}'\n above: 0.0\n - condition: numeric_state\n entity_id: sensor.wind_vibration\n below: 3.0\n sequence:\n - choose:\n - conditions:\n - condition: state\n entity_id: sensor.shutters_open_speed_wind\n attribute: state_shutters\n state:\n - open\n sequence:\n - if:\n - condition: template\n value_template: \"{{\\n states.scene.shutter_restore_pre.state is defined\\\n \\ and\\n states.scene.shutter_restore_post.state is defined\\n\\\n \\ }}\"\n then:\n - action: scene.turn_on\n data:\n entity_id: scene.shutter_restore_pre\n - delay:\n milliseconds: 750\n - wait_template: \"{{\\n states('cover.shutters') not in ['closing',\\\n \\ 'openopening']\\n }}\"\n timeout:\n seconds: 120\n continue_on_timeout: true\n - action: scene.turn_on\n data:\n entity_id: scene.shutter_restore_post\n - action: script.all_notify\n data:\n icon_notify: window-shutter-alert\n tit: shutter\n msg: restore\n else:\n - action: script.turn_on\n entity_id:\n - script.shutters_position_1\n - action: script.all_notify\n data:\n icon_notify: window-shutter-alert\n tit: shutter\n msg: pos 1\n - conditions:\n - condition: state\n entity_id: sensor.shutters_open_speed_wind\n attribute: state_shutters\n state:\n - tilt_open_wind\n - tilt_open_shutters\n sequence:\n - action: cover.set_cover_tilt_position\n data:\n entity_id: cover.shutters\n tilt_position: \"{{\\n states('input_number.shutters_tilt_position_1')\\\n \\ | int(20)\\n }}\"\n - action: script.all_notify\n data:\n icon_notify: window-shutter-alert\n tit: shutter\n msg: pos tilt\n - event: shutter_event\n event_data:\n wind: close\n - if:\n - condition: template\n value_template: \"{{\\n states.scene.shutter_restore_pre.state is defined\\\n \\ and\\n states.scene.shutter_restore_post.state\\n }}\"\n then:\n - action: scene.delete\n data:\n entity_id:\n - scene.shutter_restore_pre\n - scene.shutter_restore_post\n - conditions:\n - condition: trigger\n id:\n - move_tilt\n - condition: state\n entity_id: input_boolean.shutter_wind_vibration_en\n state: 'on'\n - condition: numeric_state\n entity_id: sensor.temp_out\n value_template: '{{ float( float(state.state, states(''sensor.local_temperature'')),\n -1) }}'\n above: 0.0\n - condition: state\n entity_id: sensor.shutters_open_speed_wind\n attribute: state_shutters\n state:\n - close\n sequence:\n - action: cover.open_cover_tilt\n data:\n entity_id: cover.shutters\n - action: script.all_notify\n data:\n icon_notify: window-shutter-alert\n tit: shutter\n msg: tilt open\n - event: shutter_event\n event_data:\n wind: tilt_open_wind\n - conditions:\n - condition: trigger\n id:\n - move_second\n - move_first\n - move_restore\n - condition: numeric_state\n entity_id: sensor.temp_out\n value_template: '{{ float( float(state.state, states(''sensor.local_temperature'')),\n -1) }}'\n below: 0.0\n sequence:\n - action: script.all_notify\n data:\n icon_notify: window-shutter-alert\n tit: shutters\n data_template:\n msg: temp low {{ trigger.id }}\n - choose:\n - conditions:\n - condition: trigger\n id:\n - notify\n - condition: numeric_state\n entity_id: cover.bed\n attribute: current_tilt_position\n below: 80\n - condition: numeric_state\n entity_id: cover.bed\n attribute: current_position\n below: 30\n sequence:\n - action: scene.create\n data:\n scene_id: shutter_restore_post\n snapshot_entities:\n - cover.living_1\n - cover.living_2\n - cover.bed\n - cover.office\n - action: scene.create\n data:\n scene_id: shutter_restore_pre\n entities:\n cover.living_1:\n current_position: '{{ int(state_attr(''cover.living_1'', ''current_position''))\n }}'\n current_tilt_position: 100\n state: open\n cover.living_2:\n current_position: '{{ int(state_attr(''cover.living_2'', ''current_position''))\n }}'\n current_tilt_position: 100\n state: open\n cover.bed:\n current_position: '{{ int(state_attr(''cover.bed'', ''current_position''))\n }}'\n current_tilt_position: 100\n state: open\n cover.office:\n current_position: '{{ int(state_attr(''cover.office'', ''current_position''))\n }}'\n current_tilt_position: 100\n state: open\n - action: script.all_notify\n data:\n icon_notify: window-shutter-alert\n tit: shutter\n msg: store position\n - conditions:\n - condition: trigger\n id:\n - start\n - condition: numeric_state\n entity_id: sensor.temp_out\n value_template: '{{ float( float(state.state, states(''sensor.local_temperature'')),\n -1) }}'\n above: 0.0\n - condition: numeric_state\n entity_id: cover.bed\n attribute: current_tilt_position\n above: 80\n - condition: numeric_state\n entity_id: cover.bed\n attribute: current_position\n above: 30\n - condition: template\n value_template: \"{{\\n (\\n float(state_attr('sensor.shutters_open_speed_wind',\\\n \\ 'speed_open'), 5) >\\n float(states('sensor.local_wind_speed'),\\\n \\ 6)\\n ) and\\n (\\n float(states('sensor.local_wind_speed'),\\\n \\ 5) >\\n float(states('sensor.local_forecast_wind_speed'), 6)\\n\\\n \\ ) and\\n (\\n float(state_attr('sensor.shutters_open_speed_wind',\\\n \\ 'forecast_speed_open'), 5) >\\n float(states('sensor.local_forecast_wind_speed'),\\\n \\ 6)\\n )\\n }}\"\n - condition: numeric_state\n entity_id: sensor.shutters_vibration\n below: 2.5\n - condition: numeric_state\n entity_id: sensor.wind_vibration\n below: 3.0\n - condition: state\n entity_id: sensor.shutters_open_speed_wind\n attribute: state_shutters\n state:\n - open\n - tilt_open_wind\n - tilt_open_shutters\n sequence:\n - action: script.turn_on\n entity_id:\n - script.shutters_position_1\n - action: script.all_notify\n data:\n icon_notify: window-shutter-alert\n tit: shutters\n data_template:\n msg: move to pos 1 wind {{ states('sensor.local_wind_speed') }}\n - event: shutter_event\n event_data:\n wind: close",
|
|
"config": [
|
|
{
|
|
"name": "temperature outside sensor",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.temp_out",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "shutters vibration sensor",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.shutters_vibration",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "wind vibration sensor",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.wind_vibration",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "shutters open speed wind sensor",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.shutters_open_speed_wind",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "local wind speed sensor",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.local_wind_speed",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "local forecast wind speed sensor",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.local_forecast_wind_speed",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "local temperature sensor",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.local_temperature",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "shutter wind vibration enable boolean",
|
|
"room": null,
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.shutter_wind_vibration_en",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "shutters tilt position 1 input number",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.shutters_tilt_position_1",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed cover",
|
|
"room": "bedroom",
|
|
"type": "cover",
|
|
"id": {
|
|
"entity_id": "cover.bed",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living 1 cover",
|
|
"room": "living_room",
|
|
"type": "cover",
|
|
"id": {
|
|
"entity_id": "cover.living_1",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living 2 cover",
|
|
"room": "living_room",
|
|
"type": "cover",
|
|
"id": {
|
|
"entity_id": "cover.living_2",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office cover",
|
|
"room": "office",
|
|
"type": "cover",
|
|
"id": {
|
|
"entity_id": "cover.office",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "shutters cover",
|
|
"room": null,
|
|
"type": "cover",
|
|
"id": {
|
|
"entity_id": "cover.shutters",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Shutter Restore Post",
|
|
"room": null,
|
|
"type": "scene",
|
|
"id": {
|
|
"entity_id": "scene.shutter_restore_post",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Shutter Restore Pre",
|
|
"room": null,
|
|
"type": "scene",
|
|
"id": {
|
|
"entity_id": "scene.shutter_restore_pre",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Shutters Position 1",
|
|
"room": null,
|
|
"type": "script",
|
|
"id": {
|
|
"entity_id": "script.shutters_position_1",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "shutter_position_ctrl",
|
|
"automation": "- alias: shutter_position_ctrl\n id: shutter_position_ctrl\n triggers:\n - trigger: numeric_state\n entity_id:\n - cover.living_2\n - cover.office\n attribute: current_position\n above: 30\n id: open\n - trigger: numeric_state\n entity_id:\n - cover.living_2\n - cover.office\n attribute: current_position\n below: 30\n id: close\n conditions:\n - condition: template\n value_template: \"{{\\n trigger.from_state.state not in ['unknown', 'unavailable']\\\n \\ and\\n trigger.from_state.attributes.current_position != 50 and\\n \\\n \\ trigger.to_state.attributes.current_position != 50\\n }}\"\n mode: queued\n actions:\n - variables:\n _map: \"{%-\\n set _map = {\\n 'cover.office': 'input_boolean.shutter_position_office',\\n\\\n \\ 'cover.living_2': 'input_boolean.shutter_position_living_2',\\n \\\n \\ }\\n -%}\\n{{ _map }}\"\n - choose:\n - conditions:\n - condition: trigger\n id:\n - open\n - condition: state\n entity_id:\n - sensor.shutters_open_speed_wind\n attribute: state_shutters\n state:\n - close\n - condition: template\n value_template: '{{ is_state(_map[trigger.entity_id], ''on'') }}'\n sequence:\n - action: input_boolean.turn_off\n data:\n entity_id: '{{ _map[trigger.entity_id] }}'\n - choose:\n - conditions:\n - condition: trigger\n id:\n - close\n - condition: state\n entity_id:\n - sensor.shutters_open_speed_wind\n attribute: state_shutters\n state:\n - close\n - condition: template\n value_template: '{{ is_state(_map[trigger.entity_id], ''off'') }}'\n sequence:\n - action: input_boolean.turn_on\n data:\n entity_id: '{{ _map[trigger.entity_id] }}'",
|
|
"config": [
|
|
{
|
|
"name": "shutters open speed wind sensor",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.shutters_open_speed_wind",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living 2 cover",
|
|
"room": "living_room",
|
|
"type": "cover",
|
|
"id": {
|
|
"entity_id": "cover.living_2",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office cover",
|
|
"room": "office",
|
|
"type": "cover",
|
|
"id": {
|
|
"entity_id": "cover.office",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "shutter position office boolean",
|
|
"room": "office",
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.shutter_position_office",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "shutter position living 2 boolean",
|
|
"room": "living_room",
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.shutter_position_living_2",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "track_merge",
|
|
"automation": "- alias: track_merge\n id: track_merge\n initial_state: false\n triggers:\n - trigger: state\n entity_id: device_tracker.ffeeddccbbaa\n - trigger: state\n entity_id: device_tracker.google_maps_107209225675467950565\n actions:\n - action: python_script.device_tracker_merge\n data_template:\n device_name: root\n master_device: device_tracker.ffeeddccbbaa\n slave_device: device_tracker.google_maps_107209225675467950565\n trigger_id: '{{trigger.entity_id}}'\n time: '{{ states(''input_number.tracker_delay'') | float(0) * 60 }}'\n force_update: '{{ states(''input_number.tracker_force_update'') | float(0) *\n 60 }}'\n accuracy: '{{ states(''input_number.tracker_accuracy'') | float(0) * 1000 }}'\n distance: '{{ distance(states.device_tracker.ffeeddccbbaa, states.device_tracker.google_maps_107209225675467950565)\n }}'",
|
|
"config": [
|
|
{
|
|
"name": "ffeeddccbbaa device tracker",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.ffeeddccbbaa",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "google maps device tracker",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.google_maps_107209225675467950565",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "tracker delay input number",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.tracker_delay",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "tracker force update input number",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.tracker_force_update",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "tracker accuracy input number",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.tracker_accuracy",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "track_merge_startup",
|
|
"automation": "- alias: track_merge_startup\n id: track_merge_startup\n triggers:\n - trigger: homeassistant\n event: start\n actions:\n - action: python_script.device_tracker_merge\n data_template:\n device_name: root\n master_device: device_tracker.google_maps_107209225675467950565\n slave_device: device_tracker.google_maps_107209225675467950565\n trigger_id: device_tracker.google_maps_107209225675467950565\n time: '{{ states(''input_number.tracker_delay'') | float(0) * 60 }}'\n force_update: '{{ states(''input_number.tracker_force_update'') | float(0) *\n 60 }}'\n accuracy: '{{ states(''input_number.tracker_accuracy'') | float(0) * 1000 }}'\n distance: '{{ distance(states.device_tracker.google_maps_107209225675467950565,\n states.device_tracker.google_maps_107209225675467950565) }}'\n - delay:\n seconds: 5\n - action: automation.turn_on\n entity_id: automation.track_merge",
|
|
"config": [
|
|
{
|
|
"name": "google maps device tracker",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.google_maps_107209225675467950565",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "tracker delay input number",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.tracker_delay",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "tracker force update input number",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.tracker_force_update",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "tracker accuracy input number",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.tracker_accuracy",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Track Merge",
|
|
"room": null,
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.track_merge",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "auto_clean",
|
|
"automation": "- alias: auto_clean\n id: auto_clean\n triggers:\n - trigger: time\n at: 08:00:00\n id: time_check\n - trigger: state\n entity_id: device_tracker.root\n from: home\n to: not_home\n for:\n minutes: 5\n id: clean_notify\n - trigger: state\n entity_id: device_tracker.root\n from: home\n to: not_home\n for:\n minutes: 15\n id: clean_run\n conditions:\n - condition: time\n weekday:\n - wed\n - sat\n - condition: template\n value_template: \"{%- if state_attr('script.all_clean', 'last_triggered') -%}\\n\\\n \\ {{\\n now() - state_attr('script.all_clean', 'last_triggered') > timedelta(hours=24)\\n\\\n \\ }}\\n{%- else -%}\\n true\\n{%- endif -%}\"\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - time_check\n - condition: state\n entity_id: device_tracker.root\n state: home\n sequence:\n - action: notify.gmail\n data:\n title: rockrobo\n message: check wash door\n - if:\n - condition: state\n entity_id: binary_sensor.clean_vacuum\n state: 'on'\n then:\n - delay:\n seconds: 5\n - action: notify.gmail\n data:\n title: rockrobo\n message: bin full not clean\n - conditions:\n - condition: trigger\n id:\n - clean_notify\n - condition: state\n entity_id: binary_sensor.wash_door\n state: 'on'\n sequence:\n - action: notify.gmail\n data:\n title: rockrobo\n message: clean in 10 min\n - conditions:\n - condition: trigger\n id:\n - clean_run\n - condition: state\n entity_id: binary_sensor.clean_vacuum\n state: 'off'\n - condition: state\n entity_id: binary_sensor.wash_door\n state: 'on'\n sequence:\n - action: script.turn_on\n data:\n entity_id:\n - script.all_clean\n default:\n - action: logbook.log\n data:\n name: auto_clean\n message: 'check automation using default - Id: {{trigger.id}}'",
|
|
"config": [
|
|
{
|
|
"name": "device tracker root",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.root",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "clean vacuum sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.clean_vacuum",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "wash door sensor",
|
|
"room": "wash",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.wash_door",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "All Clean",
|
|
"room": null,
|
|
"type": "script",
|
|
"id": {
|
|
"entity_id": "script.all_clean",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "reset_bin_counter",
|
|
"automation": "- alias: reset_bin_counter\n id: reset_bin_counter\n triggers:\n - trigger: state\n entity_id: binary_sensor.rockrobo_dustbin\n from: 'off'\n to: 'on'\n mode: restart\n actions:\n - action: counter.reset\n entity_id: counter.clean_counter",
|
|
"config": [
|
|
{
|
|
"name": "rockrobo dustbin sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.rockrobo_dustbin",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "clean counter",
|
|
"room": null,
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.clean_counter",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "ligth_village_1",
|
|
"automation": "- alias: ligth_village_1\n id: ligth_village_1\n triggers:\n - trigger: state\n entity_id: binary_sensor.motion_village_1\n to: 'on'\n id: light_on\n - trigger: state\n entity_id: binary_sensor.motion_village_1\n to: 'off'\n for:\n seconds: 90\n id: light_off\n - trigger: state\n entity_id: light.village_1\n to: 'on'\n for:\n minutes: 5\n seconds: 30\n id: light_off\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n - condition: state\n entity_id: light.village_1\n state: 'off'\n - condition: sun\n after: sunset\n after_offset: -00:20:00\n - condition: time\n before: '23:15:00'\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.village_1\n data:\n brightness_pct: 100\n - delay:\n milliseconds: 250\n - action: light.turn_on\n target:\n entity_id: light.village_1\n data:\n color_temp_kelvin: 3300\n - conditions:\n - condition: trigger\n id:\n - light_on\n - condition: state\n entity_id: light.village_1\n state: 'off'\n - condition: or\n conditions:\n - condition: sun\n before: sunrise\n before_offset: -00:20:00\n - condition: time\n after: '23:15:00'\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.village_1\n data:\n brightness_pct: 10\n - delay:\n milliseconds: 250\n - action: light.turn_on\n target:\n entity_id: light.village_1\n data:\n color_temp_kelvin: 2500\n - conditions:\n - condition: trigger\n id:\n - light_off\n - condition: and\n conditions:\n - condition: state\n entity_id: light.village_1\n state: 'on'\n - condition: state\n entity_id: binary_sensor.motion_village_1\n state: 'off'\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.village_1\n data:\n brightness_pct: 10\n - delay:\n milliseconds: 250\n - action: light.turn_off\n target:\n entity_id: light.village_1",
|
|
"config": [
|
|
{
|
|
"name": "village 1 light",
|
|
"room": "village",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.village_1",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "motion village 1 sensor",
|
|
"room": "village",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.motion_village_1",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "ligth_top_1",
|
|
"automation": "- alias: ligth_top_1\n id: ligth_top_1\n triggers:\n - trigger: state\n entity_id: binary_sensor.motion_village_top_1\n to: 'on'\n id: light_on\n - trigger: state\n entity_id: binary_sensor.motion_village_top_1\n to: 'off'\n for:\n seconds: 90\n id: light_off\n - trigger: state\n entity_id: light.village_top_1\n to: 'on'\n for:\n minutes: 5\n seconds: 30\n id: light_off\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n - condition: state\n entity_id: light.village_top_1\n state: 'off'\n - condition: sun\n after: sunset\n after_offset: -00:20:00\n - condition: time\n before: '23:15:00'\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.village_top_1\n data:\n brightness_pct: 100\n - delay:\n milliseconds: 250\n - action: light.turn_on\n target:\n entity_id: light.village_top_1\n data:\n color_temp_kelvin: 3300\n - conditions:\n - condition: trigger\n id:\n - light_on\n - condition: state\n entity_id: light.village_top_1\n state: 'off'\n - condition: or\n conditions:\n - condition: sun\n before: sunrise\n before_offset: -00:20:00\n - condition: time\n after: '23:15:00'\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.village_top_1\n data:\n brightness_pct: 10\n - delay:\n milliseconds: 250\n - action: light.turn_on\n target:\n entity_id: light.village_top_1\n data:\n color_temp_kelvin: 2500\n - conditions:\n - condition: trigger\n id:\n - light_off\n - condition: and\n conditions:\n - condition: state\n entity_id: light.village_top_1\n state: 'on'\n - condition: state\n entity_id: binary_sensor.motion_village_top_1\n state: 'off'\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.village_top_1\n data:\n brightness_pct: 10\n - delay:\n milliseconds: 250\n - action: light.turn_off\n target:\n entity_id: light.village_top_1",
|
|
"config": [
|
|
{
|
|
"name": "village top 1 light",
|
|
"room": "village",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.village_top_1",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "motion village top 1 sensor",
|
|
"room": "village",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.motion_village_top_1",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "ligth_village_out",
|
|
"automation": "- alias: ligth_village_out\n id: ligth_village_out\n triggers:\n - trigger: sun\n event: sunset\n offset: +00:00:00\n id: sunset_on\n - trigger: sun\n event: sunset\n offset: +01:30:00\n id: light_off\n - trigger: sun\n event: sunrise\n offset: +00:10:00\n id: light_off\n - trigger: zone\n entity_id: device_tracker.root\n zone: zone.village\n event: enter\n id: presence_on\n - trigger: zone\n entity_id: device_tracker.root\n zone: zone.village\n event: leave\n id: presence_off\n mode: restart\n actions:\n - variables:\n brightness: '{{ range(45, 65, 2) | random }}'\n color_temp: '{{ range(300, 350, 10) | random }}'\n - choose:\n - conditions:\n - condition: or\n conditions:\n - condition: and\n conditions:\n - condition: trigger\n id:\n - sunset_on\n - condition: state\n entity_id: binary_sensor.village_presence\n state: 'on'\n - condition: and\n conditions:\n - condition: trigger\n id:\n - presence_on\n - condition: or\n conditions:\n - condition: sun\n before: sunrise\n before_offset: +00:30:00\n - condition: sun\n after: sunset\n after_offset: -00:30:00\n - condition: state\n entity_id: light.village_out\n state: 'off'\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.village_out\n data:\n brightness_pct: '{{ brightness }}'\n - delay:\n milliseconds: 250\n - action: light.turn_on\n target:\n entity_id: light.village_out\n data:\n color_temp_kelvin: '{{ color_temp }}'\n - conditions:\n - condition: trigger\n id:\n - light_off\n - presence_off\n - condition: state\n entity_id: light.village_out\n state: 'on'\n sequence:\n - action: light.turn_off\n target:\n entity_id: light.village_out",
|
|
"config": [
|
|
{
|
|
"name": "device tracker root",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.root",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "village out light",
|
|
"room": "village",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.village_out",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "village presence sensor",
|
|
"room": "village",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.village_presence",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "ligth_garage",
|
|
"automation": "- alias: ligth_garage\n id: ligth_garage\n triggers:\n - trigger: state\n entity_id: binary_sensor.motion_village_garage\n to: 'on'\n id: light_on\n - trigger: zone\n entity_id: device_tracker.root\n zone: zone.village\n event: enter\n id: light_on\n - trigger: state\n entity_id: binary_sensor.motion_village_garage\n to: 'off'\n for:\n seconds: 90\n id: light_off\n - trigger: sun\n event: sunrise\n offset: +00:10:00\n id: light_off\n - trigger: zone\n entity_id: device_tracker.root\n zone: zone.village\n event: leave\n id: presence_off\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n - condition: state\n entity_id: light.village_garage\n state: 'off'\n - condition: or\n conditions:\n - condition: sun\n before: sunrise\n before_offset: +00:30:00\n - condition: sun\n after: sunset\n after_offset: -00:30:00\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.village_garage\n - conditions:\n - condition: trigger\n id:\n - light_off\n - presence_off\n - condition: and\n conditions:\n - condition: state\n entity_id: light.village_garage\n state: 'on'\n - condition: state\n entity_id: binary_sensor.motion_village_garage\n state: 'off'\n sequence:\n - action: light.turn_off\n target:\n entity_id: light.village_garage",
|
|
"config": [
|
|
{
|
|
"name": "device tracker root",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.root",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "village garage light",
|
|
"room": "village",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.village_garage",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "motion village garage sensor",
|
|
"room": "village",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.motion_village_garage",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "waterheater_village",
|
|
"automation": "- alias: waterheater_village\n id: waterheater_village\n triggers:\n - trigger: state\n entity_id: binary_sensor.village_presence\n to: 'on'\n id: trigger_on\n - trigger: state\n entity_id: binary_sensor.village_presence\n to: 'off'\n for:\n minutes: 15\n id: trigger_off\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - trigger_on\n - condition: state\n entity_id: switch.waterheater_village_schedule\n state: 'off'\n sequence:\n - action: switch.turn_on\n target:\n entity_id: switch.waterheater_village_schedule\n - event: waterheater\n event_data:\n village: schedule_on\n - conditions:\n - condition: trigger\n id:\n - trigger_off\n - condition: state\n entity_id: switch.waterheater_village_schedule\n state: 'on'\n sequence:\n - action: switch.turn_off\n target:\n entity_id: switch.waterheater_village_schedule\n - event: waterheater\n event_data:\n village: schedule_off",
|
|
"config": [
|
|
{
|
|
"name": "village presence sensor",
|
|
"room": "village",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.village_presence",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "waterheater village schedule switch",
|
|
"room": "village",
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.waterheater_village_schedule",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "waterheater village switch",
|
|
"room": "village",
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.waterheater_village",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "waterheater_village_reheat",
|
|
"automation": "- alias: waterheater_village_reheat\n id: waterheater_village_reheat\n triggers:\n - trigger: numeric_state\n entity_id: sensor.waterheater_village\n below: 19.5\n id: trigger_on\n - trigger: numeric_state\n entity_id: sensor.waterheater_village\n above: 35.5\n id: trigger_off\n - trigger: event\n event_type: waterheater\n event_data:\n village: schedule_on\n id: check_on\n - trigger: event\n event_type: waterheater\n event_data:\n village: trigger_off\n id: check_off\n conditions:\n - condition: state\n entity_id: switch.waterheater_village_schedule\n state: 'on'\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - trigger_on\n - condition: time\n after: 08:00:00\n before: '19:30:00'\n - condition: state\n entity_id: switch.waterheater_village\n state: 'off'\n sequence:\n - action: switch.turn_on\n target:\n entity_id: switch.waterheater_village\n - conditions:\n - condition: trigger\n id:\n - trigger_off\n - condition: time\n after: 08:00:00\n - condition: state\n entity_id: switch.waterheater_village\n state: 'on'\n sequence:\n - action: switch.turn_off\n target:\n entity_id: switch.waterheater_village\n - choose:\n - conditions:\n - condition: trigger\n id:\n - check_on\n - condition: time\n after: '13:00:00'\n before: '19:30:00'\n - condition: numeric_state\n entity_id: sensor.waterheater_village\n below: 33\n - condition: state\n entity_id: switch.waterheater_village\n state: 'off'\n sequence:\n - action: switch.turn_on\n target:\n entity_id: switch.waterheater_village\n - conditions:\n - condition: trigger\n id:\n - check_off\n - condition: state\n entity_id: switch.waterheater_village\n state: 'on'\n sequence:\n - action: switch.turn_off\n target:\n entity_id: switch.waterheater_village",
|
|
"config": [
|
|
{
|
|
"name": "waterheater village schedule switch",
|
|
"room": "village",
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.waterheater_village_schedule",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "waterheater village sensor",
|
|
"room": "village",
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.waterheater_village",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "waterheater village switch",
|
|
"room": "village",
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.waterheater_village",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "village_remote_1",
|
|
"automation": "- alias: village_remote_1\n id: village_remote_1\n triggers:\n - trigger: mqtt\n topic: tele/zha-bridge-city/A79A/SENSOR\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: template\n value_template: \"{{\\n trigger.payload_json.ZbReceived[\\\"0x054B\\\"] is defined\\\n \\ and\\n trigger.payload_json.ZbReceived[\\\"0x054B\\\"].Power == 0\\n}}\"\n - condition: state\n entity_id: light.village_out\n state: 'off'\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.village_out\n data:\n brightness_pct: 95\n - action: light.turn_on\n target:\n entity_id: light.village_out\n data:\n color_temp_kelvin: 2850\n - conditions:\n - condition: template\n value_template: \"{{\\n trigger.payload_json.ZbReceived[\\\"0x054B\\\"] is defined\\\n \\ and\\n trigger.payload_json.ZbReceived[\\\"0x054B\\\"].Power == 0\\n}}\"\n - condition: state\n entity_id: light.village_out\n state: 'on'\n sequence:\n - action: light.turn_off\n target:\n entity_id: light.village_out",
|
|
"config": [
|
|
{
|
|
"name": "village out light",
|
|
"room": "village",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.village_out",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "lumi_switch_double_trigger_1",
|
|
"automation": "- alias: lumi_switch_double_trigger_1\n id: lumi_switch_double_trigger_1\n triggers:\n - trigger: mqtt\n topic: zigbee2mqtt/living-cube\n value_template: '{{ value_json.action | default(None) }}'\n payload: shake\n - trigger: mqtt\n topic: zigbee2mqtt/bed-button\n value_template: '{{ value_json.action | default(None) }}'\n payload: shake\n - trigger: event\n event_type: timer.finished\n event_data:\n entity_id: timer.lumi_double_switch_1_timer\n actions:\n - action: \"{%-\\n set scr = {\\n 'on': 'script.lumi_double_switch_off',\\n\\\n \\ 'off': 'script.lumi_double_switch_on'\\n }\\n -%}\\n{{ scr[states('input_boolean.lumi_double_switch_1')]\\\n \\ }}\\n\"",
|
|
"config": [
|
|
{
|
|
"name": "lumi double switch 1 boolean",
|
|
"room": null,
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.lumi_double_switch_1",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "lumi double switch 1 timer",
|
|
"room": null,
|
|
"type": "timer",
|
|
"id": {
|
|
"entity_id": "timer.lumi_double_switch_1_timer",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Lumi Double Switch On",
|
|
"room": null,
|
|
"type": "script",
|
|
"id": {
|
|
"entity_id": "script.lumi_double_switch_on",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "down_lumi_switch_double_trigger_1",
|
|
"automation": "- alias: down_lumi_switch_double_trigger_1\n id: down_lumi_switch_double_trigger_1\n triggers:\n - trigger: event\n event_type: up_down_my\n event_data:\n data: stop\n conditions:\n - condition: and\n conditions:\n - condition: state\n entity_id: input_boolean.lumi_double_switch_1\n state: 'on'\n actions:\n - action: script.lumi_double_switch_off",
|
|
"config": [
|
|
{
|
|
"name": "lumi double switch 1 boolean",
|
|
"room": null,
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.lumi_double_switch_1",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "office_switch",
|
|
"automation": "- alias: office_switch\n id: office_switch\n triggers:\n - trigger: mqtt\n topic: zigbee2mqtt/office-button\n value_template: '{{ value_json.action | default(None) }}'\n payload: single\n id: switch_low\n - trigger: mqtt\n topic: zigbee2mqtt/office-button\n value_template: '{{ value_json.action | default(None) }}'\n payload: double\n id: switch_high\n - trigger: mqtt\n topic: zigbee2mqtt/office-button\n value_template: '{{ value_json.action | default(None) }}'\n payload: long\n id: switch_off_hold\n - trigger: state\n entity_id: device_tracker.n0ll\n to: not_home\n for:\n seconds: 30\n id: switch_off_pc\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - switch_high\n - switch_low\n - condition: state\n entity_id: automation.office_light\n state: 'on'\n sequence:\n - action: automation.turn_off\n target:\n entity_id:\n - automation.office_light\n - choose:\n - conditions:\n - condition: trigger\n id:\n - switch_high\n - switch_low\n - condition: state\n entity_id: light.office_window\n state: 'on'\n sequence:\n - action: light.turn_off\n target:\n entity_id:\n - light.office_window\n - choose:\n - conditions:\n - condition: trigger\n id:\n - switch_high\n - switch_low\n sequence:\n - action: script.lights_on\n data:\n ctrl_light: light.office_desk\n ctrl_all: true\n brightness_pct: \"{%- set br = {\\n 'switch_low': 5,\\n 'switch_high':\\\n \\ 90,\\n }\\n -%}\\n{{ br[trigger.id] }}\"\n transition: 3\n color_temp: 4000\n - conditions:\n - condition: state\n entity_id: automation.office_light\n state: 'off'\n - condition: trigger\n id:\n - switch_off_pc\n - switch_off_hold\n sequence:\n - action: light.turn_on\n target:\n entity_id:\n - light.office\n data:\n effect: okay\n - action: automation.turn_on\n target:\n entity_id:\n - automation.office_light\n - delay:\n milliseconds: 750\n - event: lights_check\n event_data:\n light: turn_off\n - conditions:\n - condition: state\n entity_id: automation.office_light\n state: 'on'\n - condition: trigger\n id:\n - switch_off_hold\n sequence:\n - action: automation.turn_off\n target:\n entity_id:\n - automation.office_light\n - action: light.turn_on\n target:\n entity_id:\n - light.office\n data:\n effect: okay\n - delay:\n milliseconds: 550\n - action: light.turn_off\n target:\n entity_id:\n - light.bed\n - light.wash\n - light.kitchen\n - light.bath\n - delay:\n milliseconds: 550\n - action: light.turn_off\n target:\n entity_id:\n - light.kitchen_led\n - light.living\n - light.hall\n - action: light.turn_off\n target:\n entity_id:\n - light.office\n data:\n transition: 20\n - wait_for_trigger:\n - trigger: state\n entity_id:\n - light.office\n to: 'off'\n timeout:\n seconds: 30\n - delay:\n seconds: '{{ wait.remaining }}'\n - action: input_boolean.turn_on\n entity_id:\n - input_boolean.office_enter_dummy\n - action: automation.turn_on\n target:\n entity_id:\n - automation.office_light",
|
|
"config": [
|
|
{
|
|
"name": "bed light",
|
|
"room": "bedroom",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.bed",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "hall light",
|
|
"room": "hall",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.hall",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "kitchen LED light",
|
|
"room": "kitchen",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.kitchen_led",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "kitchen light",
|
|
"room": "kitchen",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.kitchen",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living light",
|
|
"room": "living_room",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.living",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "device tracker n0ll",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.n0ll",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office enter dummy boolean",
|
|
"room": "office",
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.office_enter_dummy",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office light",
|
|
"room": "office",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.office",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office desk light",
|
|
"room": "office",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.office_desk",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bath light",
|
|
"room": "bathroom",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.bath",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "office window light",
|
|
"room": "office",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.office_window",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "wash light",
|
|
"room": "wash",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.wash",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Office Light",
|
|
"room": "Office",
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.office_light",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "night_light_switch",
|
|
"automation": "- alias: night_light_switch\n id: night_light_switch\n triggers:\n - trigger: mqtt\n topic: zigbee2mqtt/bed-button\n value_template: '{{ value_json.action | default(None) }}'\n payload: single\n id: single\n - trigger: mqtt\n topic: zigbee2mqtt/bed-button\n value_template: '{{ value_json.action | default(None) }}'\n payload: double\n id: double\n mode: restart\n actions:\n - variables:\n cfg: '{% from ''tools.jinja'' import light_cfg %} {{ light_cfg(is_state(''binary_sensor.night_mode'',\n ''off'')) | from_json }}'\n - choose:\n - conditions:\n - condition: trigger\n id:\n - single\n sequence:\n - action: script.turn_on\n data:\n entity_id: \"{%-\\n set scr = {\\n 'on': 'script.lights_off',\\n \\\n \\ 'off': 'script.lights_on'\\n }\\n -%}\\n{{ scr[states('light.bed')]\\\n \\ }}\"\n variables:\n ctrl_light: light.bed\n brightness_pct: '{{ cfg.brightness }}'\n transition: '{{ cfg.transition }}'\n color_temp: '{{ cfg.temp }}'\n - conditions:\n - condition: trigger\n id:\n - double\n - condition: state\n entity_id:\n - automation.bed_light\n state: 'on'\n sequence:\n - action: automation.turn_off\n entity_id:\n - automation.bed_light\n - action: light.turn_off\n entity_id:\n - light.bed\n - conditions:\n - condition: trigger\n id:\n - double\n - condition: state\n entity_id:\n - automation.bed_light\n state: 'off'\n sequence:\n - action: automation.turn_on\n entity_id:\n - automation.bed_light\n - action: light.turn_on\n target:\n entity_id:\n - light.bed\n data:\n effect: okay",
|
|
"config": [
|
|
{
|
|
"name": "night mode sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.night_mode",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed light",
|
|
"room": "bedroom",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.bed",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Bed Light",
|
|
"room": "Bedroom",
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.bed_light",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "kitchen_switch",
|
|
"automation": "- alias: kitchen_switch\n id: kitchen_switch\n triggers:\n - trigger: mqtt\n topic: zigbee2mqtt/kitchen-button\n variables:\n action: '{{ trigger.payload_json.action | default(None) }}'\n conditions:\n - condition: template\n value_template: \"{{\\n action != None and\\n action != 'release'\\n }}\"\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: and\n conditions:\n - condition: template\n value_template: '{{ action in [''double'', ''single''] }}'\n - condition: state\n entity_id:\n - automation.kitchen_light\n - automation.kitchen_light_1\n state: 'on'\n sequence:\n - action: automation.turn_off\n data:\n entity_id:\n - automation.kitchen_light\n - automation.kitchen_light_1\n - choose:\n - conditions:\n - condition: and\n conditions:\n - condition: template\n value_template: '{{ action in [''double'', ''single''] }}'\n - condition: state\n entity_id:\n - automation.kitchen_light\n - automation.kitchen_light_1\n state: 'off'\n sequence:\n - variables:\n brightness_pct: \"{%- set br = {\\n 'single': 5,\\n 'double': 90,\\n \\\n \\ }\\n -%}\\n{{ br[action] }}\"\n color_temp: 4000\n transition: 1\n - action: light.turn_on\n target:\n entity_id:\n - light.kitchen_led\n data:\n brightness_pct: 20\n - delay:\n milliseconds: \"{{\\n states('input_number.ctrl_delay') | int (100)\\n \\\n \\ }}\"\n - action: light.turn_on\n target:\n entity_id:\n - light.kitchen_led\n data:\n brightness_pct: '{{ max(brightness_pct, 30) }}'\n - delay:\n milliseconds: \"{{\\n states('input_number.ctrl_delay') | int (100)\\n \\\n \\ }}\"\n - action: light.turn_on\n target:\n entity_id:\n - light.kitchen\n data:\n color_temp_kelvin: '{{ color_temp }}'\n brightness_pct: 1\n transition: 0\n - delay:\n milliseconds: \"{{\\n states('input_number.ctrl_delay') | int (100)\\n \\\n \\ }}\"\n - action: light.turn_on\n target:\n entity_id:\n - light.kitchen\n data:\n brightness_pct: '{{ brightness_pct }}'\n transition: '{{ transition }}'\n - conditions:\n - condition: template\n value_template: '{{ action == ''hold'' }}'\n sequence:\n - action: light.turn_on\n target:\n entity_id:\n - light.kitchen\n data:\n effect: okay\n - action: automation.turn_on\n data:\n entity_id:\n - automation.kitchen_light\n - automation.kitchen_light_1\n - delay:\n milliseconds: 750\n - event: lights_check\n event_data:\n light: turn_off",
|
|
"config": [
|
|
{
|
|
"name": "kitchen LED light",
|
|
"room": "kitchen",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.kitchen_led",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "control delay input number",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.ctrl_delay",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "kitchen light",
|
|
"room": "kitchen",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.kitchen",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Kitchen Light",
|
|
"room": "Kitchen",
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.kitchen_light",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Kitchen Light 1",
|
|
"room": "Kitchen",
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.kitchen_light_1",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "living_switch",
|
|
"automation": "- alias: living_switch\n id: living_switch\n triggers:\n - trigger: mqtt\n topic: zigbee2mqtt/living-cube\n variables:\n action: '{{ trigger.payload_json.action | default(None) }}'\n side: '{{ trigger.payload_json.side | default(-1) }}'\n action_angle: '{{ trigger.payload_json.action_angle | default(0) | abs }}'\n action_from_side: '{{ trigger.payload_json.action_from_side | default(-1) }}'\n action_side: '{{ trigger.payload_json.action_side | default(-1) }}'\n action_to_side: '{{ trigger.payload_json.action_to_side | default(-1) }}'\n conditions:\n - condition: template\n value_template: '{{ action != None }}'\n mode: restart\n actions:\n - variables:\n transition: 1\n - choose:\n - conditions:\n - condition: and\n conditions:\n - condition: state\n entity_id: automation.living_light\n state: 'on'\n - condition: template\n value_template: '{{ action == ''flip90'' }}'\n - condition: template\n value_template: '{{ action_from_side == 0 }}'\n - condition: template\n value_template: '{{ action_side == 1 }}'\n - condition: template\n value_template: '{{ action_to_side == 1 }}'\n sequence:\n - variables:\n brightness_pct: \"{%- if is_state('binary_sensor.night_mode', 'on') -%}\\n\\\n \\ 30\\n{%- elif is_state('media_player.livingtv', 'playing') -%}\\n 50\\n\\\n {%- else -%}\\n 90\\n{%- endif -%}\"\n color_temp: 4000\n - action: automation.turn_off\n data:\n entity_id:\n - automation.living_light\n - automation.kitchen_light\n - automation.kitchen_light_1\n - action: light.turn_on\n target:\n entity_id:\n - light.living\n data:\n color_temp_kelvin: '{{ color_temp }}'\n brightness_pct: 1\n transition: 0\n - delay:\n milliseconds: \"{{\\n states('input_number.ctrl_delay') | int (100)\\n \\\n \\ }}\"\n - action: light.turn_on\n target:\n entity_id:\n - light.living\n data:\n brightness_pct: '{{ brightness_pct }}'\n transition: '{{ transition }}'\n - delay:\n milliseconds: \"{{\\n states('input_number.ctrl_delay') | int (100)\\n \\\n \\ }}\"\n - action: light.turn_on\n target:\n entity_id:\n - light.kitchen_led\n data:\n brightness_pct: '{{ max(brightness_pct, 30) }}'\n - delay:\n milliseconds: \"{{\\n states('input_number.ctrl_delay') | int (100)\\n \\\n \\ }}\"\n - action: light.turn_on\n target:\n entity_id:\n - light.kitchen\n data:\n color_temp_kelvin: '{{ color_temp }}'\n brightness_pct: 1\n transition: 0\n - delay:\n milliseconds: \"{{\\n states('input_number.ctrl_delay') | int (100)\\n \\\n \\ }}\"\n - action: light.turn_on\n target:\n entity_id:\n - light.kitchen\n data:\n brightness_pct: '{{ brightness_pct }}'\n transition: '{{ transition }}'\n - conditions:\n - condition: and\n conditions:\n - condition: state\n entity_id: automation.living_light\n state: 'off'\n - condition: template\n value_template: '{{ action == ''flip90'' }}'\n - condition: template\n value_template: '{{ action_from_side == 1 }}'\n - condition: template\n value_template: '{{ action_side == 0 }}'\n - condition: template\n value_template: '{{ action_to_side == 0 }}'\n sequence:\n - action: light.turn_on\n target:\n entity_id:\n - light.living\n - light.kitchen\n data:\n effect: okay\n - action: automation.turn_on\n data:\n entity_id:\n - automation.living_light\n - automation.kitchen_light\n - automation.kitchen_light_1\n - delay:\n milliseconds: 750\n - event: lights_check\n event_data:\n light: turn_off\n - conditions:\n - condition: and\n conditions:\n - condition: state\n entity_id: light.living\n state: 'on'\n - condition: state\n entity_id: automation.living_light\n state: 'off'\n - condition: template\n value_template: '{{ action == ''rotate_left'' }}'\n - condition: template\n value_template: '{{ side == 1 }}'\n sequence:\n - variables:\n step: \"{%- if action_angle > 60 -%}\\n {{ -10}}\\n{%- else -%}\\n {{ -5 }}\\n\\\n {%- endif -%}\"\n kitchen_pct: \"{{\\n (state_attr('light.kitchen_led', 'brightness') * 100)\\\n \\ / 254\\n }}\"\n led_pct: \"{{\\n int(min(max(kitchen_pct + step, 25), 90))\\n }}\"\n - action: light.turn_on\n target:\n entity_id:\n - light.living\n data:\n brightness_pct: '{{ int(min(max(((state_attr(''light.living'', ''brightness'')\n * 100) / 254) + step, 10), 90)) }}'\n transition: '{{ transition }}'\n - delay:\n milliseconds: \"{{\\n states('input_number.ctrl_delay') | int (100)\\n \\\n \\ }}\"\n - action: light.turn_on\n target:\n entity_id:\n - light.kitchen\n data:\n brightness_pct: '{{ int(min(max(((state_attr(''light.kitchen'', ''brightness'')\n * 100) / 254) + step, 10), 90)) }}'\n transition: '{{ transition }}'\n - delay:\n milliseconds: \"{{\\n states('input_number.ctrl_delay') | int (100)\\n \\\n \\ }}\"\n - action: light.turn_on\n target:\n entity_id:\n - light.kitchen_led\n data:\n brightness_pct: \"{{\\n min(led_pct - 5 , 20)\\n }}\"\n - delay:\n milliseconds: \"{{\\n states('input_number.ctrl_delay') | int (100)\\n \\\n \\ }}\"\n - action: light.turn_on\n target:\n entity_id:\n - light.kitchen_led\n data:\n brightness_pct: '{{ led_pct }}'\n - conditions:\n - condition: and\n conditions:\n - condition: state\n entity_id: light.living\n state: 'on'\n - condition: state\n entity_id: automation.living_light\n state: 'off'\n - condition: template\n value_template: '{{ action == ''rotate_right'' }}'\n - condition: template\n value_template: '{{ side == 1 }}'\n sequence:\n - variables:\n step: \"{%- if action_angle > 60 -%}\\n {{ 10 }}\\n{%- else -%}\\n {{ 5 }}\\n\\\n {%- endif -%}\"\n kitchen_pct: \"{{\\n (state_attr('light.kitchen_led', 'brightness') * 100)\\\n \\ / 254\\n }}\"\n led_pct: \"{{\\n int(min(max(kitchen_pct + step, 25), 90))\\n }}\"\n - action: light.turn_on\n target:\n entity_id:\n - light.living\n data:\n brightness_pct: '{{ int(min(max(((state_attr(''light.living'', ''brightness'')\n * 100) / 254) + step, 10), 90)) }}'\n transition: '{{ transition }}'\n - delay:\n milliseconds: \"{{\\n states('input_number.ctrl_delay') | int (100)\\n \\\n \\ }}\"\n - action: light.turn_on\n target:\n entity_id:\n - light.kitchen\n data:\n brightness_pct: '{{ int(min(max(((state_attr(''light.kitchen'', ''brightness'')\n * 100) / 254) + step, 10), 90)) }}'\n transition: '{{ transition }}'\n - delay:\n milliseconds: \"{{\\n states('input_number.ctrl_delay') | int (100)\\n \\\n \\ }}\"\n - action: light.turn_on\n target:\n entity_id:\n - light.kitchen_led\n data:\n brightness_pct: \"{{\\n min(led_pct - 5 , 20)\\n }}\"\n - delay:\n milliseconds: \"{{\\n states('input_number.ctrl_delay') | int (100)\\n \\\n \\ }}\"\n - action: light.turn_on\n target:\n entity_id:\n - light.kitchen_led\n data:\n brightness_pct: '{{ led_pct }}'",
|
|
"config": [
|
|
{
|
|
"name": "night mode sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.night_mode",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living TV",
|
|
"room": "living_room",
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.livingtv",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "kitchen LED light",
|
|
"room": "kitchen",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.kitchen_led",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "control delay input number",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.ctrl_delay",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "kitchen light",
|
|
"room": "kitchen",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.kitchen",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living light",
|
|
"room": "living_room",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.living",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Kitchen Light",
|
|
"room": "Kitchen",
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.kitchen_light",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Kitchen Light 1",
|
|
"room": "Kitchen",
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.kitchen_light_1",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Living Light",
|
|
"room": "Living Room",
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.living_light",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "sound_bar_music",
|
|
"automation": "- alias: sound_bar_music\n id: sound_bar_music\n triggers:\n - trigger: state\n entity_id: media_player.ht_mt500_501_b34d6a\n from: 'off'\n for:\n seconds: 3\n id: to_on\n - trigger: state\n entity_id: input_select.select_sound_bar\n not_from:\n - unknown\n - unavailable\n - none\n id: to_on\n - trigger: event\n event_type: up_down_my\n event_data:\n data: start\n id: start\n - trigger: event\n event_type: timer.finished\n event_data:\n entity_id: timer.sound_bar\n id: to_stop\n - trigger: state\n entity_id: binary_sensor.sound_bar_active\n to: 'off'\n id: to_off\n - trigger: state\n entity_id: media_player.ht_mt500_501_b34d6a\n to: 'off'\n for:\n seconds: 5\n id: timer_clear\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - to_on\n - condition: state\n entity_id: binary_sensor.kodi_screen_saver\n state: 'on'\n sequence:\n - if:\n - condition: state\n entity_id: input_boolean.enable_sleep\n state: 'on'\n then:\n - action: timer.start\n entity_id: timer.sound_bar\n data_template:\n duration: 00:{{states('input_number.sound_bar_music_timer') | int}}:00\n - action: media_player.play_media\n data_template:\n entity_id: media_player.ht_mt500_501_b34d6a\n media_content_type: audio/mp3\n media_content_id: '{% from ''tools.jinja'' import name_to_url %} {{ name_to_url(''input_select.select_sound_bar'')\n }}'\n - conditions:\n - condition: trigger\n id:\n - to_stop\n sequence:\n - action: media_player.turn_off\n entity_id: media_player.ht_mt500_501_b34d6a\n - conditions:\n - condition: trigger\n id:\n - to_off\n sequence:\n - action: script.sound_bar_off\n - conditions:\n - condition: trigger\n id:\n - start\n sequence:\n - action: input_select.set_options\n target:\n entity_id: input_select.select_sound_bar\n data:\n options: '{% from ''tools.jinja'' import radio_names %} {{ radio_names()\n }}'\n - conditions:\n - condition: trigger\n id:\n - timer_clear\n - condition: state\n entity_id: timer.sound_bar\n state:\n - active\n - paused\n sequence:\n - action: timer.cancel\n entity_id: timer.sound_bar",
|
|
"config": [
|
|
{
|
|
"name": "Kodi screen saver sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.kodi_screen_saver",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "sound bar media player",
|
|
"room": null,
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.ht_mt500_501_b34d6a",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "sound bar music timer input number",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.sound_bar_music_timer",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "sound bar timer",
|
|
"room": null,
|
|
"type": "timer",
|
|
"id": {
|
|
"entity_id": "timer.sound_bar",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "sound bar active sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.sound_bar_active",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "sound bar select input select",
|
|
"room": null,
|
|
"type": "input_select",
|
|
"id": {
|
|
"entity_id": "input_select.select_sound_bar",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "enable sleep boolean",
|
|
"room": null,
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.enable_sleep",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "sound_bar_input_sleep_on",
|
|
"automation": "- alias: sound_bar_input_sleep_on\n id: sound_bar_input_sleep_on\n triggers:\n - trigger: state\n entity_id: input_boolean.enable_sleep\n conditions:\n - condition: state\n entity_id: media_player.ht_mt500_501_b34d6a\n state: playing\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: state\n entity_id: input_boolean.enable_sleep\n state: 'off'\n sequence:\n - action: timer.cancel\n entity_id: timer.sound_bar\n - conditions:\n - condition: state\n entity_id: input_boolean.enable_sleep\n state: 'on'\n sequence:\n - action: timer.start\n entity_id: timer.sound_bar\n data_template:\n duration: 00:05:00\n - choose:\n - conditions:\n - condition: or\n conditions:\n - condition: state\n entity_id: input_boolean.enable_sleep\n state: 'off'\n - condition: state\n entity_id: device_tracker.n0ll\n state: home\n sequence:\n - action: timer.pause\n entity_id: timer.sound_bar",
|
|
"config": [
|
|
{
|
|
"name": "sound bar media player",
|
|
"room": null,
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.ht_mt500_501_b34d6a",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "device tracker n0ll",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.n0ll",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "sound bar timer",
|
|
"room": null,
|
|
"type": "timer",
|
|
"id": {
|
|
"entity_id": "timer.sound_bar",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "enable sleep boolean",
|
|
"room": null,
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.enable_sleep",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "bed_sleep_on_spot",
|
|
"automation": "- alias: bed_sleep_on_spot\n id: bed_sleep_on_spot\n triggers:\n - trigger: state\n entity_id: binary_sensor.bedmusic\n to: 'on'\n actions:\n - action: input_select.select_option\n data:\n entity_id: input_select.select_spotify\n option: sleep\n - action: script.spot_bed\n - wait_template: \"{{\\n is_state('media_player.bedroom_speaker', 'playing')\\n\\\n \\ }}\"\n timeout:\n seconds: 60\n continue_on_timeout: true\n - action: media_player.volume_set\n data:\n entity_id: media_player.bedroom_speaker\n volume_level: 0.14\n - action: timer.start\n entity_id: timer.bed_music\n data:\n duration: 00:45:00",
|
|
"config": [
|
|
{
|
|
"name": "bedroom speaker",
|
|
"room": "bedroom",
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.bedroom_speaker",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bedmusic sensor",
|
|
"room": "bedroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bedmusic",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "spotify select input select",
|
|
"room": null,
|
|
"type": "input_select",
|
|
"id": {
|
|
"entity_id": "input_select.select_spotify",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed music timer",
|
|
"room": "bedroom",
|
|
"type": "timer",
|
|
"id": {
|
|
"entity_id": "timer.bed_music",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Spot Bed",
|
|
"room": "Bedroom",
|
|
"type": "script",
|
|
"id": {
|
|
"entity_id": "script.spot_bed",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "bed_sleep_on",
|
|
"automation": "- alias: bed_sleep_on\n id: bed_sleep_on\n triggers:\n - trigger: state\n entity_id: binary_sensor.bedmusic\n to: 'on'\n conditions:\n - condition: and\n conditions:\n - condition: template\n value_template: \"{{\\n not is_state('media_player.bedroom_speaker', 'playing')\\n\\\n \\ }}\"\n actions:\n - action: input_select.select_option\n data_template:\n entity_id: input_select.select_sleep_sound\n option: '{%- set c = states(''input_select.select_sleep_sound'') -%} {%- set\n a = state_attr(''input_select.select_sleep_sound'', ''options'') -%} {{ (((a\n | join(\"|\")) | regex_replace(c, replace='''')) | regex_replace(''\\|\\|'', replace=''|'')).split(''|'')\n | random }}'",
|
|
"config": [
|
|
{
|
|
"name": "bedroom speaker",
|
|
"room": "bedroom",
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.bedroom_speaker",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bedmusic sensor",
|
|
"room": "bedroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bedmusic",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "sleep sound select input select",
|
|
"room": null,
|
|
"type": "input_select",
|
|
"id": {
|
|
"entity_id": "input_select.select_sleep_sound",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "bed_sleep_on_select",
|
|
"automation": "- alias: bed_sleep_on_select\n id: bed_sleep_on_select\n triggers:\n - trigger: state\n entity_id: input_select.select_sleep_sound\n conditions:\n condition: and\n conditions:\n - condition: template\n value_template: '{{trigger.from_state.state != trigger.to_state.state}}'\n actions:\n - action: script.bed_sleep_on",
|
|
"config": [
|
|
{
|
|
"name": "sleep sound select input select",
|
|
"room": null,
|
|
"type": "input_select",
|
|
"id": {
|
|
"entity_id": "input_select.select_sleep_sound",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Bed Sleep On",
|
|
"room": "Bedroom",
|
|
"type": "script",
|
|
"id": {
|
|
"entity_id": "script.bed_sleep_on",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "bed_music",
|
|
"automation": "- alias: bed_music\n id: bed_music\n triggers:\n - trigger: state\n entity_id: media_player.bedroom_speaker\n from: 'off'\n for:\n seconds: 3\n id: to_on\n - trigger: state\n entity_id: input_select.select_radio_bed\n not_from:\n - unknown\n - unavailable\n - none\n id: to_on\n - trigger: event\n event_type: up_down_my\n event_data:\n data: start\n id: start\n - trigger: state\n entity_id: binary_sensor.bedmusic\n to: 'off'\n id: to_off\n - trigger: event\n event_type: timer.finished\n event_data:\n entity_id: timer.bed_music\n id: to_off\n - trigger: state\n entity_id: media_player.bedroom_speaker\n to: 'off'\n for:\n seconds: 3\n id: timer_clear\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - to_on\n - condition: template\n value_template: \"{{\\n ('input_select.select_radio_bed' == trigger.entity_id)\\\n \\ or\\n not is_state('media_player.bedroom_speaker', 'playing')\\n }}\"\n - condition: state\n entity_id:\n - script.bed_sleep_on\n - script.spot_bed\n state: 'off'\n sequence:\n - action: script.bed_music_on\n - conditions:\n - condition: trigger\n id:\n - to_off\n - condition: template\n value_template: \"{{\\n now() - (\\n state_attr('automation.event_android_alarm',\\\n \\ 'last_triggered') |\\n default(now() - timedelta(minutes=16), true)\\n\\\n \\ ) >\\n timedelta(minutes=15)\\n }}\"\n sequence:\n - action: media_player.turn_off\n entity_id: media_player.bedroom_speaker\n - conditions:\n - condition: trigger\n id:\n - timer_clear\n - condition: template\n value_template: '{{ not is_state(''timer.bed_music'', ''idle'') }}'\n sequence:\n - action: media_player.turn_off\n entity_id: media_player.bedroom_speaker\n - action: timer.cancel\n entity_id: timer.bed_music\n - conditions:\n - condition: trigger\n id:\n - start\n sequence:\n - action: input_select.set_options\n target:\n entity_id: input_select.select_radio_bed\n data:\n options: '{% from ''tools.jinja'' import radio_names %} {{ radio_names()\n }}'",
|
|
"config": [
|
|
{
|
|
"name": "bedroom speaker",
|
|
"room": "bedroom",
|
|
"type": "media_player",
|
|
"id": {
|
|
"entity_id": "media_player.bedroom_speaker",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bedmusic sensor",
|
|
"room": "bedroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.bedmusic",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bed music timer",
|
|
"room": "bedroom",
|
|
"type": "timer",
|
|
"id": {
|
|
"entity_id": "timer.bed_music",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "radio bed select input select",
|
|
"room": "bedroom",
|
|
"type": "input_select",
|
|
"id": {
|
|
"entity_id": "input_select.select_radio_bed",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Bed Sleep On",
|
|
"room": "Bedroom",
|
|
"type": "script",
|
|
"id": {
|
|
"entity_id": "script.bed_sleep_on",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Spot Bed",
|
|
"room": "Bedroom",
|
|
"type": "script",
|
|
"id": {
|
|
"entity_id": "script.spot_bed",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "auto_reboot_all",
|
|
"automation": "- alias: auto_reboot_all\n id: auto_reboot_all\n triggers:\n - trigger: state\n entity_id: binary_sensor.isp_conn\n to: 'off'\n for:\n minutes: 6\n conditions:\n - condition: template\n value_template: \"{{\\n now() - (\\n state_attr('automation.mydelay', 'last_triggered')\\\n \\ |\\n default(now()-timedelta(minutes=61), true)\\n ) >\\n timedelta(minutes=60)\\n\\\n \\ }}\"\n actions:\n - action: script.all_notify\n data:\n icon_notify: restart-alert\n tit: reboot all\n msg: \"{%- if states('sensor.ping_isp') | float(-1) < 0 -%}\\n cant ping isp\\n\\\n {%- else -%}\\n high isp ping {{states('sensor.ping_isp') }} ms\\n{%- endif\\\n \\ -%}\"\n - action: script.reboot_all",
|
|
"config": [
|
|
{
|
|
"name": "ISP connection sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.isp_conn",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "ping ISP sensor",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.ping_isp",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "open_ports",
|
|
"automation": "- alias: open_ports\n id: open_ports\n triggers:\n - trigger: state\n entity_id: binary_sensor.ext_port\n to: 'off'\n for:\n minutes: 11\n actions:\n - action: script.all_notify\n data:\n icon_notify: router-network-wireless\n tit: router\n msg: open ports",
|
|
"config": [
|
|
{
|
|
"name": "external port sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.ext_port",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "isp_notify",
|
|
"automation": "- alias: isp_notify\n id: isp_notify\n triggers:\n - trigger: state\n entity_id:\n - binary_sensor.village_conn\n - binary_sensor.city_conn\n - binary_sensor.main_conn\n - binary_sensor.city_waterheater_conn\n - binary_sensor.village_pump_conn\n - binary_sensor.village_waterheater_conn\n to: null\n not_from:\n - unknown\n - unavailable\n for:\n minutes: 1\n mode: parallel\n actions:\n - action: script.all_notify\n data_template:\n icon_notify: connection\n tit: '{{ trigger.to_state.name }}'\n msg: \"{%-\\n set sts = {\\n 'on': 'up',\\n 'off': 'down',\\n \\\n \\ }\\n -%}\\n{{ sts[trigger.to_state.state] }}\"\n - choose:\n - conditions:\n - condition: template\n value_template: \"{{\\n trigger.to_state.state == 'on'\\n }}\"\n sequence:\n - action: script.turn_on\n data:\n entity_id:\n - script.startup_mqtt",
|
|
"config": [
|
|
{
|
|
"name": "village connection sensor",
|
|
"room": "village",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.village_conn",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "city connection sensor",
|
|
"room": "city",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.city_conn",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "main connection sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.main_conn",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "city waterheater connection sensor",
|
|
"room": "city",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.city_waterheater_conn",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "village pump connection sensor",
|
|
"room": "village",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.village_pump_conn",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "village waterheater connection sensor",
|
|
"room": "village",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.village_waterheater_conn",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Startup MQTT",
|
|
"room": null,
|
|
"type": "script",
|
|
"id": {
|
|
"entity_id": "script.startup_mqtt",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "change_current_theme",
|
|
"automation": "- alias: change_current_theme\n id: change_current_theme\n triggers:\n - trigger: state\n entity_id: input_select.current_theme\n actions:\n - action: frontend.set_theme\n data_template:\n name: '{{ states(''input_select.current_theme'') }}'",
|
|
"config": [
|
|
{
|
|
"name": "current theme input select",
|
|
"room": null,
|
|
"type": "input_select",
|
|
"id": {
|
|
"entity_id": "input_select.current_theme",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "theme_switch",
|
|
"automation": "- alias: theme_switch\n id: theme_switch\n triggers:\n - trigger: state\n entity_id: binary_sensor.day\n - trigger: homeassistant\n event: start\n actions:\n - action: input_select.select_option\n data:\n entity_id: input_select.current_theme\n data_template:\n option: '{%- set _map = {''on'': ''default'', ''off'': ''midnight''} -%} {{\n _map[states(''binary_sensor.day'')] }}'",
|
|
"config": [
|
|
{
|
|
"name": "day sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.day",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "current theme input select",
|
|
"room": null,
|
|
"type": "input_select",
|
|
"id": {
|
|
"entity_id": "input_select.current_theme",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "updates_notify",
|
|
"automation": "- alias: updates_notify\n id: updates_notify\n triggers:\n - trigger: state\n entity_id: binary_sensor.docker_hub_update_available\n to: 'on'\n for:\n seconds: 60\n id: hass\n - trigger: numeric_state\n entity_id: sensor.hacs\n value_template: \"{{\\n expand(states.update)\\n | selectattr('state', 'eq',\\\n \\ 'on')\\n | map(attribute='entity_id')\\n | map('device_attr', 'identifiers')\\n\\\n \\ | map('contains', 'hacs')\\n | list\\n | count\\n }}\"\n above: 0\n for:\n seconds: 60\n id: hacs\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - hass\n sequence:\n - action: script.all_notify\n data:\n icon_notify: update\n tit: Update\n data_template:\n msg: '{{trigger.id}}: {{ states(''sensor.docker_hub'') }}'\n - conditions:\n - condition: trigger\n id:\n - hacs\n sequence:\n - action: script.all_notify\n data:\n icon_notify: update\n tit: Update\n data_template:\n msg: '{{trigger.id}}: {{ trigger.to_state.state }}'",
|
|
"config": [
|
|
{
|
|
"name": "docker hub update sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.docker_hub_update_available",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "docker hub sensor",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.docker_hub",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "HACS sensor",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.hacs",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "once_week_reboot",
|
|
"automation": "- alias: once_week_reboot\n id: once_week_reboot\n triggers:\n - trigger: time\n at: 03:00:00\n conditions:\n - condition: time\n weekday:\n - tue\n actions:\n - action: script.roborock_reboot\n - action: script.all_notify\n data:\n icon_notify: restart-alert\n tit: weekly\n msg: reboot",
|
|
"config": []
|
|
},
|
|
{
|
|
"id": "ligths_auto_off",
|
|
"automation": "- alias: ligths_auto_off\n id: ligths_auto_off\n triggers:\n - trigger: state\n entity_id: binary_sensor.village_conn\n to: 'on'\n for:\n seconds: 30\n id: village_lights_off\n - trigger: state\n entity_id: binary_sensor.city_conn\n to: 'on'\n for:\n seconds: 30\n id: city_lights_off\n mode: parallel\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - village_lights_off\n sequence:\n - repeat:\n for_each:\n - light.village_1\n - light.village_garage\n - light.village_out\n - light.village_top_1\n sequence:\n - action: light.turn_on\n target:\n entity_id: \"{{\\n repeat.item\\n }}\"\n - delay:\n milliseconds: 500\n - delay:\n seconds: 20\n - repeat:\n for_each:\n - light.village_1\n - light.village_garage\n - light.village_out\n - light.village_top_1\n sequence:\n - action: light.turn_off\n target:\n entity_id: \"{{\\n repeat.item\\n }}\"\n - delay:\n milliseconds: 500\n - choose:\n - conditions:\n - condition: trigger\n id:\n - city_lights_off\n sequence:\n - action: light.turn_on\n target:\n entity_id:\n - light.city_2\n - delay:\n seconds: 20\n - action: light.turn_off\n target:\n entity_id:\n - light.city_2",
|
|
"config": [
|
|
{
|
|
"name": "city 2 light",
|
|
"room": "city",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.city_2",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "village 1 light",
|
|
"room": "village",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.village_1",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "village top 1 light",
|
|
"room": "village",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.village_top_1",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "village out light",
|
|
"room": "village",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.village_out",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "village garage light",
|
|
"room": "village",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.village_garage",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "village connection sensor",
|
|
"room": "village",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.village_conn",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "city connection sensor",
|
|
"room": "city",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.city_conn",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "transmission_notify",
|
|
"automation": "- alias: transmission_notify\n id: transmission_notify\n triggers:\n - trigger: event\n event_type: transmission\n actions:\n - action: script.all_notify\n data_template:\n icon_notify: pipe\n tit: '{{ trigger.event.data.file }}'\n msg: finished",
|
|
"config": []
|
|
},
|
|
{
|
|
"id": "transmission_idle",
|
|
"automation": "- alias: transmission_idle\n id: transmission_idle\n triggers:\n - trigger: state\n entity_id: binary_sensor.download_active\n to: 'off'\n from: 'on'\n actions:\n - action: script.all_notify\n data:\n icon_notify: pipe-disconnected\n tit: transmission\n msg: download is idle",
|
|
"config": [
|
|
{
|
|
"name": "download active sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.download_active",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "timer_startup",
|
|
"automation": "- alias: timer_startup\n id: timer_startup\n triggers:\n - trigger: event\n event_type: timer.finished\n event_data:\n entity_id: timer.start_up_delay\n conditions:\n condition: or\n conditions:\n - condition: state\n entity_id: input_select.power_down_restart\n state: pending\n actions:\n - action: homeassistant.restart",
|
|
"config": [
|
|
{
|
|
"name": "start up delay timer",
|
|
"room": null,
|
|
"type": "timer",
|
|
"id": {
|
|
"entity_id": "timer.start_up_delay",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "power down restart input select",
|
|
"room": null,
|
|
"type": "input_select",
|
|
"id": {
|
|
"entity_id": "input_select.power_down_restart",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "restart",
|
|
"automation": "- alias: restart\n id: restart\n triggers:\n - trigger: event\n event_type: call_service\n event_data:\n domain: homeassistant\n service: restart\n conditions:\n condition: or\n conditions:\n - condition: state\n entity_id: input_select.power_down_restart\n state: 'on'\n actions:\n - event: up_down_my\n event_data:\n data: stop\n - action: input_select.select_option\n data:\n entity_id: input_select.power_down_restart\n option: 'off'\n - action: logbook.log\n data_template:\n name: restart\n message: power down restart off",
|
|
"config": [
|
|
{
|
|
"name": "power down restart input select",
|
|
"room": null,
|
|
"type": "input_select",
|
|
"id": {
|
|
"entity_id": "input_select.power_down_restart",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "startup",
|
|
"automation": "- alias: startup\n id: startup\n triggers:\n - trigger: homeassistant\n event: start\n actions:\n - action: \"{%-\\n set scr = {\\n 'off': 'script.startup',\\n 'on': 'script.restart',\\n\\\n \\ 'pending': 'script.powerup'\\n }\\n -%}\\n{{ scr[states('input_select.power_down_restart')]\\\n \\ }}\\n\"",
|
|
"config": [
|
|
{
|
|
"name": "power down restart input select",
|
|
"room": null,
|
|
"type": "input_select",
|
|
"id": {
|
|
"entity_id": "input_select.power_down_restart",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "wash_light",
|
|
"automation": "- alias: wash_light\n id: wash_light\n initial_state: false\n triggers:\n - trigger: state\n entity_id:\n - binary_sensor.hall_motion\n - binary_sensor.wash_door\n to: 'on'\n id: light_on\n - trigger: state\n entity_id: binary_sensor.hall_occupancy\n to: 'off'\n for:\n seconds: 45\n id: light_off\n - trigger: state\n entity_id: binary_sensor.wash_door\n to: 'off'\n for:\n seconds: 3\n id: light_off\n - trigger: event\n event_type: lights_check\n event_data:\n light: turn_off\n id: light_off\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - light_on\n - condition: state\n entity_id: binary_sensor.wash_door\n state: 'on'\n - condition: state\n entity_id: light.wash\n state: 'off'\n sequence:\n - action: light.turn_on\n target:\n entity_id:\n - light.wash\n - conditions:\n - condition: trigger\n id:\n - light_off\n - condition: state\n entity_id: light.wash\n state: 'on'\n - condition: or\n conditions:\n - condition: state\n entity_id: binary_sensor.hall_occupancy\n state: 'off'\n - condition: state\n entity_id: binary_sensor.wash_door\n state: 'off'\n sequence:\n - action: light.turn_off\n target:\n entity_id: light.wash",
|
|
"config": [
|
|
{
|
|
"name": "hall motion sensor",
|
|
"room": "hall",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.hall_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "hall occupancy sensor",
|
|
"room": "hall",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.hall_occupancy",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "wash door sensor",
|
|
"room": "wash",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.wash_door",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "wash light",
|
|
"room": "wash",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.wash",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "hall occupancy sensor",
|
|
"room": "hall",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.hall_occupancy",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "wash_fan",
|
|
"automation": "- alias: wash_fan\n id: wash_fan\n triggers:\n - trigger: state\n entity_id: binary_sensor.wash_fan\n to: 'on'\n id: dryer_on\n - trigger: state\n entity_id: binary_sensor.wash_fan\n to: 'off'\n id: dryer_off\n - trigger: numeric_state\n entity_id: sensor.bath_hum_change\n above: 10.0\n id: shower_on\n - trigger: state\n entity_id: binary_sensor.showering\n to: 'off'\n id: shower_off\n - trigger: state\n entity_id: input_boolean.fan_wash_time\n to: 'on'\n id: manual_on\n - trigger: state\n entity_id: input_boolean.fan_wash_time\n to: 'on'\n for:\n minutes: \"{{\\n states('input_number.fan_wash_time') | int(0)\\n }}\"\n id: manual_off\n - trigger: event\n event_type: up_down_my\n event_data:\n data: start\n id: manual_off\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: and\n conditions:\n - condition: trigger\n id:\n - shower_on\n - dryer_on\n - manual_on\n - condition: state\n entity_id: switch.wash_fan\n state: 'off'\n sequence:\n - action: switch.turn_on\n data:\n entity_id:\n - switch.wash_fan\n - conditions:\n - condition: and\n conditions:\n - condition: trigger\n id:\n - shower_off\n - dryer_off\n - manual_off\n - condition: and\n conditions:\n - condition: state\n entity_id: binary_sensor.showering\n state: 'off'\n - condition: state\n entity_id: binary_sensor.wash_fan\n state: 'off'\n - condition: state\n entity_id: switch.wash_fan\n state: 'on'\n sequence:\n - action: switch.turn_off\n data:\n entity_id:\n - switch.wash_fan\n - choose:\n - conditions:\n - condition: trigger\n id:\n - shower\n - manual_off\n - condition: state\n entity_id: input_boolean.fan_wash_time\n state: 'on'\n sequence:\n - action: input_boolean.turn_off\n data:\n entity_id:\n - input_boolean.fan_wash_time",
|
|
"config": [
|
|
{
|
|
"name": "showering sensor",
|
|
"room": "bathroom",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.showering",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "wash fan sensor",
|
|
"room": "wash",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.wash_fan",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "bath humidity change sensor",
|
|
"room": "bathroom",
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.bath_hum_change",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "fan wash time boolean",
|
|
"room": "wash",
|
|
"type": "input_boolean",
|
|
"id": {
|
|
"entity_id": "input_boolean.fan_wash_time",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "fan wash time input number",
|
|
"room": "wash",
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.fan_wash_time",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "wash fan switch",
|
|
"room": "wash",
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.wash_fan",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "water_boiler",
|
|
"automation": "- id: water_boiler\n alias: water_boiler\n triggers:\n - trigger: time\n at: 05:05:00\n id: time_heat\n variables:\n s: win\n - trigger: time\n at: 06:05:00\n id: time_heat\n variables:\n s: sum\n - trigger: time\n at: 04:45:00\n id: time_clean\n variables:\n s: win\n - trigger: time\n at: 05:00:00\n id: time_clean\n variables:\n s: sum\n - trigger: time\n at: 06:35:00\n id: time_off\n variables:\n s: win\n - trigger: time\n at: 07:35:00\n id: time_off\n variables:\n s: sum\n conditions:\n - condition: template\n value_template: \"{%- set data = {\\n 'win' : [1, 2, 3, 11, 12],\\n \\\n \\ 'sum' : [4, 5, 6, 7, 8, 9, 10],\\n }\\n -%}\\n{{ now().month in data[s]\\\n \\ }}\"\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - time_heat\n - condition: state\n entity_id: device_tracker.root\n state: home\n - condition: numeric_state\n entity_id: climate.hot_water\n attribute: current_temperature\n below: 39.0\n - condition: state\n entity_id: climate.hot_water\n state: 'off'\n sequence:\n - action: climate.set_temperature\n target:\n entity_id: climate.hot_water\n data:\n hvac_mode: heat\n temperature: 45\n - conditions:\n - condition: trigger\n id:\n - time_clean\n - condition: time\n weekday:\n - wed\n - condition: state\n entity_id: climate.hot_water\n state: 'off'\n sequence:\n - action: climate.set_hvac_mode\n target:\n entity_id: climate.hot_water\n data:\n hvac_mode: heat\n - conditions:\n - condition: trigger\n id:\n - time_off\n - condition: state\n entity_id: climate.hot_water\n state: heat\n sequence:\n - action: climate.set_hvac_mode\n target:\n entity_id: climate.hot_water\n data:\n hvac_mode: 'off'",
|
|
"config": [
|
|
{
|
|
"name": "device tracker root",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.root",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "hot water climate",
|
|
"room": null,
|
|
"type": "climate",
|
|
"id": {
|
|
"entity_id": "climate.hot_water",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "water_city_1",
|
|
"automation": "- id: water_city_1\n alias: water_city_1\n triggers:\n - trigger: state\n entity_id:\n - binary_sensor.water_motion\n - binary_sensor.water_wash\n to: 'on'\n id: water_on\n - trigger: state\n entity_id: binary_sensor.water_occupancy\n to: 'off'\n id: water_off\n for:\n seconds: \"{%- if int(states('counter.water_motion'), 5) > 50 -%}\\n 300\\n{%-\\\n \\ elif int(states('counter.water_motion'), 5) > 30 -%}\\n 180\\n{%- elif int(states('counter.water_motion'),\\\n \\ 5 ) > 10 -%}\\n 120\\n{%- else -%}\\n 60\\n{%- endif -%}\"\n - trigger: state\n entity_id: binary_sensor.water_wash\n to: 'off'\n id: water_off\n - trigger: event\n event_type: up_down_my\n event_data:\n data: start\n id: water_off\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - water_on\n sequence:\n - action: counter.increment\n data:\n entity_id:\n - counter.water_motion\n - conditions:\n - condition: trigger\n id:\n - water_off\n sequence:\n - action: counter.reset\n data:\n entity_id:\n - counter.water_motion\n - choose:\n - conditions:\n - condition: trigger\n id:\n - water_on\n - condition: state\n entity_id: switch.water_valve\n state: 'off'\n sequence:\n - action: switch.turn_on\n data:\n entity_id: switch.water_valve\n - conditions:\n - condition: trigger\n id:\n - water_off\n - condition: state\n entity_id: switch.water_valve\n state: 'on'\n - condition: state\n entity_id: binary_sensor.water_occupancy\n state: 'off'\n - condition: state\n entity_id: binary_sensor.water_wash\n state: 'off'\n sequence:\n - action: switch.turn_off\n data:\n entity_id: switch.water_valve",
|
|
"config": [
|
|
{
|
|
"name": "water motion sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.water_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "water wash sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.water_wash",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "water occupancy sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.water_occupancy",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "water motion counter",
|
|
"room": null,
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.water_motion",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "water valve switch",
|
|
"room": null,
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.water_valve",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "wled_lights",
|
|
"automation": "- alias: wled_lights\n id: wled_lights\n triggers:\n - trigger: state\n entity_id: binary_sensor.wled_living\n to: 'on'\n id: to_on\n - trigger: state\n entity_id: binary_sensor.wled_living\n to: 'off'\n id: to_off\n - trigger: state\n entity_id: binary_sensor.wled_living\n from: unavailable\n for:\n seconds: 45\n id: from_off\n - trigger: state\n entity_id:\n - light.living\n - light.hall\n to: 'off'\n id: after_off\n - trigger: state\n entity_id: binary_sensor.wled_ambient\n to: 'on'\n id: to_ambient\n - trigger: state\n entity_id: binary_sensor.wled_ambient\n to: 'off'\n id: from_ambient\n - trigger: event\n event_type: up_down_my\n event_data:\n data: stop\n id: to_off\n - trigger: state\n entity_id: binary_sensor.day\n to: 'off'\n - trigger: event\n event_type: up_down_my\n event_data:\n data: start\n id: to_start\n - trigger: state\n entity_id: device_tracker.n0ll\n to: not_home\n for:\n seconds: 95\n id: to_start\n - trigger: event\n event_type: kodi_living_startup\n id: to_start\n mode: restart\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - to_ambient\n sequence:\n - action: mqtt.publish\n data:\n topic: wled/wled-living/api\n payload: SN=0\n - action: mqtt.publish\n data:\n topic: wled/wled-window/api\n payload: T=0\n - action: mqtt.publish\n data:\n topic: wled/wled-living/api\n payload: \"{{\\n 'A=%d' | format( states('input_number.wled_video_brightness')\\\n \\ | int(64))\\n }}\"\n - choose:\n - conditions:\n - condition: trigger\n id:\n - to_on\n sequence:\n - variables:\n data: A=200&FP=51&FX=112&NL=0\n - action: mqtt.publish\n data:\n topic: wled/wled-living/api\n payload: '{{ data }}'\n - action: mqtt.publish\n data:\n topic: wled/wled-window/api\n payload: '{{ data }}'\n - conditions:\n - condition: trigger\n id:\n - to_off\n - condition: state\n entity_id: binary_sensor.wled_ambient\n state: 'off'\n sequence:\n - variables:\n data: NL=1&NF=2&A=200&PL=1\n - action: mqtt.publish\n data:\n topic: wled/wled-living/api\n payload: '{{ data }}'\n - action: mqtt.publish\n data:\n topic: wled/wled-window/api\n payload: '{{ data }}'\n - conditions:\n - condition: trigger\n id:\n - from_off\n - condition: state\n entity_id: binary_sensor.wled_ambient\n state: 'off'\n sequence:\n - variables:\n data: \"{%- if is_state('binary_sensor.wled_living', 'on') -%}\\n A=200&FP=51&FX=112&NL=0\\n\\\n {%- else -%}\\n A=200&FP=15&FX=38&NL=5&NF=2\\n{%- endif -%}\"\n - action: mqtt.publish\n data:\n topic: wled/wled-living/api\n payload: '{{ data }}'\n - action: mqtt.publish\n data:\n topic: wled/wled-window/api\n payload: '{{ data }}'\n - conditions:\n - condition: trigger\n id:\n - after_off\n - condition: state\n entity_id: binary_sensor.wled_living\n state: 'off'\n - condition: state\n entity_id: binary_sensor.wled_ambient\n state: 'off'\n - condition: state\n entity_id: binary_sensor.day\n state: 'off'\n sequence:\n - variables:\n data: A=200&PL=3&NL=3&NF=2\n - action: mqtt.publish\n data:\n topic: wled/wled-living/api\n payload: '{{ data }}'\n - action: mqtt.publish\n data:\n topic: wled/wled-window/api\n payload: '{{ data }}'\n - conditions:\n - condition: trigger\n id:\n - to_start\n - condition: state\n entity_id: binary_sensor.day\n state: 'off'\n - condition: state\n entity_id: binary_sensor.wled_living\n state: 'off'\n - condition: state\n entity_id: device_tracker.root\n state: home\n sequence:\n - variables:\n data: A=200&FP=15&FX=43&NL=1&NF=2\n - action: mqtt.publish\n data:\n topic: wled/wled-living/api\n payload: '{{ data }}'\n - action: mqtt.publish\n data:\n topic: wled/wled-window/api\n payload: '{{ data }}'\n - conditions:\n - condition: trigger\n id:\n - from_ambient\n sequence:\n - variables:\n data: A=200&FP=15&FX=112&NL=1&NF=2\n - action: mqtt.publish\n data:\n topic: wled/wled-living/api\n payload: '{{ data }}'\n - action: mqtt.publish\n data:\n topic: wled/wled-window/api\n payload: '{{ data }}'",
|
|
"config": [
|
|
{
|
|
"name": "day sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.day",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "hall light",
|
|
"room": "hall",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.hall",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "device tracker root",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.root",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "living light",
|
|
"room": "living_room",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.living",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "device tracker n0ll",
|
|
"room": null,
|
|
"type": "device_tracker",
|
|
"id": {
|
|
"entity_id": "device_tracker.n0ll",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "WLED living sensor",
|
|
"room": "living_room",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.wled_living",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "WLED ambient sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.wled_ambient",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "WLED video brightness input number",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.wled_video_brightness",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "hyperion_clear_effects",
|
|
"automation": "- alias: hyperion_clear_effects\n id: hyperion_clear_effects\n triggers:\n - trigger: event\n event_type: timer.finished\n event_data:\n entity_id: timer.hyperion_effect_timer\n actions:\n - action: input_select.select_option\n data:\n entity_id: input_select.hyperion_select_effect\n option: None",
|
|
"config": [
|
|
{
|
|
"name": "hyperion select effect input select",
|
|
"room": null,
|
|
"type": "input_select",
|
|
"id": {
|
|
"entity_id": "input_select.hyperion_select_effect",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "hyperion effect timer",
|
|
"room": null,
|
|
"type": "timer",
|
|
"id": {
|
|
"entity_id": "timer.hyperion_effect_timer",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "send_effect_hyperion",
|
|
"automation": "- alias: send_effect_hyperion\n id: send_effect_hyperion\n triggers:\n - trigger: state\n entity_id: input_select.hyperion_select_effect\n conditions:\n - condition: template\n value_template: \"{{\\n trigger.to_state.state != 'None'\\n }}\"\n - condition: template\n value_template: \"{{\\n now() - (\\n state_attr('automation.tv_ctrl', 'last_triggered')\\\n \\ |\\n default(now() - timedelta(seconds=31), true)\\n ) >\\n \\\n \\ timedelta(seconds=30) or\\n is_state('binary_sensor.day', 'off')\\n }}\"\n actions:\n - action: shell_command.hyperion_cmd\n data_template:\n value: \"'{\\n \\\"command\\\":\\\"componentstate\\\",\\n \\\"componentstate\\\": {\\n \\\n \\ \\\"component\\\": \\\"LEDDEVICE\\\",\\n \\\"state\\\": false\\n }\\n}'\"\n - delay:\n milliseconds: 250\n - action: shell_command.hyperion_cmd\n data_template:\n value: \"'{\\n \\\"command\\\": \\\"effect\\\",\\n \\\"priority\\\": {{ 105 | int(0)\\\n \\ }},\\n \\\"duration\\\": {{ (states('input_number.slider_effect_time') | float(0)\\\n \\ * 60000) | int(0) }},\\n \\\"effect\\\": { \\\"name\\\" : \\\"{{ states('input_select.hyperion_select_effect')\\\n \\ }}\\\"}\\n }'\"\n - delay:\n milliseconds: 250\n - action: shell_command.hyperion_cmd\n data_template:\n value: \"'{\\n \\\"command\\\":\\\"componentstate\\\",\\n \\\"componentstate\\\": {\\n \\\n \\ \\\"component\\\": \\\"LEDDEVICE\\\",\\n \\\"state\\\": true\\n }\\n}'\"\n - action: timer.start\n entity_id: timer.hyperion_effect_timer\n data_template:\n duration: '{{ (states(''input_number.slider_effect_time'') | float(0) * 60)\n | int(0) }}'",
|
|
"config": [
|
|
{
|
|
"name": "day sensor",
|
|
"room": null,
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.day",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "hyperion select effect input select",
|
|
"room": null,
|
|
"type": "input_select",
|
|
"id": {
|
|
"entity_id": "input_select.hyperion_select_effect",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "hyperion effect timer",
|
|
"room": null,
|
|
"type": "timer",
|
|
"id": {
|
|
"entity_id": "timer.hyperion_effect_timer",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "effect time input number",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.slider_effect_time",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "video_grabber",
|
|
"automation": "- alias: video_grabber\n id: video_grabber\n triggers:\n - trigger: state\n entity_id: binary_sensor.grabber_living\n - trigger: event\n event_type: kodi_living_startup\n actions:\n - action: shell_command.hyperion_cmd\n data_template:\n value: \"{%-\\n set cmd = {\\n 'command': 'componentstate',\\n \\\n \\ 'componentstate': {\\n 'component': 'GRABBER',\\n 'state':\\\n \\ is_state('binary_sensor.grabber_living', 'on')\\n }\\n }\\n -%}\\n\\\n '{{ cmd | to_json }}'\"\n - delay:\n milliseconds: 250\n - action: shell_command.hyperion_cmd\n data_template:\n value: \"{%-\\n set cmd = {\\n 'command': 'componentstate',\\n \\\n \\ 'componentstate': {\\n 'component': 'LEDDEVICE',\\n 'state':\\\n \\ false\\n }\\n }\\n -%}\\n'{{ cmd | to_json }}'\"\n - delay:\n milliseconds: 250\n - action: shell_command.hyperion_cmd\n data_template:\n value: \"{%-\\n set cmd = {\\n 'command': 'componentstate',\\n \\\n \\ 'componentstate': {\\n 'component': 'LEDDEVICE',\\n 'state':\\\n \\ true\\n }\\n }\\n -%}\\n'{{ cmd | to_json }}'\"",
|
|
"config": [
|
|
{
|
|
"name": "grabber living sensor",
|
|
"room": "living_room",
|
|
"type": "binary_sensor",
|
|
"id": {
|
|
"entity_id": "binary_sensor.grabber_living",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "send_effect_hyperion_none",
|
|
"automation": "- alias: send_effect_hyperion_none\n id: send_effect_hyperion_none\n triggers:\n - trigger: state\n entity_id: input_select.hyperion_select_effect\n to: None\n for:\n seconds: 3\n actions:\n - action: shell_command.hyperion_cmd\n data_template:\n value: '''{\"command\": \"clear\", \"priority\": {{ 105 | int(0) }}}'''\n - action: timer.cancel\n entity_id: timer.hyperion_effect_timer",
|
|
"config": [
|
|
{
|
|
"name": "hyperion select effect input select",
|
|
"room": null,
|
|
"type": "input_select",
|
|
"id": {
|
|
"entity_id": "input_select.hyperion_select_effect",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "hyperion effect timer",
|
|
"room": null,
|
|
"type": "timer",
|
|
"id": {
|
|
"entity_id": "timer.hyperion_effect_timer",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "led_scheme_send",
|
|
"automation": "- alias: led_scheme_send\n id: led_scheme_send\n triggers:\n - trigger: state\n entity_id: input_select.wled_colors_palette\n - trigger: state\n entity_id: input_select.wled_effects\n conditions:\n condition: and\n conditions:\n - condition: state\n entity_id: light.wled_living\n state: 'on'\n actions:\n - action: mqtt.publish\n data:\n topic: wled/wled-living/api\n payload_template: '{{states(''input_select.wled_effects'')}}'\n - action: mqtt.publish\n data:\n topic: wled/wled-living/api\n payload_template: '{{states(''input_select.wled_colors_palette'')}}'",
|
|
"config": [
|
|
{
|
|
"name": "WLED living light",
|
|
"room": "living_room",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "light.wled_living",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "WLED colors palette input select",
|
|
"room": null,
|
|
"type": "input_select",
|
|
"id": {
|
|
"entity_id": "input_select.wled_colors_palette",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "WLED effects input select",
|
|
"room": null,
|
|
"type": "input_select",
|
|
"id": {
|
|
"entity_id": "input_select.wled_effects",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "zigbee2mqtt_start",
|
|
"automation": "- alias: zigbee2mqtt_start\n id: zigbee2mqtt_start\n triggers:\n - trigger: mqtt\n topic: zigbee2mqtt/bridge/state\n actions:\n - repeat:\n for_each:\n - device: bed-light-1\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: bed-light-2\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: bed-light-3\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: bed-light-4\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: bed-light-5\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: bed-light-6\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: bed-light-7\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: bed-light-8\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: office-light-1\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: office-light-2\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: office-light-3\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: office-light-4\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: office-light-5\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: office-light-6\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: office-light-7\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: office-light-8\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: kitchen-light-1\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: kitchen-light-2\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: kitchen-light-3\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: kitchen-light-4\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: kitchen-light-5\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: kitchen-light-6\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: kitchen-light-7\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: living-light-1\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: living-light-2\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: living-light-3\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: living-light-4\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: living-light-5\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: living-light-6\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: living-light-7\n payload:\n state: ''\n brightness: ''\n color_temp: ''\n - device: kitchen-led\n payload:\n state: ''\n brightness: ''\n - device: hall-light\n payload:\n state_l1: ''\n state_l2: ''\n - device: bath-light\n payload:\n state_l1: ''\n state_l2: ''\n - device: bath-mirror\n payload:\n state_l1: ''\n state_l2: ''\n - device: wash-switch\n payload:\n state_l1: ''\n state_l2: ''\n - device: bath-mirror\n payload:\n state_l1: ''\n state_l2: ''\n - device: office-wardrobe\n payload:\n state: ''\n - device: bed-wardrobe\n payload:\n state: ''\n - device: bath-water\n payload:\n state_l1: ''\n state_l2: ''\n - device: wash-switch\n payload:\n state_l1: ''\n state_l2: ''\n - device: living-switch-tv\n payload:\n state: ''\n - device: bed-switch-1\n payload:\n state_l1: ''\n state_l2: ''\n sequence:\n - action: mqtt.publish\n data_template:\n topic: zigbee2mqtt/{{ repeat.item.device }}/get\n payload: '{{ repeat.item.payload | to_json }}'\n - action: mqtt.publish\n data:\n topic: zigbee2mqtt/bath-tvr/set\n payload: '{\"online\": \"on\"}'\n - delay:\n seconds: 1\n - action: mqtt.publish\n data:\n topic: zigbee2mqtt/bath-tvr/set\n payload: '{\"online\": \"off\"}'",
|
|
"config": []
|
|
}
|
|
] |