[ { "id": "d84b108c-44e8-4df9-ba5d-2cb83f38dee9", "automation": "- id: d84b108c-44e8-4df9-ba5d-2cb83f38dee9\n alias: Auto security arming mode\n description: 'When I turned on the auto security mode, I want the security\n\n system to be turned on in these conditions:\n\n\n - When I turned on the away mode\n\n - When I''m sleeping (no devices online and it''s a certain time)'\n trigger:\n - alias: Away mode turned on\n platform: state\n entity_id:\n - input_boolean.away_mode\n from: 'off'\n to: 'on'\n id: Away mode turned on\n - alias: Away mode turned off\n platform: state\n entity_id:\n - input_boolean.away_mode\n from: 'on'\n to: 'off'\n id: Away mode turned off\n - alias: Night time check\n platform: time_pattern\n minutes: /5\n id: Night time check\n - alias: People home\n platform: state\n entity_id:\n - binary_sensor.people_home\n from: 'off'\n to: 'on'\n id: People are home\n condition:\n - condition: state\n entity_id: input_boolean.auto_security_arming_mode\n state: 'on'\n action:\n - choose:\n - conditions:\n - alias: Away mode turned on\n condition: and\n conditions:\n - condition: trigger\n id: Away mode turned on\n - condition: template\n value_template: '{{ not is_state(''alarm_control_panel.security_alarm'',\n ''armed_away'') }}'\n sequence:\n - alias: Turn on security alarm\n service: alarm_control_panel.alarm_arm_away\n target:\n entity_id: alarm_control_panel.security_alarm\n - conditions:\n - alias: Away mode turned off\n condition: and\n conditions:\n - condition: trigger\n id: Away mode turned off\n - condition: state\n entity_id: alarm_control_panel.security_alarm\n state: armed_away\n sequence:\n - &id001\n alias: Arm home\n service: alarm_control_panel.alarm_arm_home\n target:\n entity_id: alarm_control_panel.security_alarm\n - conditions:\n - alias: Night time\n condition: and\n conditions:\n - condition: trigger\n id: Night time check\n - condition: state\n entity_id: binary_sensor.probably_sleeping\n state: 'on'\n - condition: template\n value_template: '{{ not is_state(''alarm_control_panel.security_alarm'',\n ''armed_night'') }}'\n sequence:\n - alias: Turn on security alarm\n service: alarm_control_panel.alarm_arm_night\n target:\n entity_id: alarm_control_panel.security_alarm\n - conditions:\n - alias: Day time\n condition: and\n conditions:\n - condition: trigger\n id: Night time check\n - condition: state\n entity_id: binary_sensor.probably_sleeping\n state: 'off'\n - condition: state\n entity_id: alarm_control_panel.security_alarm\n state: armed_night\n sequence:\n - *id001\n - conditions:\n - alias: People are home\n condition: and\n conditions:\n - condition: trigger\n id: People are home\n - condition: template\n value_template: '{{ not is_state(''alarm_control_panel.security_alarm'',\n ''armed_home'') }}'\n sequence:\n - *id001", "config": [ { "name": "auto security arming mode", "room": null, "type": "input_boolean", "id": { "entity_id": "input_boolean.auto_security_arming_mode", "device_id": null } }, { "name": "away mode", "room": null, "type": "input_boolean", "id": { "entity_id": "input_boolean.away_mode", "device_id": null } }, { "name": "security alarm", "room": null, "type": "alarm_control_panel", "id": { "entity_id": "alarm_control_panel.security_alarm", "device_id": null } }, { "name": "people home", "room": null, "type": "binary_sensor", "id": { "entity_id": "binary_sensor.people_home", "device_id": null } }, { "name": "probably sleeping", "room": null, "type": "binary_sensor", "id": { "entity_id": "binary_sensor.probably_sleeping", "device_id": null } } ] }, { "id": "3619ec5b-8463-449a-8bf0-5bac911b1ee4", "automation": "- id: 3619ec5b-8463-449a-8bf0-5bac911b1ee4\n mode: parallel\n max_exceeded: silent\n alias: Door open notification automation\n description: Send a notfication to my phone when the door is open.\n trigger:\n - platform: state\n entity_id:\n - binary_sensor.garage_door_contact\n - binary_sensor.entrance_door_contact\n - binary_sensor.storage_door1_contact\n - binary_sensor.storage_door2_contact\n action:\n - variables:\n entity_tag: '{{ ''open_door_tag_'' ~ trigger.entity_id }}'\n - choose:\n - conditions:\n - condition: template\n value_template: '{{ is_state(trigger.entity_id, ''on'') }}'\n sequence:\n - service: notify.mobile_app_pixel_7\n data:\n title: '{{states[trigger.entity_id].attributes.friendly_name}} is open.'\n message: Open since {{ states('sensor.time') }}\n data:\n notification_icon: mdi:door-open\n tag: '{{ entity_tag }}'\n sticky: 'true'\n actions:\n - action: URI\n title: Open\n uri: entityId:{{trigger.entity_id}}\n - conditions:\n - condition: template\n value_template: '{{ is_state(trigger.entity_id, ''off'') }}'\n sequence:\n - service: notify.mobile_app_pixel_7\n data:\n message: clear_notification\n data:\n tag: '{{ entity_tag }}'", "config": [ { "name": "garage door contact", "room": "garage", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.garage_door_contact", "device_id": null } }, { "name": "entrance door contact", "room": "entrance", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.entrance_door_contact", "device_id": null } }, { "name": "storage door1 contact", "room": "storage", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.storage_door1_contact", "device_id": null } }, { "name": "storage door2 contact", "room": "storage", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.storage_door2_contact", "device_id": null } }, { "name": "mobile app pixel 7", "room": null, "type": "notify", "id": { "entity_id": "notify.mobile_app_pixel_7", "device_id": null } }, { "name": "time sensor", "room": null, "type": "sensor", "id": { "entity_id": "sensor.time", "device_id": null } } ] }, { "id": "f8700e07-1e98-4c0e-bc76-72cb293811d9", "automation": "- id: f8700e07-1e98-4c0e-bc76-72cb293811d9\n mode: parallel\n max_exceeded: silent\n alias: Entity unavailable detection\n description: This automation notfies me if an entity went unavailable. But also\n it deletes the notification if the entity goes into normal state again. I don't\n care then...\n trigger:\n - platform: event\n event_type: state_changed\n condition:\n - condition: template\n value_template: \"{{\\n trigger.event.data.new_state.state == 'unavailable'\\n \\\n \\ or trigger.event.data.old_state.state == 'unavailable'\\n}}\"\n variables:\n excluded_entities:\n - light.lunch_light1\n - select.lunch_light1_power_on_behavior\n - update.lunch_light1\n - light.lunch_light2\n - select.lunch_light2_power_on_behavior\n - update.lunch_light2\n - light.lunch_light3\n - select.lunch_light3_power_on_behavior\n - update.lunch_light3\n - light.bedroom_light1\n - select.bedroom_light1_power_on_behavior\n - update.bedroom_light1\n - light.bedroom_light2\n - select.bedroom_light2_power_on_behavior\n - update.bedroom_light2\n - light.bedroom_light3\n - select.bedroom_light3_power_on_behavior\n - update.bedroom_light3\n - light.bedroom_lights\n - button.lg_webos_tv_fa22_identify\n - media_player.lg_webos_tv_fa22\n - switch.lg_webos_tv_fa22_mute\n action:\n - variables:\n entity_tag: '{{ ''unavailable_tag_'' ~ trigger.event.data.entity_id }}'\n - choose:\n - conditions:\n - condition: template\n value_template: \"{{\\n trigger.event.data.new_state.state == 'unavailable'\\n\\\n \\ and trigger.event.data.entity_id not in excluded_entities\\n}}\"\n sequence:\n - service: notify.mobile_app_pixel_7\n data:\n title: Entity {{states[trigger.event.data.entity_id].attributes.friendly_name}}\n went unavailable.\n message: Whats wrong?\n data:\n tag: '{{ entity_tag }}'\n actions:\n - action: URI\n title: Open {{trigger.event.data.entity_id}}\n uri: entityId:{{trigger.event.data.entity_id}}\n - conditions:\n - condition: template\n value_template: \"{{\\n trigger.event.data.old_state.state == 'unavailable'\\n\\\n \\ and trigger.event.data.entity_id not in excluded_entities\\n}}\"\n sequence:\n - service: notify.mobile_app_pixel_7\n data:\n message: clear_notification\n data:\n tag: '{{ entity_tag }}'", "config": [ { "name": "mobile app pixel 7", "room": null, "type": "notify", "id": { "entity_id": "notify.mobile_app_pixel_7", "device_id": null } }, { "name": "bedroom lights", "room": "bedroom", "type": "light", "id": { "entity_id": "light.bedroom_lights", "device_id": null } } ] }, { "id": "659d017f-b25c-447d-8651-488e1a8c3c54", "automation": "- id: 659d017f-b25c-447d-8651-488e1a8c3c54\n alias: Extractor hood power switcher\n trigger:\n - platform: state\n entity_id: binary_sensor.kitchen_door_contact\n action:\n - choose:\n - conditions: '{{trigger.to_state.state == ''on''}}'\n sequence:\n - service: homeassistant.turn_on\n target:\n entity_id: switch.kitchen_powerplug\n - conditions: '{{trigger.to_state.state == ''off''}}'\n sequence:\n - service: homeassistant.turn_off\n target:\n entity_id: switch.kitchen_powerplug", "config": [ { "name": "kitchen door contact", "room": "kitchen", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.kitchen_door_contact", "device_id": null } }, { "name": "kitchen powerplug", "room": "kitchen", "type": "switch", "id": { "entity_id": "switch.kitchen_powerplug", "device_id": null } } ] }, { "id": "0f2f1eeb-b028-470e-b835-cf2a0fb23a1d", "automation": "- id: 0f2f1eeb-b028-470e-b835-cf2a0fb23a1d\n mode: queued\n max_exceeded: silent\n alias: Fire detection automation\n description: This automation detects unusualy high temperatures and sends me a notification\n in multiple ways.\n variables:\n maybe_fire_temperature: '{{ states(''input_number.maybe_fire_temperature'') |\n int }}'\n trigger:\n - platform: event\n event_type: state_changed\n condition:\n - condition: template\n value_template: \"{{\\n trigger.event.data.entity_id is match('^sensor\\\\.[a-z0-9_]+_(?:door|window|temp|co2meter)_temperature')\\n\\\n \\ and trigger.event.data.new_state.state | int(0) >= maybe_fire_temperature\\n\\\n }}\"\n action:\n - service: notify.mobile_app_pixel_7\n data:\n title: Possible fire detected\n message: 'This entity triggered the automation was: {{trigger.event.data.entity_id}}'\n data:\n ttl: 0\n priority: high\n channel: alarm_stream\n notification_icon: mdi:alarm-light\n color: red\n - service: hassio.addon_stdin\n data:\n addon: ad61c150_dss_voip\n input:\n call_sip_uri: secret emergency_sip_uri\n message_tts: The sensor {{states[trigger.event.data.entity_id].attributes.friendly_name}}\n is getting really hot. Please check it out.", "config": [ { "name": "mobile app pixel 7", "room": null, "type": "notify", "id": { "entity_id": "notify.mobile_app_pixel_7", "device_id": null } }, { "name": "maybe fire temperature", "room": null, "type": "input_number", "id": { "entity_id": "input_number.maybe_fire_temperature", "device_id": null } } ] }, { "id": "77d67d99-e18d-4b2f-b4ea-c17b2facc68e", "automation": "- id: 77d67d99-e18d-4b2f-b4ea-c17b2facc68e\n mode: queued\n max_exceeded: silent\n trace:\n stored_traces: 25\n alias: Garage detection alarm trigger\n description: This automation detects suspicious activity in the garage room. When\n this automation is triggered, a security alarm will be triggered.\n trigger:\n - platform: event\n event_type: state_changed\n event_data:\n entity_id: binary_sensor.garage_door_contact\n condition:\n - condition: template\n value_template: \"{{\\n trigger.event.data.old_state.state == 'off'\\n and trigger.event.data.new_state.state\\\n \\ == 'on'\\n and is_state('input_boolean.watch_garage_activities', 'on')\\n}}\"\n action:\n - service: input_text.set_value\n target:\n entity_id: input_text.last_security_alarm_entity\n data:\n value: '{{state_attr(trigger.event.data.entity_id, ''friendly_name'')}}'\n - service: alarm_control_panel.alarm_trigger\n target:\n entity_id: alarm_control_panel.security_alarm", "config": [ { "name": "security alarm", "room": null, "type": "alarm_control_panel", "id": { "entity_id": "alarm_control_panel.security_alarm", "device_id": null } }, { "name": "garage door contact", "room": "garage", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.garage_door_contact", "device_id": null } }, { "name": "watch garage activities", "room": "garage", "type": "input_boolean", "id": { "entity_id": "input_boolean.watch_garage_activities", "device_id": null } }, { "name": "last security alarm entity", "room": null, "type": "input_text", "id": { "entity_id": "input_text.last_security_alarm_entity", "device_id": null } } ] }, { "id": "20f819ae-a995-4690-b73f-ecab935f5405", "automation": "- id: 20f819ae-a995-4690-b73f-ecab935f5405\n alias: Gentle lights alarm automation\n description: This automation slowly turns on the lights in my bedroom to help me\n wake up in a gentle way.\n variables:\n transition_seconds: \"{{\\n states('input_number.wakeup_transition_minutes') |\\\n \\ int(1) * 60\\n}}\"\n wakeup_brightness: \"{{\\n states('input_number.wakeup_brightness') | int(1)\\n\\\n }}\"\n trigger:\n - platform: time\n at: input_datetime.wakeup_time_workday\n id: Work\n - platform: time\n at: input_datetime.wakeup_time\n id: No Work\n condition:\n - condition: template\n value_template: \"{{\\n is_state('light.bedroom_lights', 'off')\\n and is_state('input_boolean.away_mode',\\\n \\ 'off')\\n and is_state('input_boolean.no_wakeup_mode', 'off')\\n}}\"\n action:\n - choose:\n - conditions:\n - alias: Workday\n condition: and\n conditions:\n - condition: trigger\n id: Work\n - condition: state\n entity_id: binary_sensor.must_work_today\n state: 'on'\n sequence:\n - service: light.turn_on\n target:\n entity_id: light.bedroom_lights\n data:\n brightness_pct: 1\n - service: light.turn_on\n target:\n entity_id: light.bedroom_lights\n data:\n brightness_pct: '{{ wakeup_brightness }}'\n transition: '{{ transition_seconds }}'\n - conditions:\n - alias: No Workday\n condition: and\n conditions:\n - condition: trigger\n id: No Work\n - condition: state\n entity_id: binary_sensor.must_work_today\n state: 'off'\n sequence:\n - service: light.turn_on\n target:\n entity_id: light.bedroom_lights\n data:\n brightness_pct: 1\n - service: light.turn_on\n target:\n entity_id: light.bedroom_lights\n data:\n brightness_pct: '{{ wakeup_brightness }}'\n transition: '{{ transition_seconds }}'", "config": [ { "name": "away mode", "room": null, "type": "input_boolean", "id": { "entity_id": "input_boolean.away_mode", "device_id": null } }, { "name": "wakeup transition minutes", "room": null, "type": "input_number", "id": { "entity_id": "input_number.wakeup_transition_minutes", "device_id": null } }, { "name": "wakeup brightness", "room": null, "type": "input_number", "id": { "entity_id": "input_number.wakeup_brightness", "device_id": null } }, { "name": "wakeup time workday", "room": null, "type": "input_datetime", "id": { "entity_id": "input_datetime.wakeup_time_workday", "device_id": null } }, { "name": "wakeup time", "room": null, "type": "input_datetime", "id": { "entity_id": "input_datetime.wakeup_time", "device_id": null } }, { "name": "no wakeup mode", "room": null, "type": "input_boolean", "id": { "entity_id": "input_boolean.no_wakeup_mode", "device_id": null } }, { "name": "must work today", "room": null, "type": "binary_sensor", "id": { "entity_id": "binary_sensor.must_work_today", "device_id": null } }, { "name": "bedroom lights", "room": "bedroom", "type": "light", "id": { "entity_id": "light.bedroom_lights", "device_id": null } } ] }, { "id": "6b0f392f-9afd-4db4-bde7-f961f5391ada", "automation": "- id: 6b0f392f-9afd-4db4-bde7-f961f5391ada\n mode: single\n alias: High humdity in baths detection\n description: 'This automation detects high humidity in my bathrooms.\n\n\n High humidity is bad because it can lead to mold. I\n\n should therefore always try to get it down to 50-60%.\n\n Most problematic for this problem are baths, because\n\n the humidity after taking is shower is usually very\n\n high.'\n variables:\n high_humidity: '{{ states(''input_number.bathroom_setting_humidity_high'') | int\n }}'\n bath_sensors: &id002\n - sensor.bath1_temp_humidity\n high_humidity_sensors: \"{% for i in bath_sensors %}\\n {% if states(i) | int >=\\\n \\ high_humidity %}\\n - {{ states[i].attributes.friendly_name }} ({{ states(i)\\\n \\ }}%)\\n {% endif %}\\n{% endfor %}\"\n trigger:\n - platform: state\n entity_id: *id002\n condition: '{{ high_humidity_sensors != '''' and is_state(''binary_sensor.probably_sleeping'',\n ''off'') }}'\n action:\n - variables:\n action_cooldown15: '{{ ''COOLDOWN15_'' ~ context.id }}'\n action_cooldown60: '{{ ''COOLDOWN60_'' ~ context.id }}'\n action_cooldown300: '{{ ''COOLDOWN300_'' ~ context.id }}'\n - service: notify.mobile_app_pixel_7\n data:\n title: Some sensors with high humidity have been found!\n message: \"The humidity of the following sensors are\\nhigher than {{high_humidity}}%:\\n\\\n \\ {{high_humidity_sensors}}\"\n data:\n color: yellow\n notification_icon: mdi:water-percent\n actions:\n - action: '{{ action_cooldown15 }}'\n title: 15 mins\n - action: '{{ action_cooldown60 }}'\n title: 1 h\n - action: '{{ action_cooldown300 }}'\n title: 3 h\n - wait_for_trigger:\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_cooldown15 }}'\n id: Option One\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_cooldown60 }}'\n id: Option Two\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_cooldown300 }}'\n id: Option Three\n timeout: 01:00:00\n continue_on_timeout: false\n - choose:\n - conditions: '{{ wait.trigger.id == ''Option One'' }}'\n sequence:\n - delay: 00:15\n - conditions: '{{ wait.trigger.id == ''Option Two'' }}'\n sequence:\n - delay: 01:00\n - conditions: '{{ wait.trigger.id == ''Option Two'' }}'\n sequence:\n - delay: 03:00", "config": [ { "name": "probably sleeping", "room": null, "type": "binary_sensor", "id": { "entity_id": "binary_sensor.probably_sleeping", "device_id": null } }, { "name": "mobile app pixel 7", "room": null, "type": "notify", "id": { "entity_id": "notify.mobile_app_pixel_7", "device_id": null } }, { "name": "bathroom setting humidity high", "room": "bathroom", "type": "input_number", "id": { "entity_id": "input_number.bathroom_setting_humidity_high", "device_id": null } }, { "name": "bath1 temp humidity", "room": "bathroom", "type": "sensor", "id": { "entity_id": "sensor.bath1_temp_humidity", "device_id": null } } ] }, { "id": "b3cc80e4-4039-4052-81c9-f8c25b6bc07a", "automation": "- id: b3cc80e4-4039-4052-81c9-f8c25b6bc07a\n mode: single\n alias: High humdity in garage detection\n description: 'This automation detects high humidity in my garage.\n\n\n High humidity is bad because it can lead to mold. I\n\n should therefore always try to get it down to 50-60%.'\n variables:\n high_humidity: '{{ states(''input_number.garage_setting_humidity_high'') | int\n | default(80) }}'\n garage_sensors: &id003\n - sensor.garage_temp_humidity\n high_humidity_sensors: \"{% for i in garage_sensors %}\\n {% if states(i) | int\\\n \\ >= high_humidity %}\\n - {{ states[i].attributes.friendly_name }} ({{ states(i)\\\n \\ }}%)\\n {% endif %}\\n{% endfor %}\"\n trigger:\n - platform: state\n entity_id: *id003\n condition: '{{ high_humidity_sensors != '''' }}'\n action:\n - variables:\n action_cooldown15: '{{ ''COOLDOWN15_'' ~ context.id }}'\n action_cooldown60: '{{ ''COOLDOWN60_'' ~ context.id }}'\n action_cooldown300: '{{ ''COOLDOWN300_'' ~ context.id }}'\n - service: notify.mobile_app_pixel_7\n data:\n title: Some sensors with high humidity have been found!\n message: \"The humidity of the following sensors are\\nhigher than {{high_humidity}}%:\\n\\\n \\ {{high_humidity_sensors}}\"\n data:\n color: yellow\n notification_icon: mdi:water-percent\n actions:\n - action: '{{ action_cooldown15 }}'\n title: 15 mins\n - action: '{{ action_cooldown60 }}'\n title: 1 h\n - action: '{{ action_cooldown300 }}'\n title: 3 h\n - wait_for_trigger:\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_cooldown15 }}'\n id: Option One\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_cooldown60 }}'\n id: Option Two\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_cooldown300 }}'\n id: Option Three\n timeout: 01:00:00\n continue_on_timeout: false\n - choose:\n - conditions: '{{ wait.trigger.id == ''Option One'' }}'\n sequence:\n - delay: 00:15\n - conditions: '{{ wait.trigger.id == ''Option Two'' }}'\n sequence:\n - delay: 01:00\n - conditions: '{{ wait.trigger.id == ''Option Two'' }}'\n sequence:\n - delay: 03:00", "config": [ { "name": "mobile app pixel 7", "room": null, "type": "notify", "id": { "entity_id": "notify.mobile_app_pixel_7", "device_id": null } }, { "name": "garage setting humidity high", "room": "garage", "type": "input_number", "id": { "entity_id": "input_number.garage_setting_humidity_high", "device_id": null } }, { "name": "garage temp humidity", "room": "garage", "type": "sensor", "id": { "entity_id": "sensor.garage_temp_humidity", "device_id": null } } ] }, { "id": "68229927-07bf-4342-800b-20a291ce5ed5", "automation": "- id: 68229927-07bf-4342-800b-20a291ce5ed5\n trace:\n stored_traces: 25\n alias: Intercom to chime pipeline\n description: Triggers the chime if the intercom gets pressed.\n triggers:\n - trigger: state\n entity_id:\n - binary_sensor.vordereingang_ding_2\n to: 'on'\n actions:\n - action: homeassistant.turn_on\n target:\n entity_id: switch.wohnzimmer_play_ding_sound\n mode: single", "config": [ { "name": "vordereingang ding 2", "room": "entrance", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.vordereingang_ding_2", "device_id": null } }, { "name": "wohnzimmer play ding sound", "room": "living room", "type": "switch", "id": { "entity_id": "switch.wohnzimmer_play_ding_sound", "device_id": null } } ] }, { "id": "cc881516-1e51-4b9c-9542-c4b261ac98c9", "automation": "- id: cc881516-1e51-4b9c-9542-c4b261ac98c9\n mode: queued\n max_exceeded: silent\n trace:\n stored_traces: 25\n alias: Intrusion detection alarm trigger\n description: \"Detects unusual behaviour while I'm not at home or when I'm sleeping.\\n\\\n When this automation is triggered, a security alarm will be triggered.\\nThe following\\\n \\ things are considered unusual:\\n - A window was opened\\n - A door was opened\"\n variables:\n excluded_areas: '{{ states(''sensor.skip_security_in_areas'') }}'\n trigger:\n - platform: event\n event_type: state_changed\n condition:\n - condition: template\n value_template: \"{{\\n trigger.event.data.entity_id is match('^binary_sensor\\\\\\\n .[a-z0-9_]+_(?:door|window)[0-9]*_contact')\\n and trigger.event.data.old_state.state\\\n \\ == 'off'\\n and trigger.event.data.new_state.state == 'on'\\n}}\"\n - or:\n - condition: state\n entity_id: alarm_control_panel.security_alarm\n state: armed_away\n - and:\n - condition: state\n entity_id: alarm_control_panel.security_alarm\n state: armed_night\n - condition: template\n value_template: \"{{\\n area_name(trigger.event.data.entity_id) not in excluded_areas\\n\\\n }}\"\n action:\n - service: input_text.set_value\n target:\n entity_id: input_text.last_security_alarm_entity\n data:\n value: '{{state_attr(trigger.event.data.entity_id, ''friendly_name'')}}'\n - service: alarm_control_panel.alarm_trigger\n target:\n entity_id: alarm_control_panel.security_alarm", "config": [ { "name": "security alarm", "room": null, "type": "alarm_control_panel", "id": { "entity_id": "alarm_control_panel.security_alarm", "device_id": null } }, { "name": "last security alarm entity", "room": null, "type": "input_text", "id": { "entity_id": "input_text.last_security_alarm_entity", "device_id": null } }, { "name": "skip security in areas", "room": null, "type": "sensor", "id": { "entity_id": "sensor.skip_security_in_areas", "device_id": null } } ] }, { "id": "20f51e6a-1018-4ce5-bd7d-9e702ad1b3be", "automation": "- id: 20f51e6a-1018-4ce5-bd7d-9e702ad1b3be\n mode: single\n alias: Leaving but something is still open\n description: This automation sends me a notification if I leave the house and there\n are still any windows or doors open.\n trigger:\n - platform: state\n entity_id: binary_sensor.people_home\n to: 'off'\n for: 00:00:30\n condition: '{{ is_state(''binary_sensor.everything_closed'', ''off'') }}'\n action:\n - service: notify.mobile_app_pixel_7\n data:\n title: Door or window still open\n message: \"The following entities are still open, you might want to close them:\\n\\\n \\ {{ states('sensor.open_windows') }}\\n {{ states('sensor.open_doors') }}\"\n data:\n notification_icon: mdi:alert", "config": [ { "name": "people home", "room": null, "type": "binary_sensor", "id": { "entity_id": "binary_sensor.people_home", "device_id": null } }, { "name": "mobile app pixel 7", "room": null, "type": "notify", "id": { "entity_id": "notify.mobile_app_pixel_7", "device_id": null } }, { "name": "everything closed", "room": null, "type": "binary_sensor", "id": { "entity_id": "binary_sensor.everything_closed", "device_id": null } }, { "name": "open windows", "room": null, "type": "sensor", "id": { "entity_id": "sensor.open_windows", "device_id": null } }, { "name": "open doors", "room": null, "type": "sensor", "id": { "entity_id": "sensor.open_doors", "device_id": null } } ] }, { "id": "6467257e-8844-4d73-8ea2-cebb140f9a3e", "automation": "- id: 6467257e-8844-4d73-8ea2-cebb140f9a3e\n mode: single\n alias: Light still on reminder\n description: 'This automation reminds me to turn off some lights.\n\n\n Sometimes I turn on a light and forget to turn it off again.\n\n This automations aims to prevent this.'\n trigger:\n - platform: state\n entity_id: light.all_lights\n to: 'on'\n for: 00:{{ '%0.2d' | format(states('input_number.light_reminder_time')|int) }}:00\n condition: '{{ is_state(''input_boolean.light_reminder'', ''on'') }}'\n action:\n - variables:\n action_cooldown15: '{{ ''CLOSE_COOLDOWN15_'' ~ context.id }}'\n action_cooldown60: '{{ ''CLOSE_COOLDOWN60_'' ~ context.id }}'\n action_cooldown300: '{{ ''CLOSE_COOLDOWN300_'' ~ context.id }}'\n - alias: Keep sending notifications until its closed again\n repeat:\n until:\n - condition: state\n entity_id: light.all_lights\n state: 'off'\n sequence:\n - service: notify.mobile_app_pixel_7\n data:\n title: There is still some light turned on...\n message: \"You might want to turn these off:\\n {{ states('sensor.turned_on_lights')\\\n \\ }}\"\n data:\n color: yellow\n notification_icon: mdi:lightbulb-on\n actions:\n - action: '{{ action_cooldown15 }}'\n title: 15 mins\n - action: '{{ action_cooldown60 }}'\n title: 1 h\n - action: '{{ action_cooldown300 }}'\n title: 3 h\n - wait_for_trigger:\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_cooldown15 }}'\n id: Option One\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_cooldown60 }}'\n id: Option Two\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_cooldown300 }}'\n id: Option Three\n timeout: 01:00:00\n continue_on_timeout: false\n - choose:\n - conditions: '{{ wait.trigger.id == ''Option One'' }}'\n sequence:\n - delay: 00:15\n - conditions: '{{ wait.trigger.id == ''Option Two'' }}'\n sequence:\n - delay: 01:00\n - conditions: '{{ wait.trigger.id == ''Option Three'' }}'\n sequence:\n - delay: 03:00", "config": [ { "name": "mobile app pixel 7", "room": null, "type": "notify", "id": { "entity_id": "notify.mobile_app_pixel_7", "device_id": null } }, { "name": "light reminder", "room": null, "type": "input_boolean", "id": { "entity_id": "input_boolean.light_reminder", "device_id": null } }, { "name": "light reminder time", "room": null, "type": "input_number", "id": { "entity_id": "input_number.light_reminder_time", "device_id": null } }, { "name": "all lights", "room": null, "type": "light", "id": { "entity_id": "light.all_lights", "device_id": null } }, { "name": "turned on lights", "room": null, "type": "sensor", "id": { "entity_id": "sensor.turned_on_lights", "device_id": null } } ] }, { "id": "e150671f-893e-426d-99c6-9f4e9eaf4d80", "automation": "- id: e150671f-893e-426d-99c6-9f4e9eaf4d80\n mode: single\n alias: Low disc space detection\n description: 'This automation notifies me when the disc space is below a\n\n certain threshold.'\n trigger:\n - platform: numeric_state\n entity_id: sensor.disk_use_percent\n above: input_number.low_disc_space_threshold\n for:\n minutes: 5\n action:\n - variables:\n action_cooldown15: '{{ ''COOLDOWN15_'' ~ context.id }}'\n action_cooldown60: '{{ ''COOLDOWN60_'' ~ context.id }}'\n action_cooldown300: '{{ ''COOLDOWN300_'' ~ context.id }}'\n - service: notify.mobile_app_pixel_7\n data:\n title: Low disc space detected!\n message: There is almost no more available disc space for homeassistant.\n data:\n color: yellow\n notification_icon: mdi:disc-alert\n actions:\n - action: '{{ action_cooldown15 }}'\n title: 15 mins\n - action: '{{ action_cooldown60 }}'\n title: 1 h\n - action: '{{ action_cooldown300 }}'\n title: 3 h\n - wait_for_trigger:\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_cooldown15 }}'\n id: Option One\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_cooldown60 }}'\n id: Option Two\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_cooldown300 }}'\n id: Option Three\n timeout: 01:00:00\n continue_on_timeout: false\n - choose:\n - conditions: '{{ wait.trigger.id == ''Option One'' }}'\n sequence:\n - delay: 00:15\n - conditions: '{{ wait.trigger.id == ''Option Two'' }}'\n sequence:\n - delay: 01:00\n - conditions: '{{ wait.trigger.id == ''Option Two'' }}'\n sequence:\n - delay: 03:00", "config": [ { "name": "mobile app pixel 7", "room": null, "type": "notify", "id": { "entity_id": "notify.mobile_app_pixel_7", "device_id": null } }, { "name": "disk use percent", "room": null, "type": "sensor", "id": { "entity_id": "sensor.disk_use_percent", "device_id": null } }, { "name": "low disc space threshold", "room": null, "type": "input_number", "id": { "entity_id": "input_number.low_disc_space_threshold", "device_id": null } } ] }, { "id": "68229927-07bf-4342-800b-20a291ce5ed6", "automation": "- id: 68229927-07bf-4342-800b-20a291ce5ed6\n trace:\n stored_traces: 25\n alias: Mute chime on open door\n description: Turns off the chime if the door gets opened.\n triggers:\n - trigger: state\n entity_id: event.vordereingang_intercom_unlock\n actions:\n - action: siren.turn_off\n target:\n entity_id: siren.wohnzimmer_siren\n mode: single", "config": [ { "name": "vordereingang intercom unlock", "room": "entrance", "type": "event", "id": { "entity_id": "event.vordereingang_intercom_unlock", "device_id": null } }, { "name": "wohnzimmer siren", "room": "living room", "type": "siren", "id": { "entity_id": "siren.wohnzimmer_siren", "device_id": null } } ] }, { "id": "66c3956a-4dd6-4af0-8e5d-45354b8af18a", "automation": "- id: 66c3956a-4dd6-4af0-8e5d-45354b8af18a\n alias: Bath ofen switcher\n trigger:\n - platform: state\n entity_id: binary_sensor.bath1_window_contact\n action:\n - choose:\n - conditions: '{{trigger.to_state.state == ''on''}}'\n sequence:\n - service: homeassistant.turn_off\n target:\n entity_id: switch.bath1_powerplug", "config": [ { "name": "bath1 window contact", "room": "bathroom", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.bath1_window_contact", "device_id": null } }, { "name": "bath1 powerplug", "room": "bathroom", "type": "switch", "id": { "entity_id": "switch.bath1_powerplug", "device_id": null } } ] }, { "id": "40c147c1-b3a1-4214-b002-7bf7d4af65d0", "automation": "- id: 40c147c1-b3a1-4214-b002-7bf7d4af65d0\n alias: Office 1 light switcher\n description: This automation tries to predict how much light I need in my office\n and sets up the lights as needed.\n variables:\n office_devices: &id004\n - device_tracker.daniel_tower\n - device_tracker.t2978124\n trigger:\n - alias: Door opened\n platform: state\n entity_id:\n - binary_sensor.office1_door_contact\n from: 'off'\n to: 'on'\n id: Door opened\n - alias: Door closed\n platform: state\n entity_id:\n - binary_sensor.office1_door_contact\n from: 'on'\n to: 'off'\n id: Door closed\n - alias: Sun is gone, need light\n platform: state\n entity_id:\n - binary_sensor.need_light\n from: 'off'\n to: 'on'\n id: Need light\n - alias: Sun is up, don't need light\n platform: state\n entity_id:\n - binary_sensor.need_light\n from: 'on'\n to: 'off'\n id: Dont need light\n - alias: Device turned on\n platform: state\n entity_id: *id004\n from: not_home\n to: home\n id: Device turned on\n - alias: Chair moved\n platform: state\n entity_id: sensor.office1_chair_action\n id: Chair movement\n condition:\n - condition: state\n entity_id: input_boolean.office1_manage_lights\n state: 'on'\n action:\n - choose:\n - conditions:\n - alias: Device turned on, turn light off\n condition: and\n conditions:\n - condition: trigger\n id: Device turned on\n - condition: state\n entity_id: input_boolean.office1_device_on_lights_off\n state: 'on'\n - condition: state\n entity_id: light.office1_light\n state: 'on'\n sequence:\n - alias: Turn off the lights\n service: light.turn_off\n target:\n entity_id: light.office1_light\n - conditions:\n - alias: Chair movement detected, turn light off when device is on\n condition: and\n conditions:\n - condition: trigger\n id: Chair movement\n - condition: state\n entity_id: input_boolean.office1_when_sitting_lights_off\n state: 'on'\n - condition: state\n entity_id: light.office1_light\n state: 'on'\n - condition: state\n entity_id: *id004\n match: any\n state: home\n sequence:\n - alias: Turn off the lights\n service: light.turn_off\n target:\n entity_id: light.office1_light\n - conditions:\n - alias: Door opened\n condition: and\n conditions:\n - condition: trigger\n id: Door opened\n - condition: state\n entity_id: binary_sensor.need_light\n state: 'on'\n sequence:\n - alias: Turn on the lights\n service: light.turn_on\n target:\n entity_id: light.office1_light\n - conditions:\n - alias: Door closed and devices went offline 2 mins ago\n condition: and\n conditions:\n - condition: trigger\n id: Door closed\n - condition: state\n entity_id: light.office1_light\n state: 'on'\n - condition: state\n entity_id: *id004\n state: not_home\n - condition: template\n value_template: \"{% set now_ts = as_timestamp(now()) %} {% set found_device\\\n \\ = false %} {% for dev in office_devices %}\\n {% if (now_ts - as_timestamp(state_attr(dev,\\\n \\ \\\"last_time_reachable\\\"))) < 120 %}\\n {% set found_device = true\\\n \\ %}\\n {% endif %}\\n{% endfor %} {% if found_device %}\\n {{ true }}\\n\\\n {% endif %}\"\n sequence:\n - alias: Turn off the lights\n service: light.turn_off\n target:\n entity_id: light.office1_light\n - conditions:\n - alias: Door closed and devices are offline\n condition: and\n conditions:\n - condition: trigger\n id: Door closed\n - condition: state\n entity_id: light.office1_light\n state: 'on'\n - condition: state\n entity_id: *id004\n state: not_home\n sequence:\n - alias: Wait 2 mins\n delay: 120\n - alias: Check if devices are still offline\n choose:\n - conditions:\n - condition: state\n entity_id: *id004\n state: not_home\n sequence:\n - alias: Turn off the lights\n service: light.turn_off\n target:\n entity_id: light.office1_light\n - conditions:\n - alias: Door closed and devices are still online\n condition: and\n conditions:\n - condition: trigger\n id: Door closed\n - condition: state\n entity_id: light.office1_light\n state: 'on'\n - condition: state\n entity_id: *id004\n match: any\n state: home\n sequence:\n - alias: Turn off the lights\n service: light.turn_off\n target:\n entity_id: light.office1_light", "config": [ { "name": "office1 manage lights", "room": "office", "type": "input_boolean", "id": { "entity_id": "input_boolean.office1_manage_lights", "device_id": null } }, { "name": "office1 device on lights off", "room": "office", "type": "input_boolean", "id": { "entity_id": "input_boolean.office1_device_on_lights_off", "device_id": null } }, { "name": "office1 when sitting lights off", "room": "office", "type": "input_boolean", "id": { "entity_id": "input_boolean.office1_when_sitting_lights_off", "device_id": null } }, { "name": "office1 door contact", "room": "office", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.office1_door_contact", "device_id": null } }, { "name": "need light", "room": null, "type": "binary_sensor", "id": { "entity_id": "binary_sensor.need_light", "device_id": null } }, { "name": "office1 light", "room": "office", "type": "light", "id": { "entity_id": "light.office1_light", "device_id": null } }, { "name": "daniel tower", "room": "office", "type": "device_tracker", "id": { "entity_id": "device_tracker.daniel_tower", "device_id": null } }, { "name": "t2978124", "room": "office", "type": "device_tracker", "id": { "entity_id": "device_tracker.t2978124", "device_id": null } }, { "name": "office1 chair action", "room": "office", "type": "sensor", "id": { "entity_id": "sensor.office1_chair_action", "device_id": null } } ] }, { "id": "9dd7eb2d-79ee-43f9-955d-d5e70d2ea3df", "automation": "- id: 9dd7eb2d-79ee-43f9-955d-d5e70d2ea3df\n alias: Office 1 light button\n description: This automation handels the actions for my ikea button.\n trigger:\n - alias: Button1 on\n platform: state\n entity_id: sensor.office1_button1_action\n to: 'on'\n id: Button1 on\n - alias: Button1 off\n platform: state\n entity_id: sensor.office1_button1_action\n to: 'off'\n id: Button1 off\n - alias: Button1 left\n platform: state\n entity_id: sensor.office1_button1_action\n to: arrow_left_click\n id: Button1 left\n - alias: Button1 right\n platform: state\n entity_id: sensor.office1_button1_action\n to: arrow_right_click\n id: Button1 right\n action:\n - choose:\n - conditions:\n - alias: On button clicked\n condition: trigger\n id: Button1 on\n - alias: But only if the light is off\n condition: state\n entity_id: light.office1_light\n state: 'off'\n sequence:\n - alias: Turn on the office1 light\n service: light.turn_on\n entity_id: light.office1_light\n data:\n brightness_pct: 100\n transition: 1\n - conditions:\n - alias: Off button clicked\n condition: trigger\n id: Button1 off\n - alias: But only if the light is on\n condition: state\n entity_id: light.office1_light\n state: 'on'\n sequence:\n - alias: Turn off the office1 light\n service: light.turn_off\n entity_id: light.office1_light\n data:\n transition: 1\n - conditions:\n - alias: Left button clicked\n condition: trigger\n id: Button1 left\n - alias: But only if the light is on\n condition: state\n entity_id: light.office1_light\n state: 'on'\n sequence:\n - alias: Decrease the brightness\n service: light.turn_on\n entity_id: light.office1_light\n data:\n brightness_step_pct: -20\n transition: 1\n - conditions:\n - alias: Right button clicked\n condition: trigger\n id: Button1 right\n sequence:\n - alias: Increase the brightness\n service: light.turn_on\n entity_id: light.office1_light\n data:\n brightness_step_pct: 20\n transition: 1", "config": [ { "name": "office1 light", "room": "office", "type": "light", "id": { "entity_id": "light.office1_light", "device_id": null } }, { "name": "office1 button1 action", "room": "office", "type": "sensor", "id": { "entity_id": "sensor.office1_button1_action", "device_id": null } } ] }, { "id": "45fc0aae-094e-4298-a033-fd155b30fd65", "automation": "- id: 45fc0aae-094e-4298-a033-fd155b30fd65\n alias: Office 1 light button2\n description: This automation handels the actions for my second ikea button.\n trigger:\n - alias: Button2 on\n platform: state\n entity_id: sensor.office1_button2_action\n to: 'on'\n id: Button2 on\n - alias: Button2 off\n platform: state\n entity_id: sensor.office1_button2_action\n to: 'off'\n id: Button2 off\n - alias: Button2 left\n platform: state\n entity_id: sensor.office1_button2_action\n to: arrow_left_click\n id: Button2 left\n - alias: Button2 right\n platform: state\n entity_id: sensor.office1_button2_action\n to: arrow_right_click\n id: Button2 right\n action:\n - choose:\n - conditions:\n - alias: On button clicked\n condition: trigger\n id: Button2 on\n - alias: But only if the light is off\n condition: state\n entity_id: light.office1_light2\n state: 'off'\n sequence:\n - alias: Turn on the office1 light\n service: light.turn_on\n entity_id: light.office1_light2\n data:\n brightness_pct: 100\n transition: 1\n - conditions:\n - alias: Off button clicked\n condition: trigger\n id: Button2 off\n - alias: But only if the light is on\n condition: state\n entity_id: light.office1_light2\n state: 'on'\n sequence:\n - alias: Turn off the office1 light\n service: light.turn_off\n entity_id: light.office1_light2\n data:\n transition: 1\n - conditions:\n - alias: Left button clicked\n condition: trigger\n id: Button2 left\n - alias: But only if the light is on\n condition: state\n entity_id: light.office1_light2\n state: 'on'\n sequence:\n - alias: Decrease the brightness\n service: light.turn_on\n entity_id: light.office1_light2\n data:\n brightness_step_pct: -20\n transition: 1\n - conditions:\n - alias: Right button clicked\n condition: trigger\n id: Button2 right\n sequence:\n - alias: Increase the brightness\n service: light.turn_on\n entity_id: light.office1_light2\n data:\n brightness_step_pct: 20\n transition: 1", "config": [ { "name": "office1 light", "room": "office", "type": "light", "id": { "entity_id": "light.office1_light", "device_id": null } }, { "name": "office1 button2 action", "room": "office", "type": "sensor", "id": { "entity_id": "sensor.office1_button2_action", "device_id": null } }, { "name": "office1 light2", "room": "office", "type": "light", "id": { "entity_id": "light.office1_light2", "device_id": null } } ] }, { "id": "379f4de2-2c0d-412e-a1e4-0626b5713ece", "automation": "- id: 379f4de2-2c0d-412e-a1e4-0626b5713ece\n alias: Office 2 light switcher\n description: This automation is a simple button / light connector.\n trigger:\n - platform: state\n entity_id:\n - sensor.office2_button_action\n to: single\n id: Single Click\n - platform: state\n entity_id:\n - sensor.office2_button_action\n to: double\n id: Double Click\n - platform: state\n entity_id:\n - sensor.office2_button_action\n to: triple\n id: Triple Click\n action:\n - choose:\n - conditions:\n - condition: trigger\n id: Single Click\n sequence:\n - alias: Toggle the lights\n service: light.toggle\n target:\n entity_id: light.office2_light\n data:\n brightness_pct: 100\n - conditions:\n - condition: trigger\n id: Double Click\n sequence:\n - alias: Toggle the lights\n service: light.turn_on\n target:\n entity_id: light.office2_light\n data:\n brightness_pct: 50\n - conditions:\n - condition: trigger\n id: Triple Click\n sequence:\n - alias: Toggle the lights\n service: light.turn_on\n target:\n entity_id: light.office2_light\n data:\n brightness_pct: 25", "config": [ { "name": "office2 button action", "room": "office", "type": "sensor", "id": { "entity_id": "sensor.office2_button_action", "device_id": null } }, { "name": "office2 light", "room": "office", "type": "light", "id": { "entity_id": "light.office2_light", "device_id": null } } ] }, { "id": "ae1ed701-d3b1-49d3-b12b-1c63db33ca90", "automation": "- id: ae1ed701-d3b1-49d3-b12b-1c63db33ca90\n alias: Phone deflection switcher\n description: When I turned on the away mode, I want all calls to be deflected to\n my mobile phone.\n trigger:\n - alias: Away mode turned on\n platform: state\n entity_id:\n - input_boolean.away_mode\n from: 'off'\n to: 'on'\n id: Away mode turned on\n - alias: Away mode turned off\n platform: state\n entity_id:\n - input_boolean.away_mode\n from: 'on'\n to: 'off'\n id: Away mode turned off\n - alias: People are home\n platform: state\n entity_id:\n - binary_sensor.people_home\n from: 'off'\n to: 'on'\n id: People are home\n action:\n - choose:\n - conditions:\n - alias: Away mode turned on\n condition: and\n conditions:\n - condition: trigger\n id: Away mode turned on\n - condition: state\n entity_id: switch.fritz_box_6660_cable_call_deflection_2\n state: 'off'\n sequence:\n - alias: Turn on the deflection\n service: switch.turn_on\n target:\n entity_id: switch.fritz_box_6660_cable_call_deflection_2\n - conditions:\n - alias: Away mode turned off\n condition: and\n conditions:\n - condition: trigger\n id: Away mode turned off\n - &id005\n condition: state\n entity_id: switch.fritz_box_6660_cable_call_deflection_2\n state: 'on'\n sequence:\n - &id006\n alias: Turn off the deflection\n service: switch.turn_off\n target:\n entity_id: switch.fritz_box_6660_cable_call_deflection_2\n - conditions:\n - alias: People are home\n condition: and\n conditions:\n - condition: trigger\n id: People are home\n - *id005\n sequence:\n - *id006", "config": [ { "name": "away mode", "room": null, "type": "input_boolean", "id": { "entity_id": "input_boolean.away_mode", "device_id": null } }, { "name": "people home", "room": null, "type": "binary_sensor", "id": { "entity_id": "binary_sensor.people_home", "device_id": null } }, { "name": "fritz box 6660 cable call deflection 2", "room": null, "type": "switch", "id": { "entity_id": "switch.fritz_box_6660_cable_call_deflection_2", "device_id": null } } ] }, { "id": "68229927-07bf-4342-800b-20a291ce5ed4", "automation": "- id: 68229927-07bf-4342-800b-20a291ce5ed4\n trace:\n stored_traces: 25\n alias: Security alarm triggered\n description: This automation gets triggered, when a security issue was detected.\n trigger:\n - platform: state\n entity_id: alarm_control_panel.security_alarm\n to: triggered\n action:\n - variables:\n action_disarm: '{{ ''DISARM_'' ~ context.id }}'\n - service: notify.mobile_app_pixel_7\n data:\n title: Security alarm triggered\n message: The entity {{states('input_text.last_security_alarm_entity')}} triggered\n the security alarm.\n data:\n ttl: 0\n priority: high\n channel: alarm_stream\n notification_icon: mdi:alarm-light\n color: red\n confirmation: true\n actions:\n - action: '{{ action_disarm }}'\n title: Disarm\n - wait_for_trigger:\n - platform: event\n event_type: mobile_app_notification_received\n event_data:\n title: Security alarm triggered\n timeout: 00:00:15\n continue_on_timeout: true\n - choose:\n - alias: When notification wasnt received\n conditions:\n - alias: Phone is off and probably sleeping\n condition: and\n conditions:\n - condition: template\n value_template: '{{ not wait.trigger }}'\n - condition: state\n entity_id: binary_sensor.probably_sleeping\n state: 'on'\n sequence:\n - alias: Call phone via sip\n service: hassio.addon_stdin\n data:\n addon: ad61c150_dss_voip\n input:\n call_sip_uri: secret emergency_sip_uri\n message_tts: The entity {{states('input_text.last_security_alarm_entity')}}\n triggered the security alarm.\n - alias: Turn on lights with breathe effect\n service: light.turn_on\n data:\n effect: breathe\n brightness_pct: 100\n target:\n entity_id: light.all_lights\n - wait_for_trigger:\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_disarm }}'\n id: Disarm\n timeout: 00:01:00\n continue_on_timeout: false\n - choose:\n - alias: When disarm button was pressed\n conditions: '{{ wait.trigger.id == ''Disarm'' }}'\n sequence:\n - alias: Disarm the security alarm\n service: alarm_control_panel.alarm_disarm\n target:\n entity_id: alarm_control_panel.security_alarm", "config": [ { "name": "security alarm", "room": null, "type": "alarm_control_panel", "id": { "entity_id": "alarm_control_panel.security_alarm", "device_id": null } }, { "name": "probably sleeping", "room": null, "type": "binary_sensor", "id": { "entity_id": "binary_sensor.probably_sleeping", "device_id": null } }, { "name": "mobile app pixel 7", "room": null, "type": "notify", "id": { "entity_id": "notify.mobile_app_pixel_7", "device_id": null } }, { "name": "last security alarm entity", "room": null, "type": "input_text", "id": { "entity_id": "input_text.last_security_alarm_entity", "device_id": null } }, { "name": "all lights", "room": null, "type": "light", "id": { "entity_id": "light.all_lights", "device_id": null } } ] }, { "id": "c0771d1b-92cc-4ed6-a227-229b13981c2f", "automation": "- id: c0771d1b-92cc-4ed6-a227-229b13981c2f\n mode: queued\n max_exceeded: silent\n trace:\n stored_traces: 25\n alias: Storage detection alarm trigger\n description: This automation detects suspicious activity in the storage room. When\n this automation is triggered, a security alarm will be triggered.\n trigger:\n - platform: event\n event_type: state_changed\n event_data:\n entity_id: binary_sensor.storage_door1_contact\n - platform: event\n event_type: state_changed\n event_data:\n entity_id: binary_sensor.storage_door2_contact\n condition:\n - condition: template\n value_template: \"{{\\n trigger.event.data.old_state.state == 'off'\\n and trigger.event.data.new_state.state\\\n \\ == 'on'\\n and is_state('input_boolean.watch_storage_activities', 'on')\\n\\\n }}\"\n action:\n - service: input_text.set_value\n target:\n entity_id: input_text.last_security_alarm_entity\n data:\n value: '{{state_attr(trigger.event.data.entity_id, ''friendly_name'')}}'\n - service: alarm_control_panel.alarm_trigger\n target:\n entity_id: alarm_control_panel.security_alarm", "config": [ { "name": "security alarm", "room": null, "type": "alarm_control_panel", "id": { "entity_id": "alarm_control_panel.security_alarm", "device_id": null } }, { "name": "storage door1 contact", "room": "storage", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.storage_door1_contact", "device_id": null } }, { "name": "storage door2 contact", "room": "storage", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.storage_door2_contact", "device_id": null } }, { "name": "last security alarm entity", "room": null, "type": "input_text", "id": { "entity_id": "input_text.last_security_alarm_entity", "device_id": null } }, { "name": "watch storage activities", "room": "storage", "type": "input_boolean", "id": { "entity_id": "input_boolean.watch_storage_activities", "device_id": null } } ] }, { "id": "62f17829-bce4-495f-b1d5-b6798a9281a1", "automation": "- id: 62f17829-bce4-495f-b1d5-b6798a9281a1\n alias: Thermostat switcher\n description: 'When I turned on the away mode, I want all thermostats to be turned\n off.\n\n When I return, I want them to be in the old state again.\n\n And when I open a window, I want the thermostat to turn off as long as it is still\n open.'\n variables:\n all_thermostats: &id007\n - climate.bad\n - climate.buro_1\n - climate.buro_2\n - climate.esszimmer_1\n - climate.esszimmer_2\n - climate.schlafzimmer_1\n - climate.schlafzimmer_2\n - climate.wohnzimmer\n trigger:\n - alias: Away mode turned on\n platform: state\n entity_id:\n - input_boolean.away_mode\n from: 'off'\n to: 'on'\n id: Away mode turned on\n - alias: Away mode turned off\n platform: state\n entity_id:\n - input_boolean.away_mode\n from: 'on'\n to: 'off'\n id: Away mode turned off\n - alias: People are home\n platform: state\n entity_id:\n - binary_sensor.people_home\n from: 'off'\n to: 'on'\n id: People are home\n - alias: Office 1 window opened\n platform: state\n entity_id:\n - binary_sensor.office1_window_contact\n from: 'off'\n to: 'on'\n id: Office 1 window opened\n for: 00:00:10\n - alias: Office 1 window closed\n platform: state\n entity_id:\n - binary_sensor.office1_window_contact\n from: 'on'\n to: 'off'\n id: Office 1 window closed\n - alias: Lunch door opened\n platform: state\n entity_id:\n - binary_sensor.lunch_door_contact\n from: 'off'\n to: 'on'\n id: Lunch door opened\n for: 00:00:10\n - alias: Lunch door closed\n platform: state\n entity_id:\n - binary_sensor.lunch_door_contact\n from: 'on'\n to: 'off'\n id: Lunch door closed\n - alias: Bath1 window opened\n platform: state\n entity_id:\n - binary_sensor.bath1_window_contact\n from: 'off'\n to: 'on'\n id: Bath1 window opened\n for: 00:00:10\n - alias: Bath1 window closed\n platform: state\n entity_id:\n - binary_sensor.bath1_window_contact\n from: 'on'\n to: 'off'\n id: Bath1 window closed\n - alias: Bedroom window opened\n platform: state\n entity_id:\n - binary_sensor.bedroom_window_contact\n - binary_sensor.bedroom_door_contact\n from: 'off'\n to: 'on'\n id: Bedroom window opened\n for: 00:00:10\n - alias: Bedroom window closed\n platform: state\n entity_id:\n - binary_sensor.bedroom_window_contact\n - binary_sensor.bedroom_door_contact\n from: 'on'\n to: 'off'\n id: Bedroom window closed\n - alias: Time check\n platform: time_pattern\n minutes: /3\n id: Time check\n action:\n - choose:\n - conditions:\n - alias: Office 1 window opened\n condition: and\n conditions:\n - condition: or\n conditions:\n - condition: trigger\n id: Office 1 window opened\n - condition: and\n conditions:\n - condition: trigger\n id: Time check\n - condition: state\n entity_id:\n - binary_sensor.office1_window_contact\n state: 'on'\n - condition: state\n entity_id:\n - climate.buro_1\n state: heat\n sequence:\n - service: scene.create\n data:\n scene_id: office1_thermostat\n snapshot_entities:\n - climate.buro_1\n - alias: Turn off the thermostat\n service: climate.turn_off\n target:\n entity_id:\n - climate.buro_1\n - conditions:\n - alias: Office 1 window closed again\n condition: and\n conditions:\n - condition: or\n conditions:\n - condition: trigger\n id: Office 1 window closed\n - condition: and\n conditions:\n - condition: trigger\n id: Time check\n - condition: state\n entity_id:\n - input_boolean.away_mode\n state: 'off'\n - condition: state\n entity_id:\n - binary_sensor.office1_window_contact\n state: 'off'\n - condition: state\n entity_id:\n - climate.buro_1\n state: 'off'\n sequence:\n - service: scene.turn_on\n target:\n entity_id: scene.office1_thermostat\n - conditions:\n - alias: Office 2 door opened\n condition: and\n conditions:\n - condition: or\n conditions:\n - condition: trigger\n id: Office 2 door opened\n - condition: and\n conditions:\n - condition: trigger\n id: Time check\n - condition: state\n entity_id:\n - binary_sensor.office2_door_contact\n state: 'on'\n - condition: state\n entity_id:\n - climate.buro_2\n state: heat\n sequence:\n - service: scene.create\n data:\n scene_id: office2_thermostat\n snapshot_entities:\n - climate.buro_2\n - alias: Turn off the thermostat\n service: climate.turn_off\n target:\n entity_id:\n - climate.buro_2\n - conditions:\n - alias: Office 2 door closed again\n condition: and\n conditions:\n - condition: or\n conditions:\n - condition: trigger\n id: Office 2 door closed\n - condition: and\n conditions:\n - condition: trigger\n id: Time check\n - condition: state\n entity_id:\n - input_boolean.away_mode\n state: 'off'\n - condition: state\n entity_id:\n - binary_sensor.office2_door_contact\n state: 'off'\n - condition: state\n entity_id:\n - climate.buro_2\n state: 'off'\n sequence:\n - service: scene.turn_on\n target:\n entity_id: scene.office2_thermostat\n - conditions:\n - alias: Lunch door opened\n condition: and\n conditions:\n - condition: or\n conditions:\n - condition: trigger\n id: Lunch door opened\n - condition: and\n conditions:\n - condition: trigger\n id: Time check\n - condition: state\n entity_id:\n - binary_sensor.lunch_door_contact\n state: 'on'\n - condition: state\n entity_id:\n - climate.wohnzimmer\n - climate.esszimmer_1\n - climate.esszimmer_2\n match: any\n state: heat\n sequence:\n - service: scene.create\n data:\n scene_id: lunch_living_thermostat\n snapshot_entities:\n - climate.wohnzimmer\n - climate.esszimmer_1\n - climate.esszimmer_2\n - alias: Turn off the thermostat\n service: climate.turn_off\n target:\n entity_id:\n - climate.wohnzimmer\n - climate.esszimmer_1\n - climate.esszimmer_2\n - conditions:\n - alias: Lunch door closed again\n condition: and\n conditions:\n - condition: or\n conditions:\n - condition: trigger\n id: Lunch door closed\n - condition: and\n conditions:\n - condition: trigger\n id: Time check\n - condition: state\n entity_id:\n - input_boolean.away_mode\n state: 'off'\n - condition: state\n entity_id:\n - binary_sensor.lunch_door_contact\n state: 'off'\n - condition: state\n entity_id:\n - climate.wohnzimmer\n - climate.esszimmer_1\n - climate.esszimmer_2\n state: 'off'\n sequence:\n - service: scene.turn_on\n target:\n entity_id: scene.lunch_living_thermostat\n - conditions:\n - alias: Bath1 window opened\n condition: and\n conditions:\n - condition: or\n conditions:\n - condition: trigger\n id: Bath1 window opened\n - condition: and\n conditions:\n - condition: trigger\n id: Time check\n - condition: state\n entity_id:\n - binary_sensor.bath1_window_contact\n state: 'on'\n - condition: state\n entity_id:\n - climate.bad\n state: heat\n sequence:\n - service: scene.create\n data:\n scene_id: bad_thermostat\n snapshot_entities:\n - climate.bad\n - alias: Turn off the thermostat\n service: climate.turn_off\n target:\n entity_id:\n - climate.bad\n - conditions:\n - alias: Bath1 window closed again\n condition: and\n conditions:\n - condition: or\n conditions:\n - condition: trigger\n id: Bath1 window closed\n - condition: and\n conditions:\n - condition: trigger\n id: Time check\n - condition: state\n entity_id:\n - input_boolean.away_mode\n state: 'off'\n - condition: state\n entity_id:\n - binary_sensor.bath1_window_contact\n state: 'off'\n - condition: state\n entity_id:\n - climate.bad\n state: 'off'\n sequence:\n - service: scene.turn_on\n target:\n entity_id: scene.bad_thermostat\n - conditions:\n - alias: Bedroom window opened\n condition: and\n conditions:\n - condition: or\n conditions:\n - condition: trigger\n id: Bedroom window opened\n - condition: and\n conditions:\n - condition: trigger\n id: Time check\n - condition: state\n entity_id:\n - binary_sensor.bedroom_window_contact\n - binary_sensor.bedroom_door_contact\n state: 'on'\n - condition: and\n conditions:\n - condition: trigger\n id: Time check\n - condition: state\n entity_id:\n - binary_sensor.bath1_window_contact\n state: 'on'\n - condition: state\n entity_id:\n - input_boolean.combine_bath_and_bedroom\n state: 'on'\n - condition: state\n entity_id:\n - climate.schlafzimmer_1\n - climate.schlafzimmer_2\n match: any\n state: heat\n sequence:\n - service: scene.create\n data:\n scene_id: bedroom_thermostat\n snapshot_entities:\n - climate.schlafzimmer_1\n - climate.schlafzimmer_2\n - alias: Turn off the thermostat\n service: climate.turn_off\n target:\n entity_id:\n - climate.schlafzimmer_1\n - climate.schlafzimmer_2\n - conditions:\n - alias: Bedroom window closed again\n condition: and\n conditions:\n - condition: or\n conditions:\n - condition: state\n entity_id:\n - input_boolean.combine_bath_and_bedroom\n state: 'off'\n - condition: and\n conditions:\n - condition: state\n entity_id:\n - input_boolean.combine_bath_and_bedroom\n state: 'on'\n - condition: state\n entity_id:\n - binary_sensor.bath1_window_contact\n state: 'off'\n - condition: or\n conditions:\n - condition: trigger\n id: Bedroom window closed\n - condition: and\n conditions:\n - condition: trigger\n id: Time check\n - condition: state\n entity_id:\n - input_boolean.away_mode\n state: 'off'\n - condition: state\n entity_id:\n - binary_sensor.bedroom_window_contact\n - binary_sensor.bedroom_door_contact\n state: 'off'\n - condition: state\n entity_id:\n - climate.schlafzimmer_1\n - climate.schlafzimmer_2\n state: 'off'\n sequence:\n - service: scene.turn_on\n target:\n entity_id: scene.bedroom_thermostat\n - conditions:\n - alias: Away mode turned on\n condition: and\n conditions:\n - condition: trigger\n id: Away mode turned on\n - condition: state\n entity_id: *id007\n match: any\n state: heat\n sequence:\n - service: scene.create\n data:\n scene_id: before\n snapshot_entities: *id007\n - alias: Turn off the thermostats\n service: climate.turn_off\n target:\n entity_id: *id007\n - conditions:\n - alias: Away mode turned off\n condition: and\n conditions:\n - condition: trigger\n id: Away mode turned off\n - condition: state\n entity_id: *id007\n match: any\n state: 'off'\n sequence:\n - service: scene.turn_on\n target:\n entity_id: scene.before\n - conditions:\n - condition: trigger\n id: People are home\n sequence:\n - service: input_boolean.turn_off\n target:\n entity_id: input_boolean.away_mode", "config": [ { "name": "away mode", "room": null, "type": "input_boolean", "id": { "entity_id": "input_boolean.away_mode", "device_id": null } }, { "name": "people home", "room": null, "type": "binary_sensor", "id": { "entity_id": "binary_sensor.people_home", "device_id": null } }, { "name": "bath1 window contact", "room": "bathroom", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.bath1_window_contact", "device_id": null } }, { "name": "bad thermostat", "room": "bathroom", "type": "climate", "id": { "entity_id": "climate.bad", "device_id": null } }, { "name": "buro 1 thermostat", "room": "office", "type": "climate", "id": { "entity_id": "climate.buro_1", "device_id": null } }, { "name": "buro 2 thermostat", "room": "office", "type": "climate", "id": { "entity_id": "climate.buro_2", "device_id": null } }, { "name": "esszimmer 1 thermostat", "room": "dining room", "type": "climate", "id": { "entity_id": "climate.esszimmer_1", "device_id": null } }, { "name": "esszimmer 2 thermostat", "room": "dining room", "type": "climate", "id": { "entity_id": "climate.esszimmer_2", "device_id": null } }, { "name": "schlafzimmer 1 thermostat", "room": "bedroom", "type": "climate", "id": { "entity_id": "climate.schlafzimmer_1", "device_id": null } }, { "name": "schlafzimmer 2 thermostat", "room": "bedroom", "type": "climate", "id": { "entity_id": "climate.schlafzimmer_2", "device_id": null } }, { "name": "wohnzimmer thermostat", "room": "living room", "type": "climate", "id": { "entity_id": "climate.wohnzimmer", "device_id": null } }, { "name": "office1 window contact", "room": "office", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.office1_window_contact", "device_id": null } }, { "name": "lunch door contact", "room": "lunch", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.lunch_door_contact", "device_id": null } }, { "name": "bedroom window contact", "room": "bedroom", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.bedroom_window_contact", "device_id": null } }, { "name": "bedroom door contact", "room": "bedroom", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.bedroom_door_contact", "device_id": null } }, { "name": "office2 door contact", "room": "office", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.office2_door_contact", "device_id": null } }, { "name": "combine bath and bedroom", "room": null, "type": "input_boolean", "id": { "entity_id": "input_boolean.combine_bath_and_bedroom", "device_id": null } }, { "name": "office1 thermostat scene", "room": "office", "type": "scene", "id": { "entity_id": "scene.office1_thermostat", "device_id": null } }, { "name": "office2 thermostat scene", "room": "office", "type": "scene", "id": { "entity_id": "scene.office2_thermostat", "device_id": null } }, { "name": "lunch living thermostat scene", "room": "dining room", "type": "scene", "id": { "entity_id": "scene.lunch_living_thermostat", "device_id": null } }, { "name": "bad thermostat scene", "room": "bathroom", "type": "scene", "id": { "entity_id": "scene.bad_thermostat", "device_id": null } }, { "name": "bedroom thermostat scene", "room": "bedroom", "type": "scene", "id": { "entity_id": "scene.bedroom_thermostat", "device_id": null } }, { "name": "before scene", "room": null, "type": "scene", "id": { "entity_id": "scene.before", "device_id": null } } ] }, { "id": "356696e4-4423-4863-8f28-a02ec1ef18ac", "automation": "- id: 356696e4-4423-4863-8f28-a02ec1ef18ac\n mode: queued\n alias: Trash reminder\n description: This automation reminds me to put the trash outside\n trigger:\n - platform: calendar\n event: start\n entity_id: calendar.trash\n offset: -08:00:00\n action:\n - service: notify.mobile_app_pixel_7\n data:\n title: '{{ trigger.calendar_event.summary }}'\n message: '{{ trigger.calendar_event.description }}'\n data:\n notification_icon: mdi:trash-can\n - service: persistent_notification.create\n data:\n title: '{{ trigger.calendar_event.summary }}'\n message: '{{ trigger.calendar_event.description }}'", "config": [ { "name": "mobile app pixel 7", "room": null, "type": "notify", "id": { "entity_id": "notify.mobile_app_pixel_7", "device_id": null } }, { "name": "trash calendar", "room": null, "type": "calendar", "id": { "entity_id": "calendar.trash", "device_id": null } } ] }, { "id": "8511c2ca-4ea3-429f-b3a3-e35bd6289e67", "automation": "- id: 8511c2ca-4ea3-429f-b3a3-e35bd6289e67\n mode: single\n alias: Window or door open for too long reminder\n description: 'This automation reminds me to close an open window or door.\n\n\n Sometimes I open a window or door to let some fresh air in\n\n and forget to close it again. This automations aims to prevent\n\n this.'\n trigger:\n - platform: state\n entity_id: binary_sensor.everything_closed\n to: 'off'\n for: 00:{{ '%0.2d' | format(states('input_number.max_open_window_or_door_time')|int)\n }}:00\n condition: '{{ states(''input_boolean.summer_mode'') == states(''binary_sensor.outside_warmer_than_inside'')\n and is_state(''binary_sensor.probably_sleeping'', ''off'') }}'\n action:\n - variables:\n action_cooldown15: '{{ ''CLOSE_COOLDOWN15_'' ~ context.id }}'\n action_cooldown60: '{{ ''CLOSE_COOLDOWN60_'' ~ context.id }}'\n action_cooldown300: '{{ ''CLOSE_COOLDOWN300_'' ~ context.id }}'\n - alias: Keep sending notifications until its closed again\n repeat:\n until:\n - condition: state\n entity_id: binary_sensor.everything_closed\n state: 'on'\n sequence:\n - service: notify.mobile_app_pixel_7\n data:\n title: Close windows and doors now!\n message: \"The following entities are still open, you might want to close\\\n \\ them:\\n {{ states('sensor.open_windows') }}\\n {{ states('sensor.open_doors')\\\n \\ }}\"\n data:\n color: yellow\n notification_icon: mdi:window-open\n actions:\n - action: '{{ action_cooldown15 }}'\n title: 15 mins\n - action: '{{ action_cooldown60 }}'\n title: 1 h\n - action: '{{ action_cooldown300 }}'\n title: 3 h\n - wait_for_trigger:\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_cooldown15 }}'\n id: Option One\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_cooldown60 }}'\n id: Option Two\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_cooldown300 }}'\n id: Option Three\n timeout: 01:00:00\n continue_on_timeout: false\n - choose:\n - conditions: '{{ wait.trigger.id == ''Option One'' }}'\n sequence:\n - delay: 00:15\n - conditions: '{{ wait.trigger.id == ''Option Two'' }}'\n sequence:\n - delay: 01:00\n - conditions: '{{ wait.trigger.id == ''Option Three'' }}'\n sequence:\n - delay: 03:00", "config": [ { "name": "probably sleeping", "room": null, "type": "binary_sensor", "id": { "entity_id": "binary_sensor.probably_sleeping", "device_id": null } }, { "name": "mobile app pixel 7", "room": null, "type": "notify", "id": { "entity_id": "notify.mobile_app_pixel_7", "device_id": null } }, { "name": "everything closed", "room": null, "type": "binary_sensor", "id": { "entity_id": "binary_sensor.everything_closed", "device_id": null } }, { "name": "open windows", "room": null, "type": "sensor", "id": { "entity_id": "sensor.open_windows", "device_id": null } }, { "name": "open doors", "room": null, "type": "sensor", "id": { "entity_id": "sensor.open_doors", "device_id": null } }, { "name": "summer mode", "room": null, "type": "input_boolean", "id": { "entity_id": "input_boolean.summer_mode", "device_id": null } }, { "name": "outside warmer than inside", "room": null, "type": "binary_sensor", "id": { "entity_id": "binary_sensor.outside_warmer_than_inside", "device_id": null } }, { "name": "max open window or door time", "room": null, "type": "input_number", "id": { "entity_id": "input_number.max_open_window_or_door_time", "device_id": null } } ] } ]