- alias: Activate Sleep Mode of Adaptive Lighting id: 172a87e1-2a8b-43df-b17a-4a63d57540a4 trigger: platform: state entity_id: input_select.bed_mode from: just on to: 'on' action: service: switch.turn_on target: entity_id: - switch.adaptive_lighting_sleep_mode_kitchen - switch.adaptive_lighting_sleep_mode_living_room - alias: Deactivate Sleep Mode of Adaptive Lighting id: 2e3918de-b332-4787-940d-f64e5d5e8b21 trigger: platform: state entity_id: input_select.bed_mode from: 'on' to: just off action: service: switch.turn_off target: entity_id: - switch.adaptive_lighting_sleep_mode_kitchen - switch.adaptive_lighting_sleep_mode_living_room - alias: Intrusion Alarm id: 496e0316-b945-4f9c-a7dc-cb025d4971a9 trigger: platform: state entity_id: - binary_sensor.bedroom_motion_sensor_occupancy - binary_sensor.bedroom_window_left_contact - binary_sensor.bedroom_window_right_contact - binary_sensor.hall_motion_sensor_occupancy - binary_sensor.kitchen_motion_sensor_occupancy - binary_sensor.living_room_motion_sensor_occupancy - binary_sensor.outdoor_frontdoor_contact - binary_sensor.outdoor_backdoor_contact from: 'off' to: 'on' condition: condition: or conditions: - condition: state entity_id: input_select.away_mode state: just on - condition: state entity_id: input_select.away_mode state: 'on' action: - parallel: - if: - condition: state entity_id: input_boolean.intrusion_alarm_notification state: 'on' then: - service: notify.mobile_app_iphone_von_david data: title: Intrusion Alarm message: Intrusion detected at home! data: tag: intrusion-alarm push: sound: name: default critical: 1 volume: 1.0 - if: - condition: state entity_id: input_boolean.intrusion_alarm_siren state: 'on' then: - service: script.sonos_play data: devices: - media_player.sonos_device_wohnzimmer - media_player.sonos_device_kuche - media_player.sonos_device_schlafzimmer source: http://192.168.178.10:8123/local/sounds/alarm_siren.mp3 volume: 0.2 - alias: Water Leak Alarm id: 2b33953a-560a-4344-9985-776bf654d45d trigger: platform: state entity_id: - binary_sensor.bathroom_water_leak_sensor_water_leak from: 'off' to: 'on' action: - service: notify.mobile_app_iphone_von_david data: title: Water Leak Alarm message: Water leak detected at home! data: tag: water-leak-alarm push: sound: name: default critical: 1 volume: 1.0 - service: script.sonos_play data: devices: - media_player.sonos_device_wohnzimmer - media_player.sonos_device_kuche - media_player.sonos_device_schlafzimmer source: http://192.168.178.10:8123/local/sounds/alarm_siren.mp3 volume: 0.2 - alias: Alarm Clock id: 5bed22d4-e379-4d9e-9363-4c7717c6358b trigger: platform: template value_template: '{{ states(''sensor.time'') == ((state_attr(''input_datetime.alarm_clock'', ''timestamp'') - 600) | timestamp_custom(''%H:%M'', False)) }}' condition: - condition: state entity_id: input_boolean.alarm_clock state: 'on' - condition: or conditions: - condition: state entity_id: input_select.bed_mode state: 'on' - condition: state entity_id: input_select.bed_mode state: just on action: - event: alarm_clock_wake_up_started event_data: delay: 600 - delay: seconds: 600 - event: alarm_clock_wake_up_finished - service: media_player.unjoin data: entity_id: media_player.sonos_device_schlafzimmer - service: media_player.volume_set target: entity_id: media_player.sonos_device_schlafzimmer data: volume_level: 0.04 - service: media_player.volume_mute target: entity_id: media_player.sonos_device_schlafzimmer data: is_volume_muted: false - service: media_player.shuffle_set target: entity_id: media_player.sonos_device_schlafzimmer data: shuffle: true - service: media_player.select_source target: entity_id: media_player.sonos_device_schlafzimmer data: source: Apple Music Hits - alias: Transition Away Mode From Just On to On id: c4c3fa9d-454a-4761-b34f-3b55ce72e22a trigger: platform: state entity_id: input_select.away_mode to: just on for: minutes: 30 action: service: input_select.select_option target: entity_id: input_select.away_mode data: option: 'on' - alias: Transition Away Mode From Just Off to Off id: 0f672737-6463-4eb3-aecd-63e7f7791b24 trigger: platform: state entity_id: input_select.away_mode to: just off for: minutes: 10 action: service: input_select.select_option target: entity_id: input_select.away_mode data: option: 'off' - alias: Transition Away Mode From Off to Just On id: 8c9f579e-effb-4bdf-babe-70e3a3736cbc trigger: platform: state entity_id: person.david from: home to: not_home condition: condition: state entity_id: input_select.away_mode state: 'off' action: service: input_select.select_option target: entity_id: input_select.away_mode data: option: just on - alias: Transition Away Mode From Just Off to On id: 6b6c2087-cd67-4be6-b02d-caae12729c42 trigger: platform: state entity_id: person.david from: home to: not_home condition: condition: state entity_id: input_select.away_mode state: just off action: service: input_select.select_option target: entity_id: input_select.away_mode data: option: 'on' - alias: Transition Away Mode From On to Just Off id: e7be0f56-70a8-4a21-9f97-1f65bbb08489 trigger: platform: state entity_id: person.david from: not_home to: home condition: condition: state entity_id: input_select.away_mode state: 'on' action: service: input_select.select_option target: entity_id: input_select.away_mode data: option: just off - alias: Transition Away Mode From Just On to Off id: cf3dfc60-ac0c-4f64-940d-80d47f7986e0 trigger: platform: state entity_id: person.david from: not_home to: home condition: condition: state entity_id: input_select.away_mode state: just on action: service: input_select.select_option target: entity_id: input_select.away_mode data: option: 'off' - alias: Turn Bedroom Ceiling Light on when there is Movement id: ca2eea25-0572-478b-a3c1-1463663224e5 trigger: platform: state entity_id: binary_sensor.bedroom_motion_sensor_occupancy from: 'off' to: 'on' condition: - condition: state entity_id: input_select.bed_mode state: - just off - 'off' - condition: or conditions: - condition: state entity_id: sensor.period_of_day state: - Sunrise - Day - Sunset - condition: state entity_id: - binary_sensor.bedroom_window_left_contact - binary_sensor.bedroom_window_right_contact state: 'off' action: service: light.turn_on target: entity_id: light.bedroom_ceiling_light - alias: Turn Bedroom Ceiling Light off after last Movement id: 4ae96393-de19-4df4-a54f-b0a886e51b39 trigger: platform: state entity_id: binary_sensor.bedroom_motion_sensor_occupancy from: 'on' to: 'off' for: minutes: 1 seconds: 30 action: service: light.turn_off target: entity_id: light.bedroom_ceiling_light - alias: Turn Bedroom Ceiling Light on when closing Windows and there is Movement id: 4176c9f3-b6c3-4662-9574-d3898f678db1 trigger: - platform: state entity_id: - binary_sensor.bedroom_window_left_contact - binary_sensor.bedroom_window_right_contact from: 'on' to: 'off' condition: - condition: state entity_id: input_select.bed_mode state: - just off - 'off' - condition: state entity_id: binary_sensor.bedroom_motion_sensor_occupancy state: 'on' - condition: state entity_id: - binary_sensor.bedroom_window_left_contact - binary_sensor.bedroom_window_right_contact state: 'off' action: service: light.turn_on target: entity_id: light.bedroom_ceiling_light - alias: Turn Bedroom Ceiling Light off when opening Windows and there is Movement id: 13b59629-0bf4-4582-998d-68c72b7abf7c trigger: - platform: state entity_id: - binary_sensor.bedroom_window_left_contact - binary_sensor.bedroom_window_right_contact from: 'off' to: 'on' condition: - condition: not conditions: - condition: state entity_id: sensor.period_of_day state: - Sunrise - Day - Sunset - condition: state entity_id: binary_sensor.bedroom_motion_sensor_occupancy state: 'on' action: service: light.turn_off target: entity_id: light.bedroom_ceiling_light - alias: Turn Bedroom Bed Light on id: 7b35e327-0f6a-4395-9dbd-82af35052d3c trigger: - platform: state entity_id: binary_sensor.bedroom_motion_sensor_occupancy from: 'off' to: 'on' - platform: state entity_id: input_select.bed_mode from: 'on' to: just off condition: - condition: state entity_id: binary_sensor.bedroom_motion_sensor_occupancy state: 'on' - condition: state entity_id: input_select.bed_mode state: - just off - 'off' - condition: state entity_id: sensor.period_of_day state: - Dusk - Night - Dawn action: service: light.turn_on target: entity_id: light.bedroom_bed_light - alias: Turn Bedroom Bed Light off id: be121c48-e608-4bf3-901c-3eaf9157b734 trigger: - platform: state entity_id: binary_sensor.bedroom_motion_sensor_occupancy from: 'on' to: 'off' for: minutes: 1 seconds: 30 condition: - condition: state entity_id: input_select.bed_mode state: - just off - 'off' action: service: light.turn_off target: entity_id: light.bedroom_bed_light - alias: Turn Bedroom Cabinet and Dresser Light on id: 3a478c03-2e81-4036-9962-4ee3a7e94930 trigger: - platform: state entity_id: binary_sensor.bedroom_motion_sensor_occupancy from: 'off' to: 'on' - platform: state entity_id: binary_sensor.hall_motion_sensor_occupancy from: 'off' to: 'on' - platform: state entity_id: input_select.bed_mode from: 'on' to: just off condition: - condition: or conditions: - condition: state entity_id: binary_sensor.bedroom_motion_sensor_occupancy state: 'on' - condition: state entity_id: binary_sensor.hall_motion_sensor_occupancy state: 'on' - condition: state entity_id: input_select.bed_mode state: - just off - 'off' - condition: state entity_id: sensor.period_of_day state: - Dusk - Night - Dawn action: service: light.turn_on target: entity_id: - light.bedroom_cabinet_light - light.bedroom_dresser_light - alias: Turn Bedroom Cabinet and Dresser Light off id: cb3f2886-4522-4f12-9a29-a3b7fa902f02 trigger: - platform: state entity_id: binary_sensor.bedroom_motion_sensor_occupancy from: 'on' to: 'off' for: minutes: 1 seconds: 30 - platform: state entity_id: binary_sensor.hall_motion_sensor_occupancy from: 'on' to: 'off' for: minutes: 3 condition: - condition: state entity_id: binary_sensor.bedroom_motion_sensor_occupancy state: 'off' for: minutes: 1 seconds: 30 - condition: state entity_id: binary_sensor.hall_motion_sensor_occupancy state: 'off' for: minutes: 3 - condition: state entity_id: input_select.bed_mode state: - just off - 'off' action: service: light.turn_off target: entity_id: - light.bedroom_cabinet_light - light.bedroom_dresser_light - alias: Transition Bed Mode From Just On to On id: 70f1accf-baed-461a-8ce5-d98ef1caa656 trigger: platform: state entity_id: input_select.bed_mode to: just on for: minutes: 30 action: service: input_select.select_option target: entity_id: input_select.bed_mode data: option: 'on' - alias: Transition Bed Mode From Just Off to Off id: aac75176-cda4-4715-832a-1296b9e010f8 trigger: platform: state entity_id: input_select.bed_mode to: just off for: minutes: 5 action: service: input_select.select_option target: entity_id: input_select.bed_mode data: option: 'off' - alias: Transition Bed Mode From Off to Just On id: ce393b1a-b360-41d6-a527-1763128657cb trigger: platform: state entity_id: binary_sensor.bedroom_bed_occupancy from: 'off' to: 'on' condition: condition: state entity_id: input_select.bed_mode state: 'off' action: service: input_select.select_option target: entity_id: input_select.bed_mode data: option: just on - alias: Transition Bed Mode From Just Off to On id: 3053b38a-cc3f-4543-81cf-cd39430631a7 trigger: platform: state entity_id: binary_sensor.bedroom_bed_occupancy from: 'off' to: 'on' condition: condition: state entity_id: input_select.bed_mode state: just off action: service: input_select.select_option target: entity_id: input_select.bed_mode data: option: 'on' - alias: Transition Bed Mode From On to Just Off id: 70baf7e8-3309-495e-9b69-694de5346f39 trigger: platform: state entity_id: binary_sensor.bedroom_bed_occupancy from: 'on' to: 'off' condition: condition: state entity_id: input_select.bed_mode state: 'on' action: service: input_select.select_option target: entity_id: input_select.bed_mode data: option: just off - alias: Transition Bed Mode From Just On to Off id: 5b8858ea-4e4a-40c7-959a-8d86b4a0beaf trigger: platform: state entity_id: binary_sensor.bedroom_bed_occupancy from: 'on' to: 'off' condition: condition: state entity_id: input_select.bed_mode state: just on action: service: input_select.select_option target: entity_id: input_select.bed_mode data: option: 'off' - alias: Turn Hall Ceiling Light on when there is Movement id: dd2c9c06-bddd-43ef-8662-9710093d0f46 trigger: platform: state entity_id: binary_sensor.hall_motion_sensor_occupancy from: 'off' to: 'on' condition: condition: or conditions: - condition: state entity_id: sensor.period_of_day state: - Sunrise - Day - Sunset - condition: state entity_id: binary_sensor.outdoor_frontdoor_contact state: 'off' action: service: light.turn_on target: entity_id: light.hall_ceiling_light - alias: Turn Hall Ceiling Light off after last Movement id: 50f3bf81-9cfb-4ee6-93ac-98a6d9d63677 trigger: platform: state entity_id: binary_sensor.hall_motion_sensor_occupancy from: 'on' to: 'off' for: minutes: 3 action: service: light.turn_off target: entity_id: light.hall_ceiling_light - alias: Turn Hall Ceiling Light on when opening Door id: e00270aa-a484-420c-a907-39f161e2a676 trigger: platform: state entity_id: binary_sensor.outdoor_frontdoor_contact from: 'off' to: 'on' condition: condition: state entity_id: sensor.period_of_day state: - Sunrise - Day - Sunset action: service: light.turn_on target: entity_id: light.hall_ceiling_light - alias: Turn Hall Ceiling Light off when opening Door id: 0234e869-b7ca-4d81-a661-097481a63adf trigger: platform: state entity_id: binary_sensor.outdoor_frontdoor_contact from: 'off' to: 'on' condition: condition: not conditions: - condition: state entity_id: sensor.period_of_day state: - Sunrise - Day - Sunset action: service: light.turn_off target: entity_id: light.hall_ceiling_light - alias: Turn Hall Ceiling Light on when closing Door and there is Movement id: 14a20f2c-a2bf-4906-b5ab-83636906fc52 trigger: platform: state entity_id: binary_sensor.outdoor_frontdoor_contact from: 'on' to: 'off' condition: condition: state entity_id: binary_sensor.hall_motion_sensor_occupancy state: 'on' action: service: light.turn_on target: entity_id: light.hall_ceiling_light - alias: Turn Hall Ceiling Light off when closing Door without Movement id: 84446437-ea6c-424a-9a9c-9b4764587566 trigger: platform: state entity_id: binary_sensor.outdoor_frontdoor_contact from: 'on' to: 'off' condition: condition: state entity_id: binary_sensor.hall_motion_sensor_occupancy state: 'off' action: service: light.turn_off target: entity_id: light.hall_ceiling_light - alias: Turn Coffee Maschine off id: 8eb927c2-c053-453f-b29e-dd9724426f7a trigger: - platform: state entity_id: input_select.away_mode from: 'off' to: just on - platform: state entity_id: input_select.bed_mode from: 'off' to: just on action: - service: switch.turn_off target: entity_id: switch.kitchen_coffee_machine_relay - alias: Turn Kitchen Fan on id: c2887c1d-e759-4d79-bcc5-1a3adee523ee trigger: - platform: state entity_id: fan.kitchen_fan to: 'off' for: hours: 6 - platform: state entity_id: input_select.away_mode from: just on to: 'on' - platform: state entity_id: input_select.bed_mode from: just on to: 'on' condition: - condition: state entity_id: fan.kitchen_fan state: 'off' for: hours: 6 - condition: or conditions: - condition: state entity_id: input_select.away_mode state: 'on' - condition: state entity_id: input_select.bed_mode state: 'on' action: - service: fan.turn_on target: entity_id: fan.kitchen_fan - alias: Turn Kitchen Fan off id: 1ca528ab-9344-4252-a21e-286e01cb322f trigger: - platform: state entity_id: fan.kitchen_fan to: 'on' for: minutes: 60 - platform: state entity_id: input_select.away_mode from: 'on' to: just off - platform: state entity_id: input_select.bed_mode from: 'on' to: just off action: - service: fan.turn_off target: entity_id: fan.kitchen_fan - alias: Turn Kitchen Ceiling and Counter Light on when there is Movement id: 763269a9-c70f-4ae5-877e-fa35acea16fa trigger: platform: state entity_id: binary_sensor.kitchen_motion_sensor_occupancy from: 'off' to: 'on' action: service: light.turn_on target: entity_id: - light.kitchen_ceiling_light - light.kitchen_counter_light - alias: Turn Kitchen Ceiling and Counter Light off after last Movement id: 57517167-d96e-4ba2-ab26-b050d4084689 trigger: platform: state entity_id: binary_sensor.kitchen_motion_sensor_occupancy from: 'on' to: 'off' for: minutes: 5 action: service: light.turn_off target: entity_id: - light.kitchen_ceiling_light - light.kitchen_counter_light - alias: Turn Kitchen Sideboard Light on id: 912dcf60-5a35-4f9e-934b-c33fc5bdd16d trigger: - platform: state entity_id: sensor.period_of_day from: Sunset to: Dusk - platform: state entity_id: - input_select.away_mode - input_select.bed_mode from: 'on' to: just off condition: - condition: state entity_id: sensor.period_of_day state: - Dusk - Night - Dawn - condition: state entity_id: input_select.away_mode state: - just off - 'off' - condition: state entity_id: input_select.bed_mode state: - just off - 'off' action: service: script.random_color data: lights: - light.kitchen_sideboard_light - alias: Turn Kitchen Sideboard Light off id: 213a5359-2fc3-47bd-9876-5dc402cbd7bd trigger: - platform: state entity_id: sensor.period_of_day from: Dawn to: Sunrise - platform: state entity_id: - input_select.away_mode - input_select.bed_mode from: - just on - just off to: 'on' action: service: light.turn_off target: entity_id: - light.kitchen_sideboard_light - alias: Turn TV on id: 24c4a623-0628-45ae-964a-9436f3cba4d1 triggers: - trigger: device domain: mqtt device_id: 86d39ed7bb87433588884e39a14bc36d type: action subtype: brightness_move_up conditions: - condition: state entity_id: media_player.lg_webos_tv state: 'off' actions: - action: media_player.turn_on target: entity_id: media_player.lg_webos_tv - alias: Turn TV off id: 61529196-14fc-4945-adc3-18902d77c5ff triggers: - trigger: device domain: mqtt device_id: 86d39ed7bb87433588884e39a14bc36d type: action subtype: brightness_move_down - platform: state entity_id: input_select.away_mode from: 'off' to: just on - platform: state entity_id: input_select.bed_mode from: 'off' to: just on conditions: - condition: state entity_id: media_player.lg_webos_tv state: 'on' actions: - action: media_player.turn_off target: entity_id: media_player.lg_webos_tv - alias: Turn TV Volume up id: d530c1f7-008d-487a-ac04-6dcd0e8dd2fd triggers: - trigger: device domain: mqtt device_id: 86d39ed7bb87433588884e39a14bc36d type: action subtype: 'on' conditions: - condition: state entity_id: media_player.lg_webos_tv state: 'on' actions: - action: media_player.volume_up target: entity_id: media_player.lg_webos_tv - alias: Turn TV Volume down id: e2b8f04b-e7ff-45f0-8480-68cbfa1bc024 triggers: - trigger: device domain: mqtt device_id: 86d39ed7bb87433588884e39a14bc36d type: action subtype: 'off' conditions: - condition: state entity_id: media_player.lg_webos_tv state: 'on' actions: - action: media_player.volume_down target: entity_id: media_player.lg_webos_tv - alias: Turn TV Power on id: 23f2cd65-f5b3-491c-a87f-2055301daa28 triggers: - trigger: device domain: webostv device_id: ab25640d50b175aaff23e7a6e8459140 type: webostv.turn_on condition: - condition: state entity_id: media_player.lg_webos_tv state: 'off' - condition: state entity_id: switch.living_room_tv state: 'off' actions: - service: switch.turn_on target: entity_id: switch.living_room_tv - delay: seconds: 5 - repeat: sequence: - action: wake_on_lan.send_magic_packet data: mac: secret wake_on_lan_mac broadcast_address: secret wake_on_lan_broadcast_address broadcast_port: secret wake_on_lan_broadcast_port - delay: seconds: 2 until: - condition: or conditions: - condition: state entity_id: media_player.lg_webos_tv state: 'on' - condition: template value_template: '{{ repeat.index >= 10 }}' - alias: Turn TV Power off id: 0958a97a-3efb-468a-9c75-eee8098f39ad trigger: - platform: numeric_state entity_id: sensor.living_room_tv_power below: 5 for: seconds: 30 condition: - condition: state entity_id: media_player.lg_webos_tv state: 'off' - condition: state entity_id: switch.living_room_tv state: 'on' action: - service: switch.turn_off target: entity_id: switch.living_room_tv - alias: Turn Living Room Ceiling Light on when there is Movement id: a9166a79-028c-40d2-b157-7dd6ec3189cb trigger: platform: state entity_id: binary_sensor.living_room_motion_sensor_occupancy from: 'off' to: 'on' condition: condition: state entity_id: input_select.bed_mode state: - 'on' - just on action: service: light.turn_on target: entity_id: light.living_room_ceiling_light - alias: Turn Living Room Ceiling Light off after last Movement id: 8de09585-9311-457c-be0b-84f7c8142d41 trigger: platform: state entity_id: binary_sensor.living_room_motion_sensor_occupancy from: 'on' to: 'off' for: minutes: 5 condition: condition: state entity_id: input_select.bed_mode state: - 'on' - just on action: service: light.turn_off target: entity_id: light.living_room_ceiling_light - alias: Turn Living Room Ceiling Light on id: dc5d8157-3df4-47d5-9315-e4491ad42019 trigger: platform: state entity_id: - input_select.away_mode - input_select.bed_mode from: 'on' to: just off action: service: light.turn_on target: entity_id: light.living_room_ceiling_light - alias: Turn Living Room Ceiling Light off id: 30efc83b-a870-48bb-8341-28d821a5a33d trigger: platform: state entity_id: - input_select.away_mode - input_select.bed_mode from: - just on - just off to: 'on' action: service: light.turn_off target: entity_id: light.living_room_ceiling_light - alias: Turn Living Room Sofa and TV Light on id: 861debaa-4310-4053-b98b-2275847691bb trigger: - platform: state entity_id: sensor.period_of_day from: Sunset to: Dusk - platform: state entity_id: - input_select.away_mode - input_select.bed_mode from: 'on' to: just off condition: - condition: state entity_id: sensor.period_of_day state: - Dusk - Night - Dawn - condition: state entity_id: input_select.away_mode state: - just off - 'off' - condition: state entity_id: input_select.bed_mode state: - just off - 'off' action: service: script.random_color data: lights: - light.living_room_sofa_light - light.living_room_tv_light - alias: Turn Living Room Sofa and TV Light off id: c3dda693-5c89-453b-8ca0-647e86f7b0ba trigger: - platform: state entity_id: sensor.period_of_day from: Dawn to: Sunrise - platform: state entity_id: - input_select.away_mode - input_select.bed_mode from: - just on - just off to: 'on' action: service: light.turn_off target: entity_id: - light.living_room_sofa_light - light.living_room_tv_light - alias: Send Notification about unclosed Outdoor Doors id: 75546147-378a-4dbc-b2ca-f4d4f707da15 max_exceeded: silent trigger: platform: state entity_id: - binary_sensor.outdoor_frontdoor_contact - binary_sensor.outdoor_backdoor_contact to: 'on' for: minutes: 10 condition: - condition: state entity_id: - input_select.away_mode - input_select.bed_mode state: 'off' - condition: numeric_state entity_id: weather.meteorologisk attribute: temperature below: 16 - condition: not conditions: - condition: state entity_id: - binary_sensor.outdoor_frontdoor_contact - binary_sensor.outdoor_backdoor_contact state: 'on' for: minutes: 10 action: service: notify.mobile_app_iphone_von_david data: title: Outdoor doors unclosed message: Close outdoor doors to keep it warm. data: tag: unclosed-outdoor-doors - alias: Clear Notification about unclosed Outdoor Doors id: 98cd6b76-8b4c-48f2-82c5-73d3e492e426 max_exceeded: silent trigger: platform: state entity_id: - binary_sensor.outdoor_frontdoor_contact - binary_sensor.outdoor_backdoor_contact to: 'off' condition: condition: state entity_id: - binary_sensor.outdoor_frontdoor_contact - binary_sensor.outdoor_backdoor_contact state: 'off' action: service: notify.mobile_app_iphone_von_david data: message: clear_notification data: tag: unclosed-outdoor-doors - alias: Send Notification about unclosed Bedroom Windows id: 0c534f2d-72da-42fb-86e3-034ba16a16f0 max_exceeded: silent trigger: platform: state entity_id: - binary_sensor.bedroom_window_left_contact - binary_sensor.bedroom_window_right_contact to: 'on' for: minutes: 10 condition: - condition: state entity_id: - input_select.away_mode - input_select.bed_mode state: 'off' - condition: numeric_state entity_id: weather.meteorologisk attribute: temperature below: 16 - condition: not conditions: - condition: state entity_id: - binary_sensor.bedroom_window_left_contact - binary_sensor.bedroom_window_right_contact state: 'on' for: minutes: 10 action: service: notify.mobile_app_iphone_von_david data: title: Bedroom windows unclosed message: Close bedroom windows to keep it warm. data: tag: unclosed-bedroom-windows - alias: Clear Notification about unclosed Bedroom Windows id: e77baedc-3316-4650-9565-82049ec3ace4 max_exceeded: silent trigger: platform: state entity_id: - binary_sensor.bedroom_window_left_contact - binary_sensor.bedroom_window_right_contact to: 'off' condition: condition: state entity_id: - binary_sensor.bedroom_window_left_contact - binary_sensor.bedroom_window_right_contact state: 'off' action: service: notify.mobile_app_iphone_von_david data: message: clear_notification data: tag: unclosed-bedroom-windows - alias: Send Notification about pending Bedroom Ventilation id: 09ac3a7a-e198-4bd6-8892-6320aa9be819 max_exceeded: silent trigger: - platform: state entity_id: - input_select.away_mode - input_select.bed_mode to: 'off' for: minutes: 30 - platform: state entity_id: - binary_sensor.bedroom_window_left_contact - binary_sensor.bedroom_window_right_contact to: 'off' for: hours: 6 condition: - condition: state entity_id: sensor.period_of_day state: - Sunrise - Day - Sunset - condition: state entity_id: - input_select.away_mode - input_select.bed_mode state: 'off' for: minutes: 30 - condition: state entity_id: - binary_sensor.bedroom_window_left_contact - binary_sensor.bedroom_window_right_contact state: 'off' for: hours: 6 action: service: notify.mobile_app_iphone_von_david data: title: Bedroom ventilation pending message: Open bedroom windows to get some fresh air. data: tag: pending-bedroom-ventilation - alias: Clear Notification about pending Bedroom Ventilation id: 279a2bf7-b4cc-4095-a3d4-b3b6e10619bc max_exceeded: silent trigger: platform: state entity_id: - binary_sensor.bedroom_window_left_contact - binary_sensor.bedroom_window_right_contact to: 'on' condition: condition: not conditions: - condition: state entity_id: - binary_sensor.bedroom_window_left_contact - binary_sensor.bedroom_window_right_contact state: 'on' action: service: notify.mobile_app_iphone_von_david data: message: clear_notification data: tag: pending-bedroom-ventilation - alias: Turn Outdoor Frontdoor Light on id: d5cb8c07-9327-4859-8381-783801d076fa trigger: - platform: state entity_id: sensor.period_of_day from: Sunset to: Dusk - platform: state entity_id: input_select.away_mode from: 'on' to: just off - platform: state entity_id: input_select.bed_mode from: just off to: 'off' condition: - condition: state entity_id: sensor.period_of_day state: - Dusk - Night - Dawn - condition: state entity_id: input_select.away_mode state: - just off - 'off' - condition: state entity_id: input_select.bed_mode state: - just off - 'off' action: service: light.turn_on target: entity_id: light.outdoor_frontdoor_light - alias: Turn Outdoor Backdoor Light on id: d7efe2bf-f328-44ef-9ab0-98c2e5e0ba64 trigger: - platform: state entity_id: input_select.away_mode from: 'on' to: just off condition: - condition: state entity_id: sensor.period_of_day state: - Dusk - Night - Dawn - condition: state entity_id: input_select.away_mode state: - just off - 'off' - condition: state entity_id: input_select.bed_mode state: - just off - 'off' action: service: light.turn_on target: entity_id: light.outdoor_backdoor_light - alias: Turn Outdoor Frontdoor Light off id: 20b82cc6-4c54-4ac0-b938-4659dc4a3bcd trigger: - platform: state entity_id: sensor.period_of_day from: Dawn to: Sunrise - platform: state entity_id: input_select.away_mode from: just on to: 'on' - platform: state entity_id: input_select.bed_mode from: just on to: 'on' action: service: light.turn_off target: entity_id: light.outdoor_frontdoor_light - alias: Turn Outdoor Backdoor Light off id: 19f05355-6ee0-4a43-a684-cb6738a5a585 trigger: - platform: state entity_id: sensor.period_of_day from: Dawn to: Sunrise - platform: state entity_id: input_select.away_mode from: just on to: 'on' - platform: state entity_id: input_select.away_mode from: just off to: 'off' - platform: state entity_id: input_select.bed_mode from: just on to: 'on' action: service: light.turn_off target: entity_id: light.outdoor_backdoor_light - alias: Start Presence Simulation when Leaving id: 889799ce-a39e-4e9f-b296-bd39fce3859f trigger: platform: state entity_id: input_select.away_mode from: just on to: 'on' action: service: presence_simulation.start data: restore_states: false - alias: Stop Presence Simulation when Arriving id: 2dca1ca0-e890-4fc3-8262-ee36552064ef trigger: platform: state entity_id: input_select.away_mode from: 'on' to: just off action: service: presence_simulation.stop - alias: Reset Sonos Volume id: cef75154-16bc-4990-b1d8-00d7fe5b13d2 mode: queued trigger: platform: state entity_id: - media_player.sonos_device_kuche - media_player.sonos_device_schlafzimmer - media_player.sonos_device_wohnzimmer to: - idle - paused for: minutes: 10 action: - service: media_player.volume_set target: entity_id: '{{ trigger.entity_id }}' data: volume_level: 0.08 - service: media_player.volume_mute target: entity_id: '{{ trigger.entity_id }}' data: is_volume_muted: false - alias: Pause Sonos id: 6729b4c3-631f-4211-917b-9d110f94de0c mode: queued trigger: - platform: state entity_id: input_select.away_mode from: 'off' to: just on - platform: state entity_id: input_select.bed_mode from: 'off' to: just on action: - service: media_player.media_pause target: entity_id: - media_player.sonos_device_kuche - media_player.sonos_device_wohnzimmer - condition: state entity_id: input_select.away_mode state: just on - service: media_player.media_pause target: entity_id: media_player.sonos_device_schlafzimmer