├── images ├── 1.png ├── 10.png ├── 11.jpg ├── 11.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png ├── 6.png ├── 7.png ├── 8.png └── 9.png ├── package ├── fans.yaml ├── alexa.yaml ├── vacuum.yaml ├── prometheus.yaml ├── precense.yaml ├── alarm.yaml ├── http.yaml ├── homekit.yaml └── occupancy.yaml ├── .gitignore ├── .travis.yml ├── configuration.yaml ├── secrets.yaml-default ├── README.md └── automations.yaml /images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joch/home-assistant-config/HEAD/images/1.png -------------------------------------------------------------------------------- /images/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joch/home-assistant-config/HEAD/images/10.png -------------------------------------------------------------------------------- /images/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joch/home-assistant-config/HEAD/images/11.jpg -------------------------------------------------------------------------------- /images/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joch/home-assistant-config/HEAD/images/11.png -------------------------------------------------------------------------------- /images/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joch/home-assistant-config/HEAD/images/2.png -------------------------------------------------------------------------------- /images/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joch/home-assistant-config/HEAD/images/3.png -------------------------------------------------------------------------------- /images/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joch/home-assistant-config/HEAD/images/4.png -------------------------------------------------------------------------------- /images/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joch/home-assistant-config/HEAD/images/5.png -------------------------------------------------------------------------------- /images/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joch/home-assistant-config/HEAD/images/6.png -------------------------------------------------------------------------------- /images/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joch/home-assistant-config/HEAD/images/7.png -------------------------------------------------------------------------------- /images/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joch/home-assistant-config/HEAD/images/8.png -------------------------------------------------------------------------------- /images/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joch/home-assistant-config/HEAD/images/9.png -------------------------------------------------------------------------------- /package/fans.yaml: -------------------------------------------------------------------------------- 1 | fan: 2 | - platform: xiaomi_miio_fan 3 | name: Bedroom Fan 4 | host: !secret miio_fan_bedroom_host 5 | token: !secret miio_fan_bedroom_token 6 | -------------------------------------------------------------------------------- /package/alexa.yaml: -------------------------------------------------------------------------------- 1 | alexa: 2 | smart_home: 3 | filter: 4 | include_domains: 5 | - light 6 | - sensor 7 | - switch 8 | - scene 9 | - binary_sensor 10 | - vacuum 11 | - input_boolean 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | blueprints/ 2 | custom_components/ 3 | deps/ 4 | ssl/ 5 | themes/ 6 | tts/ 7 | www/ 8 | .* 9 | *.conf 10 | *.log* 11 | Makefile 12 | emulated_hue_ids.json 13 | ip_bans.yaml 14 | known_devices.yaml 15 | secrets.yaml 16 | ui-lovelace.yaml 17 | zigbee.db* -------------------------------------------------------------------------------- /package/vacuum.yaml: -------------------------------------------------------------------------------- 1 | camera: 2 | - platform: xiaomi_cloud_map_extractor 3 | host: !secret vacuum_xiaomi_host 4 | token: !secret vacuum_xiaomi_token 5 | username: !secret xiaomi_cloud_username 6 | password: !secret xiaomi_cloud_password 7 | draw: ['all'] 8 | scan_interval: 14400 9 | attributes: 10 | - calibration_points 11 | - rooms 12 | -------------------------------------------------------------------------------- /package/prometheus.yaml: -------------------------------------------------------------------------------- 1 | prometheus: 2 | filter: 3 | include_domains: 4 | - alarm_control_panel 5 | - light 6 | include_entity_globs: 7 | - binary_sensor.*_occupied 8 | - sensor.*_temperature 9 | - sensor.*_humidity 10 | - sensor.*_illuminance 11 | - sensor.*_geocoded_location 12 | # exclude_entities: 13 | # - light.kitchen_light 14 | -------------------------------------------------------------------------------- /package/precense.yaml: -------------------------------------------------------------------------------- 1 | group: 2 | guests: 3 | name: Guests 4 | icon: mdi:account-group 5 | entities: 6 | - !secret guest_001 7 | - !secret guest_002 8 | - !secret guest_003 9 | - !secret guest_004 10 | - !secret guest_005 11 | - !secret guest_006 12 | - !secret guest_007 13 | - !secret guest_008 14 | - !secret guest_009 15 | - !secret guest_010 16 | -------------------------------------------------------------------------------- /package/alarm.yaml: -------------------------------------------------------------------------------- 1 | alarm_control_panel: 2 | - platform: manual 3 | name: 'Alarm' 4 | trigger_time: 120 5 | disarm_after_trigger: false 6 | code_arm_required: false 7 | armed_home: 8 | arming_time: 0 9 | delay_time: 0 10 | trigger_time: 60 11 | armed_night: 12 | arming_time: 0 13 | delay_time: 0 14 | trigger_time: 60 15 | armed_away: 16 | arming_time: 0 17 | delay_time: 60 18 | trigger_time: 120 19 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - "3.7" 4 | before_install: 5 | - mkdir -p custom_components/ tmp/ 6 | - git clone https://github.com/custom-components/hacs.git tmp/hacs 7 | - mv tmp/hacs/custom_components/hacs custom_components/ 8 | - git clone https://github.com/twrecked/hass-aarlo.git tmp/aarlo 9 | - mv tmp/aarlo/custom_components/aarlo custom_components/ 10 | - cp secrets.yaml-default secrets.yaml 11 | - touch ssl.crt ssl.key 12 | install: 13 | - pip3 install homeassistant 14 | script: 15 | - hass -c . --script check_config 16 | -------------------------------------------------------------------------------- /package/http.yaml: -------------------------------------------------------------------------------- 1 | http: 2 | server_port: !secret http_server_port 3 | ip_ban_enabled: true 4 | login_attempts_threshold: 100 5 | use_x_forwarded_for: True 6 | ssl_certificate: !secret http_ssl_certificate 7 | ssl_key: !secret http_ssl_key 8 | trusted_proxies: 9 | - !secret trusted_proxies_001 10 | - !secret trusted_proxies_002 11 | - !secret trusted_proxies_003 12 | - !secret trusted_proxies_004 13 | - !secret trusted_proxies_005 14 | - !secret trusted_proxies_006 15 | - !secret trusted_proxies_007 16 | - !secret trusted_proxies_008 17 | - !secret trusted_proxies_009 18 | - !secret trusted_proxies_010 19 | - !secret trusted_proxies_011 20 | - !secret trusted_proxies_012 21 | - !secret trusted_proxies_013 22 | - !secret trusted_proxies_014 23 | - !secret trusted_proxies_015 24 | - !secret trusted_proxies_016 25 | -------------------------------------------------------------------------------- /configuration.yaml: -------------------------------------------------------------------------------- 1 | homeassistant: 2 | latitude: !secret latitude 3 | longitude: !secret longitude 4 | packages: !include_dir_named package 5 | country: SE 6 | auth_providers: 7 | - type: homeassistant 8 | allowlist_external_dirs: 9 | - /tmp 10 | external_url: !secret homeassistant_external_url 11 | 12 | api: 13 | cloud: 14 | config: 15 | conversation: 16 | history: 17 | logbook: 18 | mobile_app: 19 | person: 20 | sun: 21 | system_health: 22 | default_config: 23 | 24 | logger: 25 | default: info 26 | # logs: 27 | # homeassistant.components.zha: debug 28 | # zigpy: debug 29 | 30 | recorder: 31 | db_url: !secret recorder_db_url 32 | 33 | ifttt: 34 | key: !secret ifttt_key 35 | 36 | # For loading HACS themes 37 | frontend: 38 | themes: !include_dir_merge_named themes 39 | 40 | # For frontend automation support 41 | automation: !include automations.yaml 42 | -------------------------------------------------------------------------------- /secrets.yaml-default: -------------------------------------------------------------------------------- 1 | latitude: 00.0000 2 | longitude: 00.0000 3 | homeassistant_name: Home 4 | http_password: 0000 5 | http_server_port: 8123 6 | http_base_url: 0000 7 | http_ssl_certificate: ssl.crt 8 | http_ssl_key: ssl.key 9 | recorder_db_url: 0000 10 | plex_username: 0000 11 | plex_password: 0000 12 | xbox_api_key: 0000 13 | xbox_xuid_account: 0000 14 | spotify_client_id: 0000 15 | spotify_client_secret: 0000 16 | samsungtv_host: 0000 17 | samsungtv_mac: 0000 18 | tradfri_host: 0000 19 | tradfri_api_key: 0000 20 | asuswrt_host: 0000 21 | asuswrt_protocol: 0000 22 | asuswrt_username: 0000 23 | asuswrt_password: 0000 24 | telegram_api_key: 0000 25 | telegram_id_johnny: 0000 26 | telegram_id_kajsa: 0000 27 | darksky_api_key: 0000 28 | influxdb_host: 0000 29 | arlo_username: 0000 30 | arlo_password: 0000 31 | ifttt_key: 0000 32 | alarm_code: 0000 33 | zwave_network_key: "0000" 34 | harmony_host: 0.0.0.0 35 | deconz_host: 0.0.0.0 36 | deconz_port: 8080 37 | deconz_api_key: 1234567890 38 | xiaomi_gateway_key: AAAAAAAAAAAAAAAA 39 | xiaomi_gateway_mac: 11:11:11:11:11:11 40 | guest_001: person.a 41 | guest_002: person.a 42 | guest_003: person.a 43 | guest_004: person.a 44 | guest_005: person.a 45 | guest_006: person.a 46 | guest_007: person.a 47 | guest_008: person.a 48 | guest_009: person.a 49 | guest_010: person.a 50 | trusted_proxies_001: 0.0.0.0/0 51 | trusted_proxies_002: 0.0.0.0/0 52 | trusted_proxies_003: 0.0.0.0/0 53 | trusted_proxies_004: 0.0.0.0/0 54 | trusted_proxies_005: 0.0.0.0/0 55 | trusted_proxies_006: 0.0.0.0/0 56 | trusted_proxies_007: 0.0.0.0/0 57 | trusted_proxies_008: 0.0.0.0/0 58 | trusted_proxies_009: 0.0.0.0/0 59 | trusted_proxies_010: 0.0.0.0/0 60 | trusted_proxies_011: 0.0.0.0/0 61 | trusted_proxies_012: 0.0.0.0/0 62 | trusted_proxies_013: 0.0.0.0/0 63 | trusted_proxies_014: 0.0.0.0/0 64 | trusted_proxies_015: 0.0.0.0/0 65 | trusted_proxies_016: 0.0.0.0/0 66 | vacuum_xiaomi_host: 0.0.0.0 67 | vacuum_xiaomi_token: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 68 | vacuum_xiaomi_name: Default 69 | hacs_token: AAAAAAAAAAAAAAAAAAAAAAAA 70 | hasl_ri4key: aaaa 71 | hasl_si2key: aaaa 72 | hasl_tl2key: aaaa 73 | home_connect_client_id: 1111111 74 | home_connect_client_secret: 1111111 75 | miio_fan_bedroom_host: 1.1.1.1 76 | miio_fan_bedrrom_token: AAAAAAAA 77 | xiaomi_cloud_username: username 78 | xiaomi_cloud_password: password 79 | sonos_cloud_client_id: aaaaa 80 | sonos_cloud_client_secret: bbbbb 81 | -------------------------------------------------------------------------------- /package/homekit.yaml: -------------------------------------------------------------------------------- 1 | homekit: 2 | filter: 3 | include_domains: 4 | - binary_sensor 5 | - light 6 | include_entities: 7 | - alarm_control_panel.alarm 8 | - input_boolean.johnny_asleep 9 | - input_boolean.kajsa_asleep 10 | - input_boolean.lea_asleep 11 | - input_boolean.everyone_asleep 12 | - sensor.bedroom_temperature 13 | - sensor.living_room_motion_sensor_temperature 14 | - sensor.closet_temperature 15 | - sensor.bathroom_temperature 16 | - sensor.guest_bedroom_temperature 17 | - switch.balcony_switch 18 | - switch.guest_bedroom_switch 19 | - switch.kitchen_switch 20 | exclude_entities: 21 | - light.bedroom 22 | - light.living_room 23 | - light.balcony 24 | - light.closet 25 | - light.hallway 26 | - light.kitchen 27 | - light.guest_bedroom 28 | - light.bathroom 29 | - light.bathroom_ceiling_lamp_left 30 | - light.bathroom_ceiling_lamp_middle 31 | - light.bathroom_ceiling_lamp_right 32 | - light.rwl021_12 33 | - light.rwl021_23 34 | - light.rwl021_24 35 | - light.rwl021_25 36 | - light.rwl021_26 37 | exclude_entity_globs: 38 | - binary_sensor.nas_drive_* 39 | entity_config: 40 | alarm_control_panel.alarm: 41 | code: !secret alarm_code 42 | binary_sensor.balcony_entrance: 43 | linked_battery_sensor: sensor.balcony_entrance_battery_level 44 | binary_sensor.bathroom_door: 45 | linked_battery_sensor: sensor.bathroom_door_battery_level 46 | binary_sensor.bathroom_motion: 47 | linked_battery_sensor: sensor.bathroom_motion_battery_level 48 | binary_sensor.bathroom_water: 49 | linked_battery_sensor: sensor.bathroom_water_battery_level 50 | binary_sensor.bathroom_window: 51 | linked_battery_sensor: sensor.bathroom_window_battery_level 52 | binary_sensor.bedroom_motion: 53 | linked_battery_sensor: sensor.bedroom_motion_battery_level 54 | binary_sensor.bedroom_smoke: 55 | linked_battery_sensor: sensor.bedroom_smoke_battery_level 56 | binary_sensor.bedroom_window: 57 | linked_battery_sensor: sensor.bedroom_window_battery_level 58 | binary_sensor.guest_bedroom_motion: 59 | linked_battery_sensor: sensor.guest_bedroom_motion_battery_level 60 | binary_sensor.guest_bedroom_smoke: 61 | linked_battery_sensor: sensor.guest_bedroom_smoke_battery_level 62 | binary_sensor.guest_bedroom_window: 63 | linked_battery_sensor: sensor.guest_bedroom_window_battery_level 64 | binary_sensor.hallway_motion: 65 | linked_battery_sensor: sensor.hallway_motion_battery_level 66 | binary_sensor.hallway_smoke: 67 | linked_battery_sensor: sensor.hallway_smoke_battery_level 68 | binary_sensor.kitchen_motion: 69 | linked_battery_sensor: sensor.kitchen_motion_battery_level 70 | binary_sensor.kitchen_water: 71 | linked_battery_sensor: sensor.kitchen_water_battery_level 72 | binary_sensor.kitchen_window_left: 73 | linked_battery_sensor: sensor.kitchen_window_left_battery_level 74 | binary_sensor.kitchen_window_right: 75 | linked_battery_sensor: sensor.kitchen_window_right_battery_level 76 | binary_sensor.living_room_motion_sensor: 77 | linked_battery_sensor: sensor.living_room_motion_battery_level 78 | binary_sensor.living_room_window_left: 79 | linked_battery_sensor: sensor.living_room_window_left_battery_level 80 | binary_sensor.living_room_window_right: 81 | linked_battery_sensor: sensor.living_room_window_right_battery_level 82 | binary_sensor.main_entrance: 83 | linked_battery_sensor: sensor.main_entrance_battery_level 84 | switch.balcony_switch: 85 | type: outlet 86 | switch.guest_bedroom_switch: 87 | type: outlet 88 | switch.hallway_switch: 89 | type: outlet 90 | switch.kitchen_switch: 91 | type: outlet 92 | sensor.bedroom_temperature: 93 | linked_battery_sensor: sensor.bedroom_environment_battery_level 94 | sensor.closet_temperature: 95 | linked_battery_sensor: sensor.closet_environment_battery_level 96 | sensor.bathroom_temperature: 97 | linked_battery_sensor: sensor.bathroom_environment_battery_level 98 | sensor.guest_bedroom_temperature: 99 | linked_battery_sensor: sensor.guest_bedroom_environment_battery_level 100 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Home Assistant Config 2 | 3 | This is my [Home Assistant](https://home-assistant.io) configuration. The goal is to minimize manual control and leave as much as possible to automation. The configuration constantly evolves, so be sure to star the project to keep up with the updates. 4 | 5 | ## Automation 6 | 7 | Below are some of my most used automations, which make life just a bit easier and more fun. For a complete list, have a look in the `package/` folder of the repository for the details. 8 | 9 | ### Lighting 10 | 11 | - When the light in the living room is below 40 lx, enable "light mode", which means that window lamps turn on and room lighting reacts when people are in the room 12 | - When everyone are asleep, enable night lights when motion is detected 13 | - When a wall dimmer is used, it will override light automation for that room until it has been empty for 10 minutes, at which the automation resumes 14 | - Full light mode which, when enabled, will run the lights at 100% when motion is detected in a room, and is very useful when cleaning the home 15 | - Light simulation, where some lights will turn on depending on the sun even when nobody is home 16 | 17 | ### Security 18 | 19 | - When someone is about to leave and a door or window is open in the home, a notice sound will be played 20 | - When the last family member leaves the home, the alarm will automatically arm 21 | - When the first family member enters the home, the alarm will automatically disarm 22 | - When the last family member goes to sleep, the alarm will automatically arm for night 23 | - When the first family member wakes up, the alarm will automatically disarm 24 | - Guest mode which, when enabled, allow approved guests to be part of the alarm and sleep automation 25 | - Dead man's switch, which will alert everyone in the household if someone is home, but has not moved for four hours (excluding sleep) 26 | - If water is detected under the kitchen sink/dishwasher/dryer, an alert is sent to my phone 27 | 28 | ### Convenience 29 | 30 | - When it starts to rain and a window is open, an alert is sent to my phone 31 | - When the last person leaves and the alarm is turned on, the robot vacuum automatically starts 32 | - If someone comes home as the robot vacuum is cleaning, it goes back to the dock 33 | 34 | ## Screenshots 35 | 36 | Note that these screenshots are provided in a best-effort manner, and may not reflect the current state of the configuration. 37 | 38 | ![Home](images/1.png) 39 | 40 | ![Bedroom](images/2.png) 41 | 42 | ![Living Room](images/3.png) 43 | 44 | ![Balcony](images/4.png) 45 | 46 | ![Closet](images/5.png) 47 | 48 | ![Bathroom](images/6.png) 49 | 50 | ![Hallway](images/7.png) 51 | 52 | ![Kitchen](images/8.png) 53 | 54 | ![Guest Bedroom](images/9.png) 55 | 56 | ![Security](images/10.png) 57 | 58 | ![Cameras](images/11.png) 59 | 60 | 61 | ## Hardware 62 | 63 | The following is a list of hardware deployed in the home, grouped by room. The goal is to standardize as much as possible on Zigbee. 64 | 65 | ### Hubs 66 | - [Dresden Elektronik ConBee](https://www.dresden-elektronik.de/conbee/) 67 | - [Arlo Pro VMC4030](https://www.arlo.com/en-us/products/arlo-pro/) 68 | - [Arlo Pro Base station with siren](https://www.arlo.com/en-us/products/arlo-pro/) 69 | - [Logitech Harmony Companion](https://www.logitech.com/en-us/product/harmony-companion) 70 | 71 | ### Lights 72 | - [IKEA Trådfri Lights E14](http://www.ikea.com/se/sv/catalog/products/70318284/) 73 | - [IKEA Trådfri Lights E27](http://www.ikea.com/se/sv/catalog/products/10318263/) 74 | - [IKEA Trådfri Lights GU10](http://www.ikea.com/se/sv/catalog/products/00318292/) 75 | - [IKEA Trådfri 30W Transformer](https://www.ikea.com/se/sv/catalog/products/60342656/) 76 | - [Osram Lightify LED Strip](https://smartplus.ledvance.com/products/index.jsp) 77 | - [Philips Hue Aurelle Round](https://www2.meethue.com/sv-se/p/hue-white-ambiance-aurelle-rund-panelbelysning/3216431P5) 78 | - [Philips Hue White and Color Ambiance E14](https://www2.meethue.com/en-us/p/hue-white-and-color-ambiance-single-bulb-e12/046677468903) 79 | - [Philips Hue White and Color Ambiance E27](https://www2.meethue.com/en-us/p/hue-white-and-color-ambiance-single-bulb-e26/046677464486) 80 | - [Xiaomi Mijia MJCTD01YL Yeelight Bedside Lamp](https://www.gearbest.com/smart-lighting/pp_1032313.html) 81 | - [Xiaomi Yeelight Lightstrip](https://xiaomi-mi.com/smart-lighting/xiaomi-yeelight-smart-led-lightstrip-ipl/) 82 | 83 | ### Switches 84 | - [Osram SMART+ Plug](https://www.osram-lamps.com/ecatalog/smart-home/smart-home-components/smart-plug/index.jsp) 85 | - [Sunricher Zigbee dimmer](https://www.sunricher.com/zigbee-ac-phase-cut-dimmer-sr-zg9101sac-hp.html) 86 | 87 | ### Sensors 88 | - [Philips Hue Motion Sensor](https://www2.meethue.com/en-us/p/hue-motion-sensor/046677473389) 89 | - [Xiaomi Mi Smart Home Door / Window Sensor](https://xiaomi-mi.com/sockets-and-sensors/xiaomi-mi-door-window-sensors/) 90 | - [Xiaomi Mi Smart Home Occupancy Sensor](https://xiaomi-mi.com/sockets-and-sensors/xiaomi-mi-occupancy-sensor/) 91 | - [Xiaomi Mi Smart Home Temperature / Humidity Sensor](https://xiaomi-mi.com/sockets-and-sensors/xiaomi-mi-temperature-humidity-sensor/) 92 | - [Xiaomi/Honeywell Smoke Detector](https://xiaomi-mi.com/sockets-and-sensors/xiaomi-mijia-honeywell-smoke-detector-white/) 93 | - [Xiaomi Mijia Aqara Water sensor](https://xiaomi-mi.com/sockets-and-sensors/xiaomi-mijia-aqara-water-sensor/) 94 | 95 | ### Dimmers 96 | - [IKEA Trådfri Dimmer](http://www.ikea.com/us/en/catalog/products/00347831/) 97 | - [Philips Hue Dimmer Switch](https://www2.meethue.com/en-us/p/hue-dimmer-switch/046677473372) 98 | - [Xiaomi Mi Smart Home Wireless Switch](https://xiaomi-mi.com/sockets-and-sensors/xiaomi-mi-wireless-switch/) 99 | 100 | ### Speakers 101 | - [IKEA Symfonisk bookshelf speaker](https://www.ikea.com/se/sv/p/symfonisk-wifi-bokhyllehoegtalare-svart-50357554/) 102 | - [IKEA Symfonisk table speaker](https://www.ikea.com/se/sv/p/symfonisk-bordslampa-med-wifi-hoegtalare-vit-30435157/) 103 | - [Sonos Playbase](https://www.sonos.com/en/shop/playbase.html) 104 | - [Sonos Sub](https://www.sonos.com/en/shop/sub.html) 105 | 106 | ### Vacuum 107 | - [Xiaomi Roborock S50](https://www.aliexpress.com/item/International-Version-Xiaomi-Roborock-S50-Robot-Vacuum-Cleaner-2-WIFI-APP-Control-Wet-Mop-Smart-Planned/32837327014.html) 108 | 109 | -------------------------------------------------------------------------------- /package/occupancy.yaml: -------------------------------------------------------------------------------- 1 | input_boolean: 2 | bedroom_occupancy_automation: 3 | name: Bedroom Motion Detection 4 | icon: mdi:eye-outline 5 | living_room_occupancy_automation: 6 | name: Living Room Motion Detection 7 | icon: mdi:eye-outline 8 | bathroom_occupancy_automation: 9 | name: Bathroom Motion Detection 10 | icon: mdi:eye-outline 11 | hallway_occupancy_automation: 12 | name: Hallway Motion Detection 13 | icon: mdi:eye-outline 14 | kitchen_occupancy_automation: 15 | name: Kitchen Motion Detection 16 | icon: mdi:eye-outline 17 | office_occupancy_automation: 18 | name: Office Motion Detection 19 | icon: mdi:eye-outline 20 | leas_occupancy_automation: 21 | name: Leas Motion Detection 22 | icon: mdi:eye-outline 23 | claras_occupancy_automation: 24 | name: Claras Motion Detection 25 | icon: mdi:eye-outline 26 | entrance_occupancy_automation: 27 | name: Entrance Motion Detection 28 | icon: mdi:eye-outline 29 | dining_room_occupancy_automation: 30 | name: Dining Room Motion Detection 31 | icon: mdi:eye-outline 32 | parents_hallway_occupancy_automation: 33 | name: Parents Hallway Motion Detection 34 | icon: mdi:eye-outline 35 | kids_hallway_occupancy_automation: 36 | name: Kids Hallway Motion Detection 37 | icon: mdi:eye-outline 38 | 39 | binary_sensor: 40 | - platform: template 41 | sensors: 42 | bedroom_occupied: 43 | friendly_name: Bedroom Occupied 44 | icon_template: mdi:walk 45 | value_template: > 46 | {{ is_state("input_boolean.bedroom_occupancy_automation", "on") and ( 47 | is_state("binary_sensor.bedroom_motion_sensor", "on") or 48 | is_state("binary_sensor.working", "on") 49 | ) 50 | }} 51 | delay_off: "00:10:00" 52 | 53 | living_room_occupied: 54 | friendly_name: Living Room Occupied 55 | icon_template: mdi:walk 56 | value_template: > 57 | {{ is_state("input_boolean.living_room_occupancy_automation", "on") and ( 58 | is_state("binary_sensor.living_room_motion_occupancy", "on") or 59 | is_state("remote.living_room_apple_tv", "on") ) 60 | }} 61 | delay_off: "00:10:00" 62 | 63 | bathroom_occupied: 64 | friendly_name: Bathroom Occupied 65 | icon_template: mdi:walk 66 | value_template: > 67 | {{ is_state("input_boolean.bathroom_occupancy_automation", "on") and ( 68 | is_state("binary_sensor.bathroom_motion_sensor", "on") or 69 | is_state("binary_sensor.bathroom_shower", "on")) 70 | }} 71 | delay_off: "00:05:00" 72 | 73 | kitchen_occupied: 74 | friendly_name: Kitchen Occupied 75 | icon_template: mdi:walk 76 | value_template: > 77 | {{ is_state("input_boolean.kitchen_occupancy_automation", "on") and 78 | is_state("binary_sensor.kitchen_motion_sensor", "on") }} 79 | delay_off: "00:02:00" 80 | 81 | bathroom_shower: 82 | friendly_name: Bathroom Shower 83 | value_template: > 84 | {{ states("sensor.bathroom_humidity") | float(0) > 60 }} 85 | 86 | # is_state("bathroom_door_closed_inside", "on")) 87 | # bathroom_door_closed_inside: 88 | # friendly_name: Bathroom Door Closed Inside 89 | # value_template: > 90 | # {{ (as_timestamp(states.binary_sensor.bathroom_motion.last_changed) > as_timestamp(states.binary_sensor.bathroom_door.last_changed) or 91 | # as_timestamp(states.binary_sensor.bathroom_shower.last_changed) > as_timestamp(states.binary_sensor.bathroom_door.last_changed)) and 92 | # is_state("binary_sensor.bathroom_door", "off") }} 93 | 94 | office_occupied: 95 | friendly_name: Office Occupied 96 | icon_template: mdi:walk 97 | value_template: > 98 | {{ is_state("input_boolean.office_occupancy_automation", "on") and 99 | (is_state("binary_sensor.office_motion_sensor", "on") or 100 | (is_state("binary_sensor.stk_jchadda_active", "on" 101 | and is_state("device_tracker.stk_jchadda", "home")) 102 | )) 103 | }} 104 | delay_off: "00:10:00" 105 | 106 | leas_occupied: 107 | friendly_name: Leas Occupied 108 | icon_template: mdi:walk 109 | value_template: > 110 | {{ is_state("input_boolean.leas_occupancy_automation", "on") and 111 | is_state("binary_sensor.leas_motion_sensor", "on") 112 | }} 113 | delay_off: "00:10:00" 114 | 115 | claras_occupied: 116 | friendly_name: Claras Occupied 117 | icon_template: mdi:walk 118 | value_template: > 119 | {{ is_state("input_boolean.claras_occupancy_automation", "on") and 120 | is_state("binary_sensor.claras_motion_sensor", "on") 121 | }} 122 | delay_off: "00:10:00" 123 | 124 | entrance_occupied: 125 | friendly_name: Entrance Occupied 126 | icon_template: mdi:walk 127 | value_template: > 128 | {{ is_state("input_boolean.entrance_occupancy_automation", "on") and ( 129 | is_state("binary_sensor.entrance_motion_sensor", "on") or 130 | is_state("binary_sensor.entrance_door", "on")) 131 | }} 132 | delay_off: "00:01:00" 133 | 134 | dining_room_occupied: 135 | friendly_name: Dining Room Occupied 136 | icon_template: mdi:walk 137 | value_template: > 138 | {{ is_state("input_boolean.dining_room_occupancy_automation", "on") and 139 | is_state("binary_sensor.dining_room_motion_sensor", "on") 140 | }} 141 | delay_off: "00:02:00" 142 | 143 | parents_hallway_occupied: 144 | friendly_name: Parents Hallway Occupied 145 | icon_template: mdi:walk 146 | value_template: > 147 | {{ is_state("input_boolean.parents_hallway_occupancy_automation", "on") and 148 | is_state("binary_sensor.parents_hallway_motion_sensor", "on") 149 | }} 150 | 151 | kids_hallway_occupied: 152 | friendly_name: Kids Hallway Occupied 153 | icon_template: mdi:walk 154 | value_template: > 155 | {{ is_state("input_boolean.kids_hallway_occupancy_automation", "on") and 156 | is_state("binary_sensor.kids_hallway_motion_sensor", "on") 157 | }} 158 | -------------------------------------------------------------------------------- /automations.yaml: -------------------------------------------------------------------------------- 1 | - id: '1642025711606' 2 | alias: Bedroom Bedside Buttons 3 | description: '' 4 | trigger: 5 | - device_id: 80eedb22c1b407b3899f8026e7580efa 6 | domain: zha 7 | platform: device 8 | type: remote_button_double_press 9 | subtype: remote_button_double_press 10 | id: left-button-light 11 | - device_id: f14c912df614bac37bd2d261ef5919cd 12 | domain: zha 13 | platform: device 14 | type: remote_button_double_press 15 | subtype: remote_button_double_press 16 | id: right-button-light 17 | - device_id: 80eedb22c1b407b3899f8026e7580efa 18 | domain: zha 19 | platform: device 20 | type: remote_button_short_press 21 | subtype: remote_button_short_press 22 | id: left-button-sleep 23 | - device_id: f14c912df614bac37bd2d261ef5919cd 24 | domain: zha 25 | platform: device 26 | type: remote_button_short_press 27 | subtype: remote_button_short_press 28 | id: right-button-sleep 29 | condition: [] 30 | action: 31 | - choose: 32 | - conditions: 33 | - condition: trigger 34 | id: left-button-light 35 | sequence: 36 | - service: light.toggle 37 | data: {} 38 | target: 39 | entity_id: light.bedroom_bedside_left 40 | - conditions: 41 | - condition: trigger 42 | id: right-button-light 43 | sequence: 44 | - service: light.toggle 45 | data: {} 46 | target: 47 | entity_id: light.bedroom_bedside_right 48 | - conditions: 49 | - condition: trigger 50 | id: left-button-sleep 51 | sequence: 52 | - service: input_boolean.toggle 53 | data: {} 54 | target: 55 | entity_id: input_boolean.johnny_asleep 56 | - conditions: 57 | - condition: trigger 58 | id: right-button-sleep 59 | sequence: 60 | - service: input_boolean.toggle 61 | data: {} 62 | target: 63 | entity_id: input_boolean.kajsa_asleep 64 | mode: single 65 | - id: '1643660307472' 66 | alias: Leas Disco Lights 67 | description: '' 68 | trigger: 69 | - device_id: 93dadd13aea802b3214c9a2669a1fe95 70 | domain: zha 71 | platform: device 72 | type: remote_button_short_press 73 | subtype: remote_button_short_press 74 | id: Disco 75 | - platform: state 76 | entity_id: 77 | - input_button.leas_disco 78 | condition: 79 | - condition: state 80 | entity_id: input_boolean.lea_asleep 81 | state: 'off' 82 | action: 83 | - service: input_boolean.turn_off 84 | entity_id: input_boolean.leas_occupancy_automation 85 | - service: switch.turn_on 86 | data: {} 87 | target: 88 | entity_id: switch.leas_disco 89 | - service: light.turn_on 90 | target: 91 | entity_id: 92 | - light.leas_cloud 93 | - light.leas_ceiling 94 | - light.leas_desk 95 | data: 96 | effect: colorloop 97 | brightness_pct: 70 98 | color_name: purple 99 | - service: light.turn_off 100 | data: {} 101 | target: 102 | entity_id: light.leas_window 103 | - service: media_player.select_source 104 | entity_id: media_player.leas_room 105 | data: 106 | source: Lea Partyknapp 107 | - service: media_player.shuffle_set 108 | entity_id: media_player.leas_room 109 | data: 110 | shuffle: true 111 | - delay: 00:00:10 112 | - wait_for_trigger: 113 | - device_id: 93dadd13aea802b3214c9a2669a1fe95 114 | domain: zha 115 | platform: device 116 | type: remote_button_short_press 117 | subtype: remote_button_short_press 118 | - platform: state 119 | entity_id: 120 | - binary_sensor.leas_motion_sensor 121 | to: 'off' 122 | enabled: true 123 | for: 124 | hours: 0 125 | minutes: 10 126 | seconds: 0 127 | - platform: state 128 | entity_id: 129 | - input_button.leas_disco 130 | continue_on_timeout: false 131 | - service: media_player.media_pause 132 | entity_id: media_player.leas_room 133 | - service: switch.turn_off 134 | data: {} 135 | target: 136 | entity_id: switch.leas_disco 137 | - service: light.turn_on 138 | target: 139 | entity_id: 140 | - light.leas_cloud 141 | - light.leas_ceiling 142 | - light.leas_desk 143 | - light.leas_window 144 | data: 145 | effect: stop 146 | - service: adaptive_lighting.set_manual_control 147 | data: 148 | entity_id: switch.adaptive_lighting_main 149 | manual_control: false 150 | lights: 151 | - light.leas_ceiling 152 | - light.leas_desk 153 | - service: input_boolean.turn_on 154 | entity_id: input_boolean.leas_occupancy_automation 155 | - delay: 00:00:10 156 | mode: single 157 | - id: '1659718576943' 158 | alias: Leas Dimmer 159 | description: '' 160 | use_blueprint: 161 | path: mannerisms/zha-philips-hue-dimmer-switch-individual-buttons-with-long-presses.yaml 162 | input: 163 | remote: 21dd6ae37a5bbb90269847a0a303f023 164 | button_1_single_press: 165 | - if: 166 | - condition: state 167 | entity_id: switch.leas_disco 168 | state: 'off' 169 | then: 170 | - service: input_boolean.turn_off 171 | data: {} 172 | target: 173 | entity_id: input_boolean.lea_asleep 174 | - service: cover.open_cover 175 | data: {} 176 | target: 177 | entity_id: cover.leas_blind_cover 178 | button_4_single_press: 179 | - if: 180 | - condition: state 181 | entity_id: switch.leas_disco 182 | state: 'off' 183 | then: 184 | - service: input_boolean.turn_on 185 | data: {} 186 | target: 187 | entity_id: input_boolean.lea_asleep 188 | - service: cover.close_cover 189 | data: {} 190 | target: 191 | entity_id: cover.leas_blind_cover 192 | button_3_single_press: 193 | - service: light.toggle 194 | data: {} 195 | target: 196 | entity_id: light.leas_ambient_lights 197 | - id: '1662406786449' 198 | alias: Dining Room Motion Lights 199 | description: '' 200 | trigger: 201 | - platform: state 202 | entity_id: 203 | - binary_sensor.dining_room_occupied 204 | condition: 205 | - condition: state 206 | entity_id: input_boolean.dining_room_occupancy_automation 207 | state: 'on' 208 | action: 209 | - choose: 210 | - conditions: 211 | - condition: state 212 | entity_id: binary_sensor.dining_room_occupied 213 | state: 'on' 214 | sequence: 215 | - service: light.turn_on 216 | data: {} 217 | target: 218 | entity_id: 219 | - light.dining_room_motion_lights 220 | - conditions: 221 | - condition: state 222 | entity_id: binary_sensor.dining_room_occupied 223 | state: 'off' 224 | sequence: 225 | - service: light.turn_off 226 | data: {} 227 | target: 228 | entity_id: 229 | - light.dining_room_motion_lights 230 | mode: single 231 | - id: '1662494423008' 232 | alias: Living Room Motion Lights 233 | description: '' 234 | trigger: 235 | - platform: state 236 | entity_id: 237 | - binary_sensor.living_room_occupied 238 | - platform: state 239 | entity_id: 240 | - alarm_control_panel.alarm 241 | to: disarmed 242 | from: armed_night 243 | condition: 244 | - condition: state 245 | entity_id: input_boolean.living_room_occupancy_automation 246 | state: 'on' 247 | action: 248 | - choose: 249 | - conditions: 250 | - condition: state 251 | entity_id: binary_sensor.living_room_occupied 252 | state: 'on' 253 | - condition: or 254 | conditions: 255 | - condition: state 256 | entity_id: alarm_control_panel.alarm 257 | state: armed_home 258 | - condition: state 259 | entity_id: alarm_control_panel.alarm 260 | state: disarmed 261 | sequence: 262 | - service: light.turn_on 263 | data: {} 264 | target: 265 | entity_id: 266 | - light.living_room_motion_lights 267 | - conditions: 268 | - condition: state 269 | entity_id: binary_sensor.living_room_occupied 270 | state: 'off' 271 | sequence: 272 | - service: light.turn_off 273 | data: {} 274 | target: 275 | entity_id: 276 | - light.living_room_motion_lights 277 | mode: single 278 | - id: '1662495004005' 279 | alias: Living Room TV 280 | description: '' 281 | trigger: 282 | - platform: state 283 | entity_id: 284 | - media_player.living_room_apple_tv 285 | to: playing 286 | id: Playing 287 | - platform: state 288 | entity_id: 289 | - media_player.living_room_apple_tv 290 | to: paused 291 | id: Paused 292 | - platform: state 293 | entity_id: 294 | - device_tracker.samsung_tv 295 | to: home 296 | id: Tv on 297 | - platform: state 298 | entity_id: 299 | - sensor.living_room_audio_input_format 300 | to: No input connected 301 | id: Tv off 302 | condition: 303 | - condition: state 304 | entity_id: input_boolean.living_room_occupancy_automation 305 | state: 'on' 306 | - condition: state 307 | entity_id: alarm_control_panel.alarm 308 | state: disarmed 309 | action: 310 | - choose: 311 | - conditions: 312 | - condition: trigger 313 | id: Playing 314 | sequence: 315 | - service: light.turn_on 316 | data: 317 | kelvin: 6500 318 | brightness_pct: '{{ state_attr(''switch.adaptive_lighting_main'', ''brightness_pct'') 319 | }}' 320 | target: 321 | entity_id: 322 | - light.living_room_tv 323 | - conditions: 324 | - condition: trigger 325 | id: Paused 326 | sequence: 327 | - service: adaptive_lighting.set_manual_control 328 | data: 329 | entity_id: switch.adaptive_lighting_main 330 | manual_control: false 331 | lights: 332 | - light.living_room_tv 333 | - conditions: 334 | - condition: trigger 335 | id: Tv on 336 | sequence: 337 | - service: remote.turn_on 338 | data: {} 339 | target: 340 | entity_id: remote.living_room_apple_tv 341 | - conditions: 342 | - condition: trigger 343 | id: Tv off 344 | sequence: 345 | - service: remote.turn_off 346 | data: {} 347 | target: 348 | entity_id: remote.living_room_apple_tv 349 | mode: single 350 | - id: '1662495737466' 351 | alias: Office Motion Lights 352 | description: '' 353 | trigger: 354 | - platform: state 355 | entity_id: 356 | - binary_sensor.office_occupied 357 | condition: 358 | - condition: state 359 | entity_id: input_boolean.office_occupancy_automation 360 | state: 'on' 361 | - condition: state 362 | entity_id: alarm_control_panel.alarm 363 | state: disarmed 364 | action: 365 | - choose: 366 | - conditions: 367 | - condition: state 368 | entity_id: binary_sensor.office_occupied 369 | state: 'on' 370 | sequence: 371 | - service: light.turn_on 372 | data: {} 373 | target: 374 | entity_id: 375 | - light.office_motion_lights 376 | - conditions: 377 | - condition: state 378 | entity_id: binary_sensor.office_occupied 379 | state: 'off' 380 | sequence: 381 | - service: light.turn_off 382 | data: {} 383 | target: 384 | entity_id: 385 | - light.office_motion_lights 386 | mode: single 387 | - id: '1662495940886' 388 | alias: Office Meeting Light 389 | description: '' 390 | trigger: 391 | - platform: state 392 | entity_id: 393 | - binary_sensor.stk_jchadda_camera_in_use 394 | to: 'on' 395 | condition: 396 | - condition: state 397 | entity_id: input_boolean.office_occupancy_automation 398 | state: 'on' 399 | - condition: state 400 | entity_id: binary_sensor.office_occupied 401 | state: 'on' 402 | action: 403 | - service: light.turn_on 404 | data: 405 | kelvin: 5500 406 | brightness_pct: 100 407 | target: 408 | entity_id: 409 | - light.office_monitor 410 | - wait_for_trigger: 411 | - platform: state 412 | entity_id: 413 | - binary_sensor.stk_jchadda_camera_in_use 414 | to: 'off' 415 | continue_on_timeout: false 416 | - service: adaptive_lighting.set_manual_control 417 | data: 418 | entity_id: switch.adaptive_lighting_main 419 | manual_control: false 420 | lights: 421 | - light.office_monitor 422 | mode: single 423 | - id: '1662496146005' 424 | alias: Office Sleep 425 | description: '' 426 | trigger: 427 | - platform: state 428 | entity_id: 429 | - input_boolean.guest_asleep 430 | action: 431 | - choose: 432 | - conditions: 433 | - condition: state 434 | entity_id: input_boolean.guest_asleep 435 | state: 'off' 436 | sequence: 437 | - service: input_boolean.turn_on 438 | data: {} 439 | target: 440 | entity_id: input_boolean.office_occupancy_automation 441 | - service: light.turn_on 442 | data: {} 443 | target: 444 | entity_id: 445 | - light.office_ambient_lights 446 | - if: 447 | - condition: state 448 | entity_id: binary_sensor.office_occupied 449 | state: 'on' 450 | then: 451 | - service: light.turn_on 452 | data: {} 453 | target: 454 | entity_id: 455 | - light.office_motion_lights 456 | - conditions: 457 | - condition: state 458 | entity_id: input_boolean.guest_asleep 459 | state: 'on' 460 | sequence: 461 | - service: input_boolean.turn_off 462 | data: {} 463 | target: 464 | entity_id: input_boolean.office_occupancy_automation 465 | - service: light.turn_off 466 | data: {} 467 | target: 468 | entity_id: 469 | - light.office_ambient_lights 470 | - light.office_motion_lights 471 | default: [] 472 | mode: single 473 | - id: '1662577180994' 474 | alias: Kitchen Motion Lights 475 | description: '' 476 | trigger: 477 | - platform: state 478 | entity_id: 479 | - binary_sensor.kitchen_occupied 480 | condition: 481 | - condition: state 482 | entity_id: input_boolean.kitchen_occupancy_automation 483 | state: 'on' 484 | action: 485 | - choose: 486 | - conditions: 487 | - condition: state 488 | entity_id: binary_sensor.kitchen_occupied 489 | state: 'on' 490 | sequence: 491 | - service: light.turn_on 492 | data: {} 493 | target: 494 | entity_id: 495 | - light.kitchen_motion_lights 496 | - conditions: 497 | - condition: state 498 | entity_id: binary_sensor.kitchen_occupied 499 | state: 'off' 500 | sequence: 501 | - service: light.turn_off 502 | data: {} 503 | target: 504 | entity_id: 505 | - light.kitchen_motion_lights 506 | mode: single 507 | - id: '1662577519917' 508 | alias: Entrance Motion Lights 509 | description: '' 510 | trigger: 511 | - platform: state 512 | entity_id: 513 | - binary_sensor.entrance_occupied 514 | - platform: state 515 | entity_id: 516 | - binary_sensor.entrance_door 517 | to: 'on' 518 | condition: 519 | - condition: state 520 | entity_id: input_boolean.entrance_occupancy_automation 521 | state: 'on' 522 | action: 523 | - choose: 524 | - conditions: 525 | - condition: state 526 | entity_id: binary_sensor.entrance_occupied 527 | state: 'on' 528 | sequence: 529 | - service: light.turn_on 530 | data: {} 531 | target: 532 | entity_id: 533 | - light.entrance_motion_lights 534 | - conditions: 535 | - condition: state 536 | entity_id: binary_sensor.entrance_occupied 537 | state: 'off' 538 | sequence: 539 | - service: light.turn_off 540 | data: {} 541 | target: 542 | entity_id: 543 | - light.entrance_motion_lights 544 | - conditions: 545 | - condition: state 546 | entity_id: binary_sensor.entrance_door 547 | state: 'on' 548 | sequence: 549 | - service: light.turn_on 550 | data: {} 551 | target: 552 | entity_id: 553 | - light.entrance_motion_lights 554 | - service: aarlo.camera_start_recording 555 | data: 556 | entity_id: camera.aarlo_hallway 557 | duration: 60 558 | mode: single 559 | - id: '1662578144605' 560 | alias: Bathroom Motion Lights 561 | description: '' 562 | trigger: 563 | - platform: state 564 | entity_id: 565 | - binary_sensor.bathroom_occupied 566 | id: Occupancy 567 | - platform: state 568 | entity_id: 569 | - alarm_control_panel.alarm 570 | to: armed_night 571 | id: Sleep 572 | condition: 573 | - condition: state 574 | entity_id: input_boolean.bathroom_occupancy_automation 575 | state: 'on' 576 | action: 577 | - choose: 578 | - conditions: 579 | - condition: state 580 | entity_id: binary_sensor.bathroom_occupied 581 | state: 'on' 582 | - condition: state 583 | entity_id: alarm_control_panel.alarm 584 | state: disarmed 585 | sequence: 586 | - service: media_player.volume_set 587 | data: 588 | entity_id: media_player.bathroom 589 | volume_level: 0.08 590 | - choose: 591 | - conditions: 592 | - condition: state 593 | entity_id: media_player.living_room 594 | state: playing 595 | sequence: 596 | - service: media_player.join 597 | data: 598 | group_members: 599 | - media_player.bathroom 600 | target: 601 | entity_id: media_player.living_room 602 | - conditions: 603 | - condition: state 604 | entity_id: media_player.living_room 605 | state: idle 606 | sequence: 607 | - service: media_player.select_source 608 | data: 609 | entity_id: media_player.bathroom 610 | source: Classic Singer/Songwriter 611 | - conditions: 612 | - condition: or 613 | conditions: 614 | - condition: trigger 615 | id: Sleep 616 | - condition: state 617 | entity_id: binary_sensor.bathroom_occupied 618 | state: 'off' 619 | sequence: 620 | - service: media_player.unjoin 621 | data: {} 622 | target: 623 | entity_id: media_player.bathroom 624 | - service: sonos.set_sleep_timer 625 | data: 626 | entity_id: media_player.bathroom 627 | sleep_time: 0 628 | mode: single 629 | - id: '1662579290986' 630 | alias: Bedroom Motion Lights 631 | description: '' 632 | trigger: 633 | - platform: state 634 | entity_id: 635 | - binary_sensor.bedroom_occupied 636 | condition: 637 | - condition: state 638 | entity_id: input_boolean.bedroom_occupancy_automation 639 | state: 'on' 640 | action: 641 | - choose: 642 | - conditions: 643 | - condition: state 644 | entity_id: binary_sensor.bedroom_occupied 645 | state: 'on' 646 | sequence: 647 | - service: light.turn_on 648 | data: {} 649 | target: 650 | entity_id: 651 | - light.bedroom_motion_lights 652 | - conditions: 653 | - condition: state 654 | entity_id: binary_sensor.bedroom_occupied 655 | state: 'off' 656 | sequence: 657 | - service: light.turn_off 658 | data: {} 659 | target: 660 | entity_id: 661 | - light.bedroom_motion_lights 662 | mode: single 663 | - id: '1662579429578' 664 | alias: Bedroom Sleep 665 | description: '' 666 | trigger: 667 | - platform: state 668 | entity_id: 669 | - input_boolean.johnny_asleep 670 | - platform: state 671 | entity_id: 672 | - input_boolean.kajsa_asleep 673 | condition: [] 674 | action: 675 | - choose: 676 | - conditions: 677 | - condition: state 678 | entity_id: input_boolean.johnny_asleep 679 | state: 'off' 680 | - condition: state 681 | entity_id: input_boolean.kajsa_asleep 682 | state: 'off' 683 | sequence: 684 | - service: input_boolean.turn_on 685 | data: {} 686 | target: 687 | entity_id: input_boolean.bedroom_occupancy_automation 688 | - service: light.turn_on 689 | data: {} 690 | target: 691 | entity_id: light.bedroom_window 692 | - if: 693 | - condition: state 694 | entity_id: binary_sensor.bedroom_occupied 695 | state: 'on' 696 | then: 697 | - service: light.turn_on 698 | data: {} 699 | target: 700 | entity_id: 701 | - light.bedroom_sideboard 702 | - light.bedroom_ceiling 703 | - light.bedroom_window 704 | - service: cover.open_cover 705 | data: {} 706 | target: 707 | entity_id: 708 | - cover.bedroom_blind_left_cover 709 | - cover.bedroom_blind_right_cover 710 | - conditions: 711 | - condition: or 712 | conditions: 713 | - condition: state 714 | entity_id: input_boolean.johnny_asleep 715 | state: 'on' 716 | - condition: state 717 | entity_id: input_boolean.kajsa_asleep 718 | state: 'on' 719 | - condition: state 720 | entity_id: input_boolean.bedroom_occupancy_automation 721 | state: 'on' 722 | sequence: 723 | - service: input_boolean.turn_off 724 | data: {} 725 | target: 726 | entity_id: input_boolean.bedroom_occupancy_automation 727 | - service: light.turn_off 728 | data: {} 729 | target: 730 | entity_id: 731 | - light.bedroom_ambient_lights 732 | - light.bedroom_motion_lights 733 | - service: cover.close_cover 734 | data: {} 735 | target: 736 | entity_id: 737 | - cover.bedroom_blind_left_cover 738 | - cover.bedroom_blind_right_cover 739 | - if: 740 | - condition: state 741 | entity_id: person.johnny 742 | state: home 743 | - condition: state 744 | entity_id: person.kajsa 745 | state: home 746 | then: 747 | - service: light.turn_on 748 | data: {} 749 | target: 750 | entity_id: light.bedroom_sideboard_nightlight 751 | - conditions: 752 | - condition: state 753 | entity_id: input_boolean.bedroom_occupancy_automation 754 | state: 'off' 755 | - condition: state 756 | entity_id: light.bedroom_sideboard_nightlight 757 | state: 'on' 758 | sequence: 759 | - if: 760 | - condition: state 761 | entity_id: person.johnny 762 | state: home 763 | - condition: state 764 | entity_id: person.kajsa 765 | state: home 766 | then: 767 | - service: light.turn_off 768 | data: {} 769 | target: 770 | entity_id: light.bedroom_sideboard_nightlight 771 | default: [] 772 | mode: single 773 | - id: '1662580751644' 774 | alias: Claras Sleep 775 | description: '' 776 | trigger: 777 | - platform: state 778 | entity_id: 779 | - input_boolean.clara_asleep 780 | condition: [] 781 | action: 782 | - choose: 783 | - conditions: 784 | - condition: state 785 | entity_id: input_boolean.clara_asleep 786 | state: 'off' 787 | sequence: 788 | - service: input_boolean.turn_on 789 | data: {} 790 | target: 791 | entity_id: input_boolean.claras_occupancy_automation 792 | - service: light.turn_on 793 | data: {} 794 | target: 795 | entity_id: 796 | - light.claras_ambient_lights 797 | - if: 798 | - condition: state 799 | entity_id: binary_sensor.claras_occupied 800 | state: 'on' 801 | then: 802 | - service: light.turn_on 803 | data: {} 804 | target: 805 | entity_id: 806 | - light.claras_motion_lights 807 | - conditions: 808 | - condition: state 809 | entity_id: input_boolean.clara_asleep 810 | state: 'on' 811 | sequence: 812 | - service: input_boolean.turn_off 813 | data: {} 814 | target: 815 | entity_id: input_boolean.claras_occupancy_automation 816 | - service: light.turn_off 817 | data: {} 818 | target: 819 | entity_id: 820 | - light.claras_ambient_lights 821 | - light.claras_motion_lights 822 | default: [] 823 | mode: single 824 | - id: '1662581103228' 825 | alias: Claras Motion Lights 826 | description: '' 827 | trigger: 828 | - platform: state 829 | entity_id: 830 | - binary_sensor.claras_occupied 831 | condition: 832 | - condition: state 833 | entity_id: input_boolean.claras_occupancy_automation 834 | state: 'on' 835 | action: 836 | - choose: 837 | - conditions: 838 | - condition: state 839 | entity_id: binary_sensor.claras_occupied 840 | state: 'on' 841 | sequence: 842 | - service: light.turn_on 843 | data: {} 844 | target: 845 | entity_id: 846 | - light.claras_motion_lights 847 | - conditions: 848 | - condition: state 849 | entity_id: binary_sensor.claras_occupied 850 | state: 'off' 851 | sequence: 852 | - service: light.turn_off 853 | data: {} 854 | target: 855 | entity_id: 856 | - light.claras_motion_lights 857 | mode: single 858 | - id: '1662581458889' 859 | alias: Leas Sleep 860 | description: '' 861 | trigger: 862 | - platform: state 863 | entity_id: 864 | - input_boolean.lea_asleep 865 | condition: [] 866 | action: 867 | - choose: 868 | - conditions: 869 | - condition: state 870 | entity_id: input_boolean.lea_asleep 871 | state: 'off' 872 | sequence: 873 | - service: input_boolean.turn_on 874 | data: {} 875 | target: 876 | entity_id: input_boolean.leas_occupancy_automation 877 | - service: light.turn_on 878 | data: {} 879 | target: 880 | entity_id: 881 | - light.leas_ambient_lights 882 | - if: 883 | - condition: state 884 | entity_id: binary_sensor.leas_occupied 885 | state: 'on' 886 | then: 887 | - service: light.turn_on 888 | data: {} 889 | target: 890 | entity_id: 891 | - light.leas_motion_lights 892 | - conditions: 893 | - condition: state 894 | entity_id: input_boolean.lea_asleep 895 | state: 'on' 896 | sequence: 897 | - service: input_boolean.turn_off 898 | data: {} 899 | target: 900 | entity_id: input_boolean.leas_occupancy_automation 901 | - service: light.turn_off 902 | data: {} 903 | target: 904 | entity_id: 905 | - light.leas_ambient_lights 906 | - light.leas_motion_lights 907 | default: [] 908 | mode: single 909 | - id: '1662581652177' 910 | alias: Leas Motion Lights 911 | description: '' 912 | trigger: 913 | - platform: state 914 | entity_id: 915 | - binary_sensor.leas_occupied 916 | condition: 917 | - condition: state 918 | entity_id: input_boolean.leas_occupancy_automation 919 | state: 'on' 920 | action: 921 | - choose: 922 | - conditions: 923 | - condition: state 924 | state: 'off' 925 | entity_id: binary_sensor.leas_occupied 926 | sequence: 927 | - service: light.turn_off 928 | data: {} 929 | target: 930 | entity_id: 931 | - light.leas_motion_lights 932 | - conditions: 933 | - condition: state 934 | state: 'on' 935 | entity_id: binary_sensor.leas_occupied 936 | sequence: 937 | - service: light.turn_on 938 | data: {} 939 | target: 940 | entity_id: 941 | - light.leas_motion_lights 942 | mode: single 943 | - id: '1662751062130' 944 | alias: Dining Room Music 945 | description: '' 946 | trigger: 947 | - platform: state 948 | entity_id: 949 | - alarm_control_panel.alarm 950 | to: armed_night 951 | id: Alarm night 952 | - platform: state 953 | entity_id: 954 | - alarm_control_panel.alarm 955 | to: disarmed 956 | id: Alarm disarmed 957 | - platform: state 958 | entity_id: 959 | - media_player.dining_room 960 | attribute: media_title 961 | id: Media title 962 | - platform: state 963 | entity_id: 964 | - media_player.living_room 965 | to: playing 966 | id: Living Room On 967 | - platform: state 968 | entity_id: 969 | - sensor.living_room_audio_input_format 970 | to: No input connected 971 | id: Living Room Off 972 | condition: [] 973 | action: 974 | - choose: 975 | - conditions: 976 | - condition: trigger 977 | id: Living Room Off 978 | - condition: state 979 | entity_id: alarm_control_panel.alarm 980 | state: disarmed 981 | sequence: 982 | - service: media_player.volume_set 983 | data: 984 | entity_id: media_player.dining_room 985 | volume_level: 0.08 986 | - service: media_player.select_source 987 | data: 988 | entity_id: media_player.dining_room 989 | source: P4 Stockholm 990 | - conditions: 991 | - condition: trigger 992 | id: Living Room On 993 | - condition: state 994 | entity_id: alarm_control_panel.alarm 995 | state: disarmed 996 | sequence: 997 | - service: sonos.set_sleep_timer 998 | data: 999 | entity_id: media_player.dining_room 1000 | sleep_time: 0 1001 | - conditions: 1002 | - condition: trigger 1003 | id: Alarm night 1004 | sequence: 1005 | - service: sonos.set_sleep_timer 1006 | data: 1007 | entity_id: media_player.dining_room 1008 | sleep_time: 0 1009 | - conditions: 1010 | - condition: trigger 1011 | id: Alarm disarmed 1012 | sequence: 1013 | - service: media_player.volume_set 1014 | data: 1015 | entity_id: media_player.dining_room 1016 | volume_level: 0.08 1017 | - service: media_player.select_source 1018 | data: 1019 | entity_id: media_player.dining_room 1020 | source: P4 Stockholm 1021 | - conditions: 1022 | - condition: trigger 1023 | id: Media title 1024 | - condition: template 1025 | value_template: '{{ state_attr(''media_player.dining_room'', ''media_title'') 1026 | != None and "sport" in state_attr(''media_player.dining_room'', ''media_title'').lower() 1027 | }}' 1028 | sequence: 1029 | - service: media_player.select_source 1030 | data: 1031 | source: P4 Plus 1032 | target: 1033 | entity_id: media_player.dining_room 1034 | mode: single 1035 | - id: '1663006396804' 1036 | alias: Living Room Sonos 1037 | description: '' 1038 | trigger: 1039 | - platform: state 1040 | entity_id: 1041 | - alarm_control_panel.alarm 1042 | to: armed_night 1043 | id: Night 1044 | - platform: state 1045 | entity_id: 1046 | - alarm_control_panel.alarm 1047 | to: disarmed 1048 | id: Reset 1049 | - platform: state 1050 | entity_id: 1051 | - input_boolean.lea_asleep 1052 | - input_boolean.clara_asleep 1053 | to: 'on' 1054 | id: Kids asleep 1055 | - platform: state 1056 | entity_id: 1057 | - input_boolean.lea_asleep 1058 | - input_boolean.clara_asleep 1059 | to: 'off' 1060 | id: Kids wakeup 1061 | condition: [] 1062 | action: 1063 | - choose: 1064 | - conditions: 1065 | - condition: trigger 1066 | id: Night 1067 | sequence: 1068 | - service: switch.turn_on 1069 | data: {} 1070 | target: 1071 | entity_id: switch.living_room_night_sound 1072 | - service: switch.turn_off 1073 | data: {} 1074 | target: 1075 | entity_id: 1076 | - switch.living_room_subwoofer_enabled 1077 | - switch.living_room_surround_enabled 1078 | - conditions: 1079 | - condition: trigger 1080 | id: Reset 1081 | sequence: 1082 | - service: switch.turn_on 1083 | data: {} 1084 | target: 1085 | entity_id: 1086 | - switch.living_room_surround_enabled 1087 | - switch.living_room_subwoofer_enabled 1088 | - service: switch.turn_off 1089 | data: {} 1090 | target: 1091 | entity_id: 1092 | - switch.living_room_night_sound 1093 | - switch.living_room_speech_enhancement 1094 | - conditions: 1095 | - condition: trigger 1096 | id: Kids asleep 1097 | sequence: 1098 | - service: switch.turn_off 1099 | data: {} 1100 | target: 1101 | entity_id: switch.living_room_subwoofer_enabled 1102 | - conditions: 1103 | - condition: trigger 1104 | id: Kids wakeup 1105 | - condition: state 1106 | entity_id: input_boolean.lea_asleep 1107 | state: 'off' 1108 | - condition: state 1109 | entity_id: input_boolean.clara_asleep 1110 | state: 'off' 1111 | - condition: state 1112 | entity_id: alarm_control_panel.alarm 1113 | state: disarmed 1114 | sequence: 1115 | - service: switch.turn_on 1116 | data: {} 1117 | target: 1118 | entity_id: switch.living_room_subwoofer_enabled 1119 | mode: single 1120 | - id: '1663097346896' 1121 | alias: Home Night Lights 1122 | description: '' 1123 | trigger: 1124 | - platform: state 1125 | entity_id: 1126 | - alarm_control_panel.alarm 1127 | from: disarmed 1128 | to: armed_night 1129 | id: Alarm night 1130 | - platform: state 1131 | entity_id: 1132 | - alarm_control_panel.alarm 1133 | from: armed_night 1134 | to: disarmed 1135 | id: Alarm disarmed 1136 | condition: [] 1137 | action: 1138 | - delay: 1139 | hours: 0 1140 | minutes: 0 1141 | seconds: 10 1142 | milliseconds: 0 1143 | - choose: 1144 | - conditions: 1145 | - condition: trigger 1146 | id: Alarm night 1147 | sequence: 1148 | - service: switch.turn_on 1149 | data: {} 1150 | target: 1151 | entity_id: 1152 | - switch.adaptive_lighting_sleep_mode_main 1153 | - switch.adaptive_lighting_sleep_mode_brighter 1154 | - conditions: 1155 | - condition: trigger 1156 | id: Alarm disarmed 1157 | sequence: 1158 | - service: switch.turn_off 1159 | data: {} 1160 | target: 1161 | entity_id: 1162 | - switch.adaptive_lighting_sleep_mode_main 1163 | - switch.adaptive_lighting_sleep_mode_brighter 1164 | mode: single 1165 | - id: '1663098113924' 1166 | alias: Leas Morning 1167 | description: '' 1168 | trigger: 1169 | - platform: time 1170 | at: 07:00:00 1171 | condition: 1172 | - condition: state 1173 | entity_id: input_boolean.lea_asleep 1174 | state: 'on' 1175 | action: 1176 | - service: light.turn_on 1177 | data: 1178 | color_name: red 1179 | brightness_pct: 1 1180 | target: 1181 | entity_id: light.leas_cloud 1182 | mode: single 1183 | - id: '1663441107303' 1184 | alias: Entrance Record Door 1185 | description: '' 1186 | trigger: 1187 | - platform: state 1188 | entity_id: 1189 | - binary_sensor.entrance_door 1190 | to: 'on' 1191 | condition: [] 1192 | action: 1193 | - service: aarlo.camera_start_recording 1194 | data: 1195 | entity_id: camera.aarlo_hallway 1196 | duration: 60 1197 | mode: single 1198 | - id: '1663442508179' 1199 | alias: Home Alarm Triggers 1200 | description: '' 1201 | trigger: 1202 | - platform: state 1203 | entity_id: 1204 | - binary_sensor.bathroom_motion_sensor 1205 | - binary_sensor.bedroom_motion_sensor 1206 | - binary_sensor.claras_motion_sensor 1207 | - binary_sensor.dining_room_motion_sensor 1208 | - binary_sensor.entrance_motion_sensor 1209 | - binary_sensor.kitchen_motion_sensor 1210 | - binary_sensor.leas_motion_sensor 1211 | - binary_sensor.living_room_motion_occupancy 1212 | - binary_sensor.office_motion_sensor 1213 | to: 'on' 1214 | id: motion 1215 | - platform: state 1216 | entity_id: 1217 | - binary_sensor.balcony_door 1218 | - binary_sensor.entrance_door 1219 | - binary_sensor.patio_door 1220 | - binary_sensor.bedroom_window 1221 | - binary_sensor.dining_room_window 1222 | - binary_sensor.living_room_window 1223 | - binary_sensor.office_window 1224 | - binary_sensor.claras_window 1225 | - binary_sensor.leas_window 1226 | to: 'on' 1227 | id: perimeter 1228 | condition: 1229 | - condition: or 1230 | conditions: 1231 | - condition: state 1232 | entity_id: alarm_control_panel.alarm 1233 | state: armed_home 1234 | - condition: state 1235 | entity_id: alarm_control_panel.alarm 1236 | state: armed_night 1237 | - condition: state 1238 | entity_id: alarm_control_panel.alarm 1239 | state: armed_away 1240 | action: 1241 | - choose: 1242 | - conditions: 1243 | - condition: trigger 1244 | id: perimeter 1245 | - condition: state 1246 | entity_id: alarm_control_panel.alarm 1247 | state: armed_away 1248 | - condition: or 1249 | conditions: 1250 | - condition: state 1251 | entity_id: vacuum.greta 1252 | state: cleaning 1253 | - condition: state 1254 | entity_id: vacuum.greta 1255 | state: returning 1256 | sequence: 1257 | - service: alarm_control_panel.alarm_trigger 1258 | data: {} 1259 | target: 1260 | entity_id: alarm_control_panel.alarm 1261 | - conditions: 1262 | - condition: state 1263 | entity_id: alarm_control_panel.alarm 1264 | state: armed_away 1265 | - condition: state 1266 | entity_id: vacuum.greta 1267 | state: docked 1268 | sequence: 1269 | - service: alarm_control_panel.alarm_trigger 1270 | data: {} 1271 | target: 1272 | entity_id: alarm_control_panel.alarm 1273 | - conditions: 1274 | - condition: trigger 1275 | id: perimeter 1276 | - condition: or 1277 | conditions: 1278 | - condition: state 1279 | entity_id: alarm_control_panel.alarm 1280 | state: armed_night 1281 | - condition: state 1282 | entity_id: alarm_control_panel.alarm 1283 | state: armed_home 1284 | sequence: 1285 | - service: alarm_control_panel.alarm_trigger 1286 | data: {} 1287 | target: 1288 | entity_id: alarm_control_panel.alarm 1289 | mode: single 1290 | - id: '1663444193865' 1291 | alias: Home Alarm Actions 1292 | description: '' 1293 | trigger: 1294 | - platform: state 1295 | entity_id: 1296 | - alarm_control_panel.alarm 1297 | to: pending 1298 | id: pending 1299 | from: armed_away 1300 | - platform: state 1301 | entity_id: 1302 | - alarm_control_panel.alarm 1303 | to: triggered 1304 | from: pending 1305 | id: triggered-away 1306 | - platform: state 1307 | entity_id: 1308 | - alarm_control_panel.alarm 1309 | from: armed_night 1310 | to: triggered 1311 | id: triggered-night 1312 | - platform: state 1313 | entity_id: 1314 | - alarm_control_panel.alarm 1315 | to: disarmed 1316 | id: disarmed 1317 | - platform: state 1318 | entity_id: 1319 | - alarm_control_panel.alarm 1320 | to: armed_away 1321 | id: armed_away 1322 | - platform: state 1323 | entity_id: 1324 | - alarm_control_panel.alarm 1325 | from: armed_home 1326 | to: triggered 1327 | id: triggered-home 1328 | condition: [] 1329 | action: 1330 | - choose: 1331 | - conditions: 1332 | - condition: trigger 1333 | id: pending 1334 | sequence: 1335 | - service: aarlo.siren_on 1336 | data: 1337 | entity_id: switch.aarlo_siren_home 1338 | volume: 1 1339 | duration: 10 1340 | - conditions: 1341 | - condition: trigger 1342 | id: triggered-away 1343 | sequence: 1344 | - service: aarlo.siren_on 1345 | data: 1346 | entity_id: switch.aarlo_siren_home 1347 | volume: 8 1348 | duration: 30 1349 | - service: aarlo.camera_start_recording 1350 | data: 1351 | entity_id: 1352 | - camera.aarlo_hallway 1353 | - camera.aarlo_living_room 1354 | duration: 60 1355 | - service: notify.mobile_app_johnnys_iphone 1356 | data: 1357 | title: Home Alarm Triggered 1358 | message: Check camera recording. 1359 | push: 1360 | sound: 1361 | name: default 1362 | critical: 1 1363 | volume: 1 1364 | - service: notify.mobile_app_kajsas_iphone 1365 | data: 1366 | title: Home Alarm Triggered 1367 | message: Check camera recording. 1368 | push: 1369 | sound: 1370 | name: default 1371 | critical: 1 1372 | volume: 1 1373 | - conditions: 1374 | - condition: trigger 1375 | id: triggered-night 1376 | sequence: 1377 | - service: notify.mobile_app_johnnys_iphone 1378 | data: 1379 | title: Home Alarm Triggered 1380 | message: Check camera recording. 1381 | data: 1382 | push: 1383 | sound: 1384 | name: default 1385 | critical: 1 1386 | volume: 0.1 1387 | - service: notify.mobile_app_kajsas_iphone 1388 | data: 1389 | title: Home Alarm Triggered 1390 | message: Check camera recording. 1391 | data: 1392 | push: 1393 | sound: 1394 | name: default 1395 | critical: 1 1396 | volume: 0.1 1397 | - service: aarlo.camera_start_recording 1398 | data: 1399 | entity_id: 1400 | - camera.aarlo_hallway 1401 | - camera.aarlo_living_room 1402 | duration: 60 1403 | - service: tts.google_translate_say 1404 | data: 1405 | entity_id: 1406 | - media_player.bathroom_tts 1407 | - media_player.bedroom_tts 1408 | - media_player.office_tts 1409 | - media_player.living_room_tts 1410 | message: "Alarm triggered! {%- for state in states.binary_sensor -%}\n {% 1411 | set type = state.name.split(' ') | last -%}\n {% if type == 'Window' 1412 | and state.state_with_unit == 'on' %}\n {{- state.name }} is open.\n 1413 | \ {%- endif -%}\n {% if type == 'Door' and state.state_with_unit == 'on' 1414 | %}\n {{- state.name }} is open.\n {%- endif -%}\n{%- endfor %}" 1415 | - conditions: 1416 | - condition: trigger 1417 | id: triggered-home 1418 | sequence: 1419 | - service: notify.mobile_app_johnnys_iphone 1420 | data: 1421 | title: Home Alarm Triggered 1422 | message: Door or window has been opened. 1423 | data: 1424 | push: 1425 | sound: 1426 | name: default 1427 | critical: 1 1428 | volume: 0.1 1429 | - service: notify.mobile_app_kajsas_iphone 1430 | data: 1431 | title: Home Alarm Triggered 1432 | message: Door or window has been opened. 1433 | data: 1434 | push: 1435 | sound: 1436 | name: default 1437 | critical: 1 1438 | volume: 0.1 1439 | - service: aarlo.camera_start_recording 1440 | data: 1441 | entity_id: 1442 | - camera.aarlo_hallway 1443 | - camera.aarlo_living_room 1444 | duration: 60 1445 | - service: tts.google_translate_say 1446 | data: 1447 | entity_id: 1448 | - media_player.bathroom_tts 1449 | - media_player.bedroom_tts 1450 | - media_player.office_tts 1451 | - media_player.living_room_tts 1452 | message: "Alarm triggered! {%- for state in states.binary_sensor -%}\n {% 1453 | set type = state.name.split(' ') | last -%}\n {% if type == 'Window' 1454 | and state.state_with_unit == 'on' %}\n {{- state.name }} is open.\n 1455 | \ {%- endif -%}\n {% if type == 'Door' and state.state_with_unit == 'on' 1456 | %}\n {{- state.name }} is open.\n {%- endif -%}\n{%- endfor %}" 1457 | - conditions: 1458 | - condition: trigger 1459 | id: disarmed 1460 | sequence: 1461 | - service: aarlo.siren_off 1462 | data: 1463 | entity_id: switch.aarlo_siren_home 1464 | - conditions: 1465 | - condition: trigger 1466 | id: armed_away 1467 | sequence: 1468 | - service: sonos.set_sleep_timer 1469 | data: 1470 | sleep_time: 0 1471 | target: 1472 | entity_id: 1473 | - media_player.bathroom 1474 | - media_player.bedroom 1475 | - media_player.dining_room 1476 | - media_player.leas_room 1477 | - media_player.living_room 1478 | - media_player.office 1479 | mode: single 1480 | - id: '1663497485898' 1481 | alias: Home Alarm Auto-Arm 1482 | description: '' 1483 | trigger: 1484 | - platform: state 1485 | entity_id: 1486 | - person.johnny 1487 | - person.kajsa 1488 | id: household 1489 | - platform: state 1490 | entity_id: 1491 | - group.guests 1492 | id: guests 1493 | - platform: state 1494 | entity_id: 1495 | - input_boolean.clara_asleep 1496 | - input_boolean.guest_asleep 1497 | - input_boolean.johnny_asleep 1498 | - input_boolean.kajsa_asleep 1499 | - input_boolean.lea_asleep 1500 | to: 'on' 1501 | id: Sleep on 1502 | - platform: state 1503 | entity_id: 1504 | - input_boolean.johnny_asleep 1505 | - input_boolean.kajsa_asleep 1506 | - input_boolean.guest_asleep 1507 | to: 'off' 1508 | id: Sleep off 1509 | condition: [] 1510 | action: 1511 | - choose: 1512 | - conditions: 1513 | - condition: trigger 1514 | id: household 1515 | - condition: state 1516 | entity_id: person.johnny 1517 | state: not_home 1518 | - condition: state 1519 | entity_id: person.kajsa 1520 | state: not_home 1521 | - condition: state 1522 | entity_id: input_boolean.guest_mode 1523 | state: 'off' 1524 | sequence: 1525 | - service: alarm_control_panel.alarm_arm_away 1526 | data: {} 1527 | target: 1528 | entity_id: alarm_control_panel.alarm 1529 | - conditions: 1530 | - condition: trigger 1531 | id: household 1532 | - condition: or 1533 | conditions: 1534 | - condition: state 1535 | entity_id: person.johnny 1536 | state: home 1537 | - condition: state 1538 | entity_id: person.kajsa 1539 | state: home 1540 | sequence: 1541 | - service: alarm_control_panel.alarm_disarm 1542 | data: {} 1543 | target: 1544 | entity_id: alarm_control_panel.alarm 1545 | - conditions: 1546 | - condition: trigger 1547 | id: guests 1548 | - condition: state 1549 | entity_id: group.guests 1550 | state: not_home 1551 | - condition: state 1552 | entity_id: person.johnny 1553 | state: not_home 1554 | - condition: state 1555 | entity_id: person.kajsa 1556 | state: not_home 1557 | sequence: 1558 | - service: alarm_control_panel.alarm_arm_away 1559 | data: {} 1560 | target: 1561 | entity_id: alarm_control_panel.alarm 1562 | - conditions: 1563 | - condition: trigger 1564 | id: guests 1565 | - condition: state 1566 | entity_id: group.guests 1567 | state: home 1568 | - condition: state 1569 | entity_id: input_boolean.guest_mode 1570 | state: 'on' 1571 | sequence: 1572 | - service: alarm_control_panel.alarm_disarm 1573 | data: {} 1574 | target: 1575 | entity_id: alarm_control_panel.alarm 1576 | - conditions: 1577 | - condition: trigger 1578 | id: Sleep on 1579 | - condition: or 1580 | conditions: 1581 | - condition: and 1582 | conditions: 1583 | - condition: state 1584 | entity_id: person.johnny 1585 | state: home 1586 | - condition: state 1587 | entity_id: input_boolean.johnny_asleep 1588 | state: 'on' 1589 | - condition: state 1590 | entity_id: person.johnny 1591 | state: not_home 1592 | - condition: or 1593 | conditions: 1594 | - condition: and 1595 | conditions: 1596 | - condition: state 1597 | entity_id: person.kajsa 1598 | state: home 1599 | - condition: state 1600 | entity_id: input_boolean.kajsa_asleep 1601 | state: 'on' 1602 | - condition: state 1603 | entity_id: person.kajsa 1604 | state: not_home 1605 | - condition: or 1606 | conditions: 1607 | - condition: and 1608 | conditions: 1609 | - condition: state 1610 | entity_id: input_boolean.guest_mode 1611 | state: 'on' 1612 | - condition: state 1613 | entity_id: input_boolean.guest_asleep 1614 | state: 'on' 1615 | - condition: state 1616 | entity_id: input_boolean.guest_mode 1617 | state: 'off' 1618 | sequence: 1619 | - service: alarm_control_panel.alarm_arm_night 1620 | data: {} 1621 | target: 1622 | entity_id: alarm_control_panel.alarm 1623 | - conditions: 1624 | - condition: trigger 1625 | id: Sleep off 1626 | sequence: 1627 | - service: alarm_control_panel.alarm_disarm 1628 | data: {} 1629 | target: 1630 | entity_id: alarm_control_panel.alarm 1631 | mode: single 1632 | - id: '1663525442993' 1633 | alias: Home Perimeter Warning 1634 | description: '' 1635 | trigger: 1636 | - platform: state 1637 | entity_id: 1638 | - binary_sensor.entrance_door 1639 | to: 'on' 1640 | condition: 1641 | - condition: state 1642 | entity_id: binary_sensor.entrance_occupied 1643 | state: 'on' 1644 | - condition: or 1645 | conditions: 1646 | - condition: state 1647 | entity_id: binary_sensor.balcony_door 1648 | state: 'on' 1649 | - condition: state 1650 | entity_id: binary_sensor.patio_door 1651 | state: 'on' 1652 | - condition: state 1653 | entity_id: binary_sensor.bedroom_window 1654 | state: 'on' 1655 | - condition: state 1656 | entity_id: binary_sensor.office_window 1657 | state: 'on' 1658 | - condition: state 1659 | entity_id: binary_sensor.dining_room_window 1660 | state: 'on' 1661 | - condition: state 1662 | entity_id: binary_sensor.living_room_window 1663 | state: 'on' 1664 | - condition: state 1665 | state: 'on' 1666 | entity_id: binary_sensor.claras_window 1667 | - condition: state 1668 | state: 'on' 1669 | entity_id: binary_sensor.leas_window 1670 | action: 1671 | - service: notify.mobile_app_johnnys_iphone 1672 | data: 1673 | title: Window open 1674 | message: Someone is leaving and there is a window open. 1675 | - service: notify.mobile_app_kajsas_iphone 1676 | data: 1677 | title: Window open 1678 | message: Someone is leaving and there is a window open. 1679 | mode: single 1680 | - id: '1663526399510' 1681 | alias: Home Weather Warning 1682 | description: '' 1683 | trigger: 1684 | - platform: state 1685 | entity_id: 1686 | - weather.smhi_home 1687 | to: rainy 1688 | - platform: state 1689 | entity_id: 1690 | - weather.smhi_home 1691 | to: snowy 1692 | condition: 1693 | - condition: or 1694 | conditions: 1695 | - condition: state 1696 | entity_id: binary_sensor.entrance_door 1697 | state: 'on' 1698 | - condition: state 1699 | entity_id: binary_sensor.balcony_door 1700 | state: 'on' 1701 | - condition: state 1702 | entity_id: binary_sensor.patio_door 1703 | state: 'on' 1704 | - condition: state 1705 | entity_id: binary_sensor.bedroom_window 1706 | state: 'on' 1707 | - condition: state 1708 | entity_id: binary_sensor.office_window 1709 | state: 'on' 1710 | - condition: state 1711 | entity_id: binary_sensor.dining_room_window 1712 | state: 'on' 1713 | - condition: state 1714 | entity_id: binary_sensor.living_room_window 1715 | state: 'on' 1716 | - condition: state 1717 | state: 'on' 1718 | entity_id: binary_sensor.leas_window 1719 | - condition: state 1720 | state: 'on' 1721 | entity_id: binary_sensor.claras_window 1722 | action: 1723 | - service: notify.mobile_app_johnnys_iphone 1724 | data: 1725 | title: Weather Warning 1726 | message: Rain or snow is coming and there are windows open. 1727 | - service: notify.mobile_app_kajsas_iphone 1728 | data: 1729 | title: Weather Warning 1730 | message: Rain or snow is coming and there are windows open. 1731 | mode: single 1732 | - id: '1663527344597' 1733 | alias: Home Notify Smoke 1734 | description: '' 1735 | trigger: 1736 | - platform: state 1737 | entity_id: 1738 | - binary_sensor.kids_hallway_smoke_sensor 1739 | to: 'on' 1740 | - platform: state 1741 | entity_id: 1742 | - binary_sensor.lumi_lumi_sensor_smoke_sensor 1743 | to: 'on' 1744 | condition: [] 1745 | action: 1746 | - service: light.turn_on 1747 | data: {} 1748 | target: 1749 | entity_id: 1750 | - light.entrance_ceiling 1751 | - light.living_room_ceiling 1752 | - service: aarlo.camera_start_recording 1753 | data: 1754 | entity_id: 1755 | - camera.aarlo_hallway 1756 | - camera.aarlo_living_room 1757 | duration: 60 1758 | - service: notify.mobile_app_johnnys_iphone 1759 | data: 1760 | title: Smoke detected 1761 | message: Smoke detected by {{ trigger.entity_id }}. 1762 | data: 1763 | push: 1764 | sound: 1765 | name: default 1766 | critical: 1 1767 | volume: 1 1768 | - service: notify.mobile_app_kajsas_iphone 1769 | data: 1770 | title: Smoke detected 1771 | message: Smoke detected by {{ trigger.entity_id }}. 1772 | data: 1773 | push: 1774 | sound: 1775 | name: default 1776 | critical: 1 1777 | volume: 1 1778 | mode: single 1779 | - id: '1663606921387' 1780 | alias: Claras Dimmer 1781 | description: '' 1782 | use_blueprint: 1783 | path: mannerisms/zha-philips-hue-dimmer-switch-individual-buttons-with-long-presses.yaml 1784 | input: 1785 | remote: 686bc0a27c0b9eca74512fc22fd630e6 1786 | button_1_single_press: 1787 | - service: input_boolean.turn_off 1788 | data: {} 1789 | target: 1790 | entity_id: input_boolean.clara_asleep 1791 | - service: cover.open_cover 1792 | data: {} 1793 | target: 1794 | entity_id: cover.claras_blind_cover 1795 | button_4_single_press: 1796 | - service: input_boolean.turn_on 1797 | data: {} 1798 | target: 1799 | entity_id: input_boolean.clara_asleep 1800 | - service: cover.close_cover 1801 | data: {} 1802 | target: 1803 | entity_id: cover.claras_blind_cover 1804 | button_3_single_press: 1805 | - service: light.toggle 1806 | data: {} 1807 | target: 1808 | entity_id: 1809 | - light.claras_ambient_lights 1810 | - id: '1663613065364' 1811 | alias: Home Reset Occupancy 1812 | description: '' 1813 | trigger: 1814 | - platform: state 1815 | entity_id: 1816 | - alarm_control_panel.alarm 1817 | to: armed_away 1818 | id: away 1819 | - platform: state 1820 | entity_id: 1821 | - alarm_control_panel.alarm 1822 | from: armed_night 1823 | to: disarmed 1824 | id: sleep 1825 | condition: [] 1826 | action: 1827 | - choose: 1828 | - conditions: 1829 | - condition: trigger 1830 | id: away 1831 | sequence: 1832 | - service: input_boolean.turn_on 1833 | data: {} 1834 | target: 1835 | entity_id: 1836 | - input_boolean.bathroom_occupancy_automation 1837 | - input_boolean.bedroom_occupancy_automation 1838 | - input_boolean.claras_occupancy_automation 1839 | - input_boolean.dining_room_occupancy_automation 1840 | - input_boolean.entrance_occupancy_automation 1841 | - input_boolean.hallway_occupancy_automation 1842 | - input_boolean.kitchen_occupancy_automation 1843 | - input_boolean.leas_occupancy_automation 1844 | - input_boolean.living_room_occupancy_automation 1845 | - input_boolean.office_occupancy_automation 1846 | - input_boolean.parents_hallway_occupancy_automation 1847 | - conditions: 1848 | - condition: trigger 1849 | id: sleep 1850 | sequence: 1851 | - service: input_boolean.turn_on 1852 | data: {} 1853 | target: 1854 | entity_id: 1855 | - input_boolean.bathroom_occupancy_automation 1856 | - input_boolean.dining_room_occupancy_automation 1857 | - input_boolean.entrance_occupancy_automation 1858 | - input_boolean.hallway_occupancy_automation 1859 | - input_boolean.kitchen_occupancy_automation 1860 | - input_boolean.living_room_occupancy_automation 1861 | - input_boolean.parents_hallway_occupancy_automation 1862 | mode: single 1863 | - id: '1663784567668' 1864 | alias: Home Ambient Lights 1865 | description: '' 1866 | trigger: 1867 | - platform: state 1868 | entity_id: 1869 | - alarm_control_panel.alarm 1870 | to: armed_night 1871 | id: Alarm night 1872 | - platform: state 1873 | entity_id: 1874 | - alarm_control_panel.alarm 1875 | to: disarmed 1876 | id: Alarm disarmed 1877 | - platform: sun 1878 | event: sunset 1879 | offset: 0 1880 | id: Sunset 1881 | - platform: time 1882 | at: '19:00:00' 1883 | id: Evening 1884 | - platform: time 1885 | at: '22:30:00' 1886 | id: Night 1887 | condition: [] 1888 | action: 1889 | - choose: 1890 | - conditions: 1891 | - condition: or 1892 | conditions: 1893 | - condition: trigger 1894 | id: Alarm night 1895 | - condition: and 1896 | conditions: 1897 | - condition: trigger 1898 | id: Night 1899 | - condition: state 1900 | entity_id: alarm_control_panel.alarm 1901 | state: armed_away 1902 | sequence: 1903 | - if: 1904 | - condition: state 1905 | entity_id: input_boolean.bedroom_occupancy_automation 1906 | state: 'on' 1907 | then: 1908 | - service: light.turn_off 1909 | data: {} 1910 | target: 1911 | entity_id: light.bedroom_ambient_lights 1912 | - if: 1913 | - condition: state 1914 | entity_id: input_boolean.leas_occupancy_automation 1915 | state: 'on' 1916 | then: 1917 | - service: light.turn_off 1918 | data: {} 1919 | target: 1920 | entity_id: light.leas_ambient_lights 1921 | - if: 1922 | - condition: state 1923 | entity_id: input_boolean.claras_occupancy_automation 1924 | state: 'on' 1925 | then: 1926 | - service: light.turn_off 1927 | data: {} 1928 | target: 1929 | entity_id: 1930 | - light.claras_ambient_lights 1931 | - if: 1932 | - condition: state 1933 | entity_id: input_boolean.office_occupancy_automation 1934 | state: 'on' 1935 | then: 1936 | - service: light.turn_off 1937 | data: {} 1938 | target: 1939 | entity_id: light.office_ambient_lights 1940 | - if: 1941 | - condition: state 1942 | entity_id: input_boolean.dining_room_occupancy_automation 1943 | state: 'on' 1944 | then: 1945 | - service: light.turn_off 1946 | data: {} 1947 | target: 1948 | entity_id: light.dining_room_ambient_lights 1949 | - if: 1950 | - condition: state 1951 | entity_id: input_boolean.living_room_occupancy_automation 1952 | state: 'on' 1953 | then: 1954 | - service: light.turn_off 1955 | data: {} 1956 | target: 1957 | entity_id: light.living_room_ambient_lights 1958 | - conditions: 1959 | - condition: or 1960 | conditions: 1961 | - condition: trigger 1962 | id: Alarm disarmed 1963 | - condition: and 1964 | conditions: 1965 | - condition: trigger 1966 | id: Sunset 1967 | - condition: state 1968 | entity_id: alarm_control_panel.alarm 1969 | state: armed_away 1970 | - condition: and 1971 | conditions: 1972 | - condition: trigger 1973 | id: Evening 1974 | - condition: state 1975 | entity_id: alarm_control_panel.alarm 1976 | state: armed_away 1977 | sequence: 1978 | - if: 1979 | - condition: state 1980 | entity_id: input_boolean.bedroom_occupancy_automation 1981 | state: 'on' 1982 | then: 1983 | - service: light.turn_on 1984 | data: {} 1985 | target: 1986 | entity_id: light.bedroom_ambient_lights 1987 | - if: 1988 | - condition: state 1989 | entity_id: input_boolean.leas_occupancy_automation 1990 | state: 'on' 1991 | then: 1992 | - service: light.turn_on 1993 | data: {} 1994 | target: 1995 | entity_id: light.leas_ambient_lights 1996 | - if: 1997 | - condition: state 1998 | entity_id: input_boolean.claras_occupancy_automation 1999 | state: 'on' 2000 | then: 2001 | - service: light.turn_on 2002 | data: {} 2003 | target: 2004 | entity_id: 2005 | - light.claras_ambient_lights 2006 | - if: 2007 | - condition: state 2008 | entity_id: input_boolean.office_occupancy_automation 2009 | state: 'on' 2010 | then: 2011 | - service: light.turn_on 2012 | data: {} 2013 | target: 2014 | entity_id: light.office_ambient_lights 2015 | - if: 2016 | - condition: state 2017 | entity_id: input_boolean.dining_room_occupancy_automation 2018 | state: 'on' 2019 | then: 2020 | - service: light.turn_on 2021 | data: {} 2022 | target: 2023 | entity_id: light.dining_room_ambient_lights 2024 | - if: 2025 | - condition: state 2026 | entity_id: input_boolean.living_room_occupancy_automation 2027 | state: 'on' 2028 | then: 2029 | - service: light.turn_on 2030 | data: {} 2031 | target: 2032 | entity_id: light.living_room_ambient_lights 2033 | mode: single 2034 | - id: '1663866728942' 2035 | alias: Office Dimmer 2036 | description: '' 2037 | use_blueprint: 2038 | path: mannerisms/zha-philips-hue-dimmer-switch-individual-buttons-with-long-presses.yaml 2039 | input: 2040 | remote: 605dd32a6df845dda76ec3bcf15015fe 2041 | button_1_single_press: 2042 | - service: input_boolean.turn_off 2043 | data: {} 2044 | target: 2045 | entity_id: input_boolean.guest_asleep 2046 | - service: cover.open_cover 2047 | data: {} 2048 | target: 2049 | entity_id: cover.office_blind_cover 2050 | button_4_single_press: 2051 | - service: input_boolean.turn_on 2052 | data: {} 2053 | target: 2054 | entity_id: input_boolean.guest_asleep 2055 | - service: cover.close_cover 2056 | data: {} 2057 | target: 2058 | entity_id: cover.office_blind_cover 2059 | button_3_single_press: 2060 | - service: light.toggle 2061 | data: {} 2062 | target: 2063 | entity_id: 2064 | - light.office_ambient_lights 2065 | - id: '1664303346245' 2066 | alias: Vacuum 2067 | description: Automatically vacuum when not home 2068 | trigger: 2069 | - platform: state 2070 | entity_id: 2071 | - alarm_control_panel.alarm 2072 | to: armed_away 2073 | for: 2074 | hours: 0 2075 | minutes: 1 2076 | seconds: 0 2077 | id: Alarm 2078 | - platform: state 2079 | entity_id: 2080 | - vacuum.greta 2081 | to: error 2082 | id: Error 2083 | - platform: state 2084 | entity_id: 2085 | - vacuum.greta 2086 | to: docked 2087 | id: Docked 2088 | from: returning 2089 | - platform: state 2090 | entity_id: 2091 | - input_button.vacuum_reset 2092 | id: Reset 2093 | - device_id: f68bcbcdf147509cc4dc50f6314e6285 2094 | domain: zha 2095 | platform: device 2096 | type: remote_button_short_press 2097 | subtype: remote_button_short_press 2098 | id: Empty 2099 | - device_id: f68bcbcdf147509cc4dc50f6314e6285 2100 | domain: zha 2101 | platform: device 2102 | type: remote_button_double_press 2103 | subtype: remote_button_double_press 2104 | id: Send Dock 2105 | condition: [] 2106 | action: 2107 | - choose: 2108 | - conditions: 2109 | - condition: trigger 2110 | id: Alarm 2111 | - condition: time 2112 | after: 08:00:00 2113 | before: '20:00:00' 2114 | - condition: template 2115 | value_template: '{{ as_timestamp(now()) - as_timestamp(states.input_datetime.vacuum_last.state, 2116 | 0) > 36000 }}' 2117 | sequence: 2118 | - service: vacuum.start 2119 | data: {} 2120 | target: 2121 | entity_id: vacuum.greta 2122 | - service: input_datetime.set_datetime 2123 | data: 2124 | datetime: '{{ now().strftime(''%Y-%m-%d %H:%M:%S'') }}' 2125 | target: 2126 | entity_id: input_datetime.vacuum_last 2127 | - conditions: 2128 | - condition: trigger 2129 | id: Error 2130 | sequence: 2131 | - service: notify.mobile_app_johnnys_iphone 2132 | data: 2133 | title: Greta has reported an error 2134 | message: Greta may be stuck somewhere. Send help. 2135 | - service: notify.mobile_app_kajsas_iphone 2136 | data: 2137 | title: Greta has reported an error 2138 | message: Greta may be stuck somewhere. Send help. 2139 | - conditions: 2140 | - condition: trigger 2141 | id: Docked 2142 | sequence: 2143 | - service: input_number.set_value 2144 | data: 2145 | value: '{{ (states(''sensor.greta_last_clean_duration'') | int / 60) | round 2146 | + states(''input_number.vacuum_full'')|int }}' 2147 | target: 2148 | entity_id: input_number.vacuum_full 2149 | - if: 2150 | - condition: numeric_state 2151 | entity_id: input_number.vacuum_full 2152 | above: 120 2153 | then: 2154 | - service: notify.mobile_app_johnnys_iphone 2155 | data: 2156 | title: Greta is full 2157 | message: Please empty dust bin. 2158 | - service: notify.mobile_app_kajsas_iphone 2159 | data: 2160 | title: Greta is full 2161 | message: Please empty dust bin. 2162 | - conditions: 2163 | - condition: trigger 2164 | id: Reset 2165 | sequence: 2166 | - service: input_number.set_value 2167 | data: 2168 | value: '{{ 0 - (states(''sensor.greta_last_clean_duration'') | int / 60) 2169 | | round }}' 2170 | target: 2171 | entity_id: input_number.vacuum_full 2172 | - conditions: 2173 | - condition: trigger 2174 | id: Empty 2175 | sequence: 2176 | - service: xiaomi_miio.vacuum_goto 2177 | data: 2178 | x_coord: '27539' 2179 | y_coord: '26671' 2180 | target: 2181 | entity_id: vacuum.greta 2182 | - service: input_number.set_value 2183 | data: 2184 | value: 0 2185 | target: 2186 | entity_id: input_number.vacuum_full 2187 | - conditions: 2188 | - condition: trigger 2189 | id: Send Dock 2190 | sequence: 2191 | - service: vacuum.return_to_base 2192 | data: {} 2193 | target: 2194 | entity_id: vacuum.greta 2195 | mode: single 2196 | - id: '1665082347986' 2197 | alias: Home Restart Router 2198 | description: '' 2199 | trigger: 2200 | - platform: state 2201 | entity_id: 2202 | - binary_sensor.uptimerobot_home_assistant 2203 | - binary_sensor.uptimerobot_srv_chadda_se 2204 | to: 'off' 2205 | for: 2206 | hours: 1 2207 | minutes: 0 2208 | seconds: 0 2209 | condition: 2210 | - condition: state 2211 | entity_id: binary_sensor.uptimerobot_home_assistant 2212 | state: 'off' 2213 | - condition: state 2214 | entity_id: binary_sensor.uptimerobot_srv_chadda_se 2215 | state: 'off' 2216 | action: 2217 | - service: notify.mobile_app_johnnys_iphone 2218 | data: 2219 | title: Restarting router 2220 | message: Uptimerobot detected site down 2221 | mode: single 2222 | --------------------------------------------------------------------------------