[ { "id": "'Control switches: kitchen Rodret dimmer switch sink'", "automation": "- alias: 'Control switches: kitchen Rodret dimmer switch sink'\n mode: restart\n max_exceeded: silent\n triggers:\n - trigger: event\n event_type: zha_event\n event_data:\n command: 'on'\n cluster_id: 6\n endpoint_id: 1\n id: press-on-zha\n - trigger: event\n event_type: zha_event\n event_data:\n command: 'off'\n cluster_id: 6\n endpoint_id: 1\n id: press-off-zha\n - trigger: event\n event_type: zha_event\n event_data:\n command: move_with_on_off\n cluster_id: 8\n endpoint_id: 1\n id: hold-on-zha\n - trigger: event\n event_type: zha_event\n event_data:\n command: move\n cluster_id: 8\n endpoint_id: 1\n id: hold-off-zha\n - trigger: event\n event_type: zha_event\n event_data:\n command: stop_with_on_off\n endpoint_id: 1\n cluster_id: 8\n id: release-zha\n variables:\n helper_force_brightness: false\n helper_hold_delay: 0.1\n helper_hold_dim_step: 4\n light: light.kitchen_sink\n remote_devices:\n - df5b9b63c997a2417895397f2d10f3bf\n remote_devices_names: '{{ remote_devices | map(''device_attr'', ''name'') | list\n }}'\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id: press-on-zha\n sequence:\n - choose:\n - conditions:\n - condition: template\n value_template: '{{ helper_force_brightness }}'\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.kitchen_sink\n data:\n brightness_pct: 50\n default:\n - action: light.turn_on\n target:\n entity_id: light.kitchen_sink\n data: {}\n - conditions:\n - condition: trigger\n id: press-off-zha\n sequence:\n - action: light.turn_off\n target:\n entity_id: light.kitchen_sink\n data: {}\n - conditions:\n - condition: trigger\n id: hold-on-zha\n sequence:\n - repeat:\n while:\n - condition: trigger\n id: hold-on-zha\n sequence:\n - parallel:\n - action: light.turn_on\n target:\n entity_id: light.kitchen_sink\n data:\n brightness_step_pct: '{{ helper_hold_dim_step }}'\n transition: '{{ helper_hold_delay }}'\n - delay: '{{ helper_hold_delay }}'\n - conditions:\n - condition: trigger\n id: hold-off-zha\n sequence:\n - variables:\n brightness_pct: '{{ iif(is_state(light, ''on''), state_attr(light, ''brightness''),\n 0) * 100 / 255 }}'\n total_iterations_to_zero: '{{ (brightness_pct / helper_hold_dim_step) |\n round(0, ''ceil'') }}'\n - repeat:\n count: '{{ total_iterations_to_zero - 1 }}'\n sequence:\n - parallel:\n - action: light.turn_on\n target:\n entity_id: light.kitchen_sink\n data:\n brightness_step_pct: '{{ helper_hold_dim_step | int * -1 }}'\n transition: '{{ helper_hold_delay }}'\n - delay: '{{ helper_hold_delay }}'\n - action: light.turn_on\n target:\n entity_id: light.kitchen_sink\n data:\n brightness_pct: 1\n transition: '{{ helper_hold_delay }}'\n conditions:\n - condition: template\n value_template: '{{ (trigger.event.data.device_id in remote_devices) }}'", "config": [ { "name": "kitchen sink light", "room": "kitchen", "type": "light", "id": { "entity_id": "light.kitchen_sink", "device_id": null } }, { "name": "kitchen rodret dimmer switch", "room": "kitchen", "type": "device", "id": { "entity_id": null, "device_id": "df5b9b63c997a2417895397f2d10f3bf" } } ] }, { "id": "'Control switches: kitchen Rodret dimmer switch counters'", "automation": "- alias: 'Control switches: kitchen Rodret dimmer switch counters'\n mode: restart\n max_exceeded: silent\n triggers:\n - trigger: event\n event_type: zha_event\n event_data:\n command: 'on'\n cluster_id: 6\n endpoint_id: 1\n id: press-on-zha\n - trigger: event\n event_type: zha_event\n event_data:\n command: 'off'\n cluster_id: 6\n endpoint_id: 1\n id: press-off-zha\n - trigger: event\n event_type: zha_event\n event_data:\n command: move_with_on_off\n cluster_id: 8\n endpoint_id: 1\n id: hold-on-zha\n - trigger: event\n event_type: zha_event\n event_data:\n command: move\n cluster_id: 8\n endpoint_id: 1\n id: hold-off-zha\n - trigger: event\n event_type: zha_event\n event_data:\n command: stop_with_on_off\n endpoint_id: 1\n cluster_id: 8\n id: release-zha\n variables:\n helper_force_brightness: false\n helper_hold_delay: 0.1\n helper_hold_dim_step: 4\n light: light.kitchen_countertop\n remote_devices:\n - df5b9b63c997a2417895397f2d10f3bf\n remote_devices_names: '{{ remote_devices | map(''device_attr'', ''name'') | list\n }}'\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id: press-on-zha\n sequence:\n - choose:\n - conditions:\n - condition: template\n value_template: '{{ helper_force_brightness }}'\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.kitchen_countertop\n data:\n brightness_pct: 50\n default:\n - action: light.turn_on\n target:\n entity_id: light.kitchen_countertop\n data: {}\n - conditions:\n - condition: trigger\n id: press-off-zha\n sequence:\n - action: light.turn_off\n target:\n entity_id: light.kitchen_countertop\n data: {}\n - conditions:\n - condition: trigger\n id: hold-on-zha\n sequence:\n - repeat:\n while:\n - condition: trigger\n id: hold-on-zha\n sequence:\n - parallel:\n - action: light.turn_on\n target:\n entity_id: light.kitchen_countertop\n data:\n brightness_step_pct: '{{ helper_hold_dim_step }}'\n transition: '{{ helper_hold_delay }}'\n - delay: '{{ helper_hold_delay }}'\n - conditions:\n - condition: trigger\n id: hold-off-zha\n sequence:\n - variables:\n brightness_pct: '{{ iif(is_state(light, ''on''), state_attr(light, ''brightness''),\n 0) * 100 / 255 }}'\n total_iterations_to_zero: '{{ (brightness_pct / helper_hold_dim_step) |\n round(0, ''ceil'') }}'\n - repeat:\n count: '{{ total_iterations_to_zero - 1 }}'\n sequence:\n - parallel:\n - action: light.turn_on\n target:\n entity_id: light.kitchen_countertop\n data:\n brightness_step_pct: '{{ helper_hold_dim_step | int * -1 }}'\n transition: '{{ helper_hold_delay }}'\n - delay: '{{ helper_hold_delay }}'\n - action: light.turn_on\n target:\n entity_id: light.kitchen_countertop\n data:\n brightness_pct: 1\n transition: '{{ helper_hold_delay }}'\n conditions:\n - condition: template\n value_template: '{{ (trigger.event.data.device_id in remote_devices) }}'", "config": [ { "name": "kitchen countertop light", "room": "kitchen", "type": "light", "id": { "entity_id": "light.kitchen_countertop", "device_id": null } }, { "name": "kitchen rodret dimmer switch", "room": "kitchen", "type": "device", "id": { "entity_id": null, "device_id": "df5b9b63c997a2417895397f2d10f3bf" } } ] }, { "id": "'Control switches: office Rodret dimmer switch bookcases'", "automation": "- alias: 'Control switches: office Rodret dimmer switch bookcases'\n mode: restart\n max_exceeded: silent\n triggers:\n - trigger: event\n event_type: zha_event\n event_data:\n command: 'on'\n cluster_id: 6\n endpoint_id: 1\n id: press-on-zha\n - trigger: event\n event_type: zha_event\n event_data:\n command: 'off'\n cluster_id: 6\n endpoint_id: 1\n id: press-off-zha\n - trigger: event\n event_type: zha_event\n event_data:\n command: move_with_on_off\n cluster_id: 8\n endpoint_id: 1\n id: hold-on-zha\n - trigger: event\n event_type: zha_event\n event_data:\n command: move\n cluster_id: 8\n endpoint_id: 1\n id: hold-off-zha\n - trigger: event\n event_type: zha_event\n event_data:\n command: stop_with_on_off\n endpoint_id: 1\n cluster_id: 8\n id: release-zha\n variables:\n helper_force_brightness: false\n helper_hold_delay: 0.1\n helper_hold_dim_step: 4\n light: light.office_bookcases\n remote_devices:\n - 8b9d1a82015ce6dcacc147b0beba435a\n remote_devices_names: '{{ remote_devices | map(''device_attr'', ''name'') | list\n }}'\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id: press-on-zha\n sequence:\n - choose:\n - conditions:\n - condition: template\n value_template: '{{ helper_force_brightness }}'\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.office_bookcases\n data:\n brightness_pct: 50\n default:\n - action: light.turn_on\n target:\n entity_id: light.office_bookcases\n data: {}\n - conditions:\n - condition: trigger\n id: press-off-zha\n sequence:\n - action: light.turn_off\n target:\n entity_id: light.office_bookcases\n data: {}\n - conditions:\n - condition: trigger\n id: hold-on-zha\n sequence:\n - repeat:\n while:\n - condition: trigger\n id: hold-on-zha\n sequence:\n - parallel:\n - action: light.turn_on\n target:\n entity_id: light.office_bookcases\n data:\n brightness_step_pct: '{{ helper_hold_dim_step }}'\n transition: '{{ helper_hold_delay }}'\n - delay: '{{ helper_hold_delay }}'\n - conditions:\n - condition: trigger\n id: hold-off-zha\n sequence:\n - variables:\n brightness_pct: '{{ iif(is_state(light, ''on''), state_attr(light, ''brightness''),\n 0) * 100 / 255 }}'\n total_iterations_to_zero: '{{ (brightness_pct / helper_hold_dim_step) |\n round(0, ''ceil'') }}'\n - repeat:\n count: '{{ total_iterations_to_zero - 1 }}'\n sequence:\n - parallel:\n - action: light.turn_on\n target:\n entity_id: light.office_bookcases\n data:\n brightness_step_pct: '{{ helper_hold_dim_step | int * -1 }}'\n transition: '{{ helper_hold_delay }}'\n - delay: '{{ helper_hold_delay }}'\n - action: light.turn_on\n target:\n entity_id: light.office_bookcases\n data:\n brightness_pct: 1\n transition: '{{ helper_hold_delay }}'\n conditions:\n - condition: template\n value_template: '{{ (trigger.event.data.device_id in remote_devices) }}'", "config": [ { "name": "office bookcases light", "room": "office", "type": "light", "id": { "entity_id": "light.office_bookcases", "device_id": null } }, { "name": "office rodret dimmer switch", "room": "office", "type": "device", "id": { "entity_id": null, "device_id": "8b9d1a82015ce6dcacc147b0beba435a" } } ] }, { "id": "'Leaving: ask to turn off everything'", "automation": "- alias: 'Leaving: ask to turn off everything'\n triggers:\n - trigger: state\n entity_id: person.fouppy\n from: home\n - trigger: state\n entity_id: person.moom\n from: home\n conditions:\n - condition: state\n entity_id:\n - binary_sensor.no_one_home\n - binary_sensor.anything_on\n state: 'on'\n actions:\n - delay: 00:05:00\n - condition: state\n entity_id: binary_sensor.no_one_home\n state: 'on'\n - action: notify.phone_fouppy\n data:\n message: No one is home, turn off everything?\n data:\n actions:\n - action: TURN_OFF_EVERYTHING\n title: Turn off everything\n activationMode: background\n authenticationRequired: false\n destructive: true", "config": [ { "name": "fouppy person", "room": null, "type": "person", "id": { "entity_id": "person.fouppy", "device_id": null } }, { "name": "moom person", "room": null, "type": "person", "id": { "entity_id": "person.moom", "device_id": null } }, { "name": "no one home sensor", "room": null, "type": "binary_sensor", "id": { "entity_id": "binary_sensor.no_one_home", "device_id": null } }, { "name": "anything on sensor", "room": null, "type": "binary_sensor", "id": { "entity_id": "binary_sensor.anything_on", "device_id": null } }, { "name": "phone fouppy notification", "room": null, "type": "notify", "id": { "entity_id": "notify.phone_fouppy", "device_id": null } } ] }, { "id": "'Leaving: turn off everything after notification'", "automation": "- alias: 'Leaving: turn off everything after notification'\n triggers:\n trigger: event\n event_type: mobile_app_notification_action\n event_data:\n action: TURN_OFF_EVERYTHING\n actions:\n action: script.leaving", "config": [ { "name": "leaving script", "room": null, "type": "script", "id": { "entity_id": "script.leaving", "device_id": null } } ] }, { "id": "'System: warning about high CPU usage'", "automation": "- alias: 'System: warning about high CPU usage'\n triggers:\n trigger: numeric_state\n entity_id: sensor.system_monitor_processor_use\n above: 70\n for:\n hours: 4\n actions:\n action: notify.phone_fouppy\n data:\n title: System\n message: CPU usage has been above 70% for 4 hours! ⚠️🖥", "config": [ { "name": "phone fouppy notification", "room": null, "type": "notify", "id": { "entity_id": "notify.phone_fouppy", "device_id": null } }, { "name": "system monitor processor use sensor", "room": null, "type": "sensor", "id": { "entity_id": "sensor.system_monitor_processor_use", "device_id": null } } ] }, { "id": "'System: warning about high CPU temperature'", "automation": "- alias: 'System: warning about high CPU temperature'\n triggers:\n trigger: numeric_state\n entity_id: sensor.cpu_temperature_mean\n above: 70\n for:\n hours: 4\n actions:\n action: notify.phone_fouppy\n data:\n title: System\n message: CPU temperature has been above 70 °C for 4 hours! ⚠️", "config": [ { "name": "phone fouppy notification", "room": null, "type": "notify", "id": { "entity_id": "notify.phone_fouppy", "device_id": null } }, { "name": "cpu temperature mean sensor", "room": null, "type": "sensor", "id": { "entity_id": "sensor.cpu_temperature_mean", "device_id": null } } ] }, { "id": "'System: battery level low'", "automation": "- alias: 'System: battery level low'\n triggers:\n trigger: time\n at: '14:30:00'\n variables:\n min_battery_level: 50\n notify_service: notify.phone_fouppy\n battery_ids: ''\n current: ''\n actions:\n - variables:\n battery_ids: \"{% set ns = namespace(battery=[]) %} {% for s in states.sensor\\\n \\ if 'battery_level' in s.entity_id %}\\n {% set ns.battery = ns.battery +\\\n \\ [s] %}\\n{% endfor %} {{ ns.battery | map(attribute='entity_id') | list }}\\n\"\n - alias: Repeat\n repeat:\n count: '{{ battery_ids | length }}'\n sequence:\n - variables:\n current: '{{ battery_ids[repeat.index - 1] }}'\n - condition: template\n value_template: '{{ ''iphone'' not in current and ''1+8'' not in current }}'\n - condition: template\n value_template: '{{ 0 < (states(current) | float) < (min_battery_level | float\n ) }}'\n - action: '{{ notify_service }}'\n data:\n title: System\n message: 'Battery level low of {{ current }}: {{ states(current) }}%! ⚠️'", "config": [ { "name": "phone fouppy notification", "room": null, "type": "notify", "id": { "entity_id": "notify.phone_fouppy", "device_id": null } } ] }, { "id": "'System: SpeedTest'", "automation": "- alias: 'System: SpeedTest'\n triggers:\n - trigger: time_pattern\n hours: /1\n conditions: []\n actions:\n - action: script.update_speedtest\n mode: single", "config": [ { "name": "update speedtest script", "room": null, "type": "script", "id": { "entity_id": "script.update_speedtest", "device_id": null } } ] }, { "id": "'Utilities: washing machine or dishwasher started or finished'", "automation": "- alias: 'Utilities: washing machine or dishwasher started or finished'\n triggers:\n - trigger: state\n entity_id: binary_sensor.dishwasher\n - trigger: state\n entity_id: binary_sensor.washing_machine\n variables:\n from_state: '{{ trigger.from_state.state }}'\n to_state: '{{ trigger.to_state.state }}'\n name: '{{ trigger.entity_id.split(''.'', 1)[1] }}'\n conditions: '{{ (to_state == ''on'' and from_state == ''off'') or (to_state == ''off''\n and from_state == ''on'') }}'\n actions:\n action: input_datetime.set_datetime\n data:\n entity_id: input_datetime.{{ name }}_{{ to_state }}\n timestamp: '{{ now().timestamp() }}'", "config": [ { "name": "dishwasher sensor", "room": null, "type": "binary_sensor", "id": { "entity_id": "binary_sensor.dishwasher", "device_id": null } }, { "name": "washing machine sensor", "room": null, "type": "binary_sensor", "id": { "entity_id": "binary_sensor.washing_machine", "device_id": null } } ] }, { "id": "'Utilities: washing machine notification'", "automation": "- alias: 'Utilities: washing machine notification'\n triggers:\n trigger: state\n entity_id: binary_sensor.washing_machine\n from: 'on'\n to: 'off'\n actions:\n action: script.utility_notification\n data:\n name: Washing machine\n emojis: 👚👕", "config": [ { "name": "washing machine sensor", "room": null, "type": "binary_sensor", "id": { "entity_id": "binary_sensor.washing_machine", "device_id": null } }, { "name": "utility notification script", "room": null, "type": "script", "id": { "entity_id": "script.utility_notification", "device_id": null } } ] }, { "id": "'Utilities: dishwasher notification'", "automation": "- alias: 'Utilities: dishwasher notification'\n triggers:\n trigger: state\n entity_id: binary_sensor.dishwasher\n from: 'on'\n to: 'off'\n actions:\n action: script.utility_notification\n data:\n name: Dishwasher\n emojis: 🍽🍳", "config": [ { "name": "dishwasher sensor", "room": null, "type": "binary_sensor", "id": { "entity_id": "binary_sensor.dishwasher", "device_id": null } }, { "name": "utility notification script", "room": null, "type": "script", "id": { "entity_id": "script.utility_notification", "device_id": null } } ] }, { "id": "'Utilities: switch mosquito plug on'", "automation": "- alias: 'Utilities: switch mosquito plug on'\n mode: single\n triggers:\n - trigger: time\n at: '20:00:00'\n actions:\n - action: switch.turn_on\n target:\n entity_id: switch.living_room_mosquito_plug", "config": [ { "name": "living room mosquito plug switch", "room": "living_room", "type": "switch", "id": { "entity_id": "switch.living_room_mosquito_plug", "device_id": null } } ] }, { "id": "'Utilities: switch mosquito plug off'", "automation": "- alias: 'Utilities: switch mosquito plug off'\n mode: single\n triggers:\n - trigger: time\n at: 08:00:00\n actions:\n - action: switch.turn_off\n target:\n entity_id: switch.living_room_mosquito_plug", "config": [ { "name": "living room mosquito plug switch", "room": "living_room", "type": "switch", "id": { "entity_id": "switch.living_room_mosquito_plug", "device_id": null } } ] }, { "id": "'Work: Fouppy left work notification for MooM'", "automation": "- alias: 'Work: Fouppy left work notification for MooM'\n triggers:\n trigger: state\n entity_id: person.fouppy\n from: Fouppy Work\n conditions:\n condition: time\n after: '15:00:00'\n before: '22:00:00'\n actions:\n action: notify.phone_moom\n data:\n title: Work\n message: Fouppy has left work! ♥️🎉", "config": [ { "name": "fouppy person", "room": null, "type": "person", "id": { "entity_id": "person.fouppy", "device_id": null } }, { "name": "phone moom notification", "room": null, "type": "notify", "id": { "entity_id": "notify.phone_moom", "device_id": null } } ] }, { "id": "'Work: MooM left work notification for Fouppy'", "automation": "- alias: 'Work: MooM left work notification for Fouppy'\n triggers:\n trigger: state\n entity_id: person.moom\n from: MooM Work\n conditions:\n condition: time\n after: '15:00:00'\n before: '22:00:00'\n actions:\n action: notify.phone_fouppy\n data:\n title: Work\n message: MooM has left work! ♥️🎉", "config": [ { "name": "moom person", "room": null, "type": "person", "id": { "entity_id": "person.moom", "device_id": null } }, { "name": "phone fouppy notification", "room": null, "type": "notify", "id": { "entity_id": "notify.phone_fouppy", "device_id": null } } ] } ]