- alias: 'iOS: lichten in kantoor aan-/uitzetten' initial_state: true triggers: - trigger: event event_type: ios.action_fired event_data: actionName: Kantoor actions: - action: light.toggle target: entity_id: light.kantoor_lampen - alias: 'Arriving: when motion detected in hallway after returning home, turn on living room and office lights' triggers: - platform: state entity_id: - person.willem_spork - person.nina_juffermans to: home conditions: - condition: or conditions: - condition: state entity_id: person.willem_spork state: home - condition: state entity_id: person.nina_juffermans state: home actions: - wait_for_trigger: - platform: state entity_id: binary_sensor.activity_in_hallway from: 'off' to: 'on' continue_on_timeout: false - service: light.turn_on target: entity_id: - light.woonkamer - light.kantoor - alias: Flash Red trigger: - platform: state entity_id: input_boolean.flash_red to: 'on' action: - repeat: while: - condition: state entity_id: input_boolean.flash_red state: 'on' sequence: - service: light.turn_on data: entity_id: - light.kantoor_plafond - light.convectorput rgb_color: - 255 - 38 - 0 - delay: milliseconds: 500 - service: light.turn_off data: entity_id: - light.kantoor_plafond - light.convectorput - delay: milliseconds: 500 id: bc98764800ce4ee5887d72d55f956c49 - id: '1697908759181' alias: TTS Testen description: '' trigger: - platform: state entity_id: - input_boolean.tts_test to: 'on' condition: [] action: - service: tts.google_say data: cache: false entity_id: - media_player.slaapkamer_2 - media_player.slaapkamer message: Nina heeft vandaag 3783 stappen gezet. Tijd om naar buiten te gaan! mode: single - alias: Update Dryer Timer trigger: platform: state entity_id: sensor.droger_dryer_completion_time action: - service: timer.start target: entity_id: timer.droger_timer data: duration: '{{ (as_timestamp(strptime(states(''sensor.droger_dryer_completion_time''), ''%Y-%m-%dT%H:%M:%S+00:00'')) - as_timestamp(now())) | int }} ' id: d0c1e848ffad4c73a70b00f4333e1910 - id: '1698456877330' alias: Welterusten description: '' triggers: - device_id: ef8c38a85b323b90542b3d9ec14251d9 domain: hue type: initial_press subtype: 3 unique_id: 52ae4513-474b-4d98-b642-5946e34fec7d trigger: device conditions: [] actions: - data: percentage: 20 target: device_id: 734621e31d54471b4afe95c8ea6feb8e action: fan.turn_on - delay: hours: 0 minutes: 0 seconds: 1 milliseconds: 0 - type: turn_on device_id: 734621e31d54471b4afe95c8ea6feb8e entity_id: 268b6a8b20ba6fd5cc4fb6b791c80dcb domain: switch - delay: hours: 0 minutes: 0 seconds: 1 milliseconds: 0 - data: oscillating: true target: device_id: 734621e31d54471b4afe95c8ea6feb8e action: fan.oscillate - device_id: ed1577b84a5e787d05b4a1cf3bf1b1b7 domain: climate entity_id: 43b52ea144d1c384391b5a5d3b34d6b0 type: set_hvac_mode hvac_mode: auto - device_id: ed1577b84a5e787d05b4a1cf3bf1b1b7 domain: climate entity_id: 43b52ea144d1c384391b5a5d3b34d6b0 type: set_preset_mode preset_mode: auto - device_id: b9b793a04300f80c51eb10be7118ee5e domain: climate entity_id: b19e1f31ca5ccee59ca1a30185d84575 type: set_hvac_mode hvac_mode: auto - device_id: b9b793a04300f80c51eb10be7118ee5e domain: climate entity_id: b19e1f31ca5ccee59ca1a30185d84575 type: set_preset_mode preset_mode: auto - entity_id: all action: light.turn_off - action: input_boolean.turn_on target: entity_id: input_boolean.sleep_mode data: {} mode: single - id: '1700000000000' alias: Speel Geselecteerd Radiostation description: Speelt het geselecteerde radiostation af in kantoor trigger: - platform: state entity_id: input_select.radio_station action: - service: media_player.play_media target: entity_id: media_player.slaapkamer data: media_content_id: "{% set station = states('input_select.radio_station') %}\ \ {% set stations = {\n \"QMusic\": \"https://stream.qmusic.nl/qmusic/mp3\"\ ,\n \"BNR Nieuwsradio\": \"https://stream.bnr.nl/bnr_mp3_128_20\",\n \"\ QMusic Non-Stop\": \"https://stream.qmusic.nl/nonstop/mp3\",\n \"LoFi\":\ \ \"http://streams.dez.ovh:8000/radio.mp3\",\n \"Efteling Radio\": 'http://ice.cr2.streamzilla.xlcdn.com:8000/sz=efteling=hdstream'\n\ } %} {{ stations[station] }}\n" media_content_type: music mode: single - id: standard_theme alias: 'System: standaard thema selecteren bij herstart' description: '' triggers: - event: start trigger: homeassistant actions: - data: name: minimalist-ios-tapbar action: frontend.set_theme initial_state: 'true' - id: '1729727657788' alias: 'Test: PS5 automation' description: '' triggers: - trigger: state entity_id: - sensor.ps5_668_activity attribute: activity - trigger: state entity_id: - input_boolean.tv_mode conditions: - condition: or conditions: - condition: state entity_id: sensor.ps5_668_activity attribute: activity state: playing - condition: state entity_id: input_boolean.tv_mode state: 'on' - condition: and conditions: - condition: template value_template: '{{ states(''sensor.time'') >= states(''input_datetime.start_tvmodus'')[0:5] and states(''sensor.time'') < ''24:00'' }}' - condition: template value_template: '{{ states(''sensor.time'') >= ''00:00'' and states(''sensor.time'') <= states(''input_datetime.end_tvmodus'')[0:5] }}' actions: - choose: - conditions: - condition: state entity_id: input_boolean.tv_mode state: 'on' - condition: state entity_id: sensor.ps5_668_activity attribute: activity state: playing sequence: - action: switch.turn_on metadata: {} data: {} target: entity_id: switch.adaptive_lighting_adapt_brightness_living_room - conditions: - condition: or conditions: - condition: state entity_id: input_boolean.tv_mode state: 'off' - condition: not conditions: - condition: state entity_id: sensor.ps5_668_activity attribute: activity state: playing sequence: - action: switch.turn_off metadata: {} data: {} target: entity_id: switch.adaptive_lighting_sleep_mode_living_room mode: single - id: '1731366389356' alias: Button Living Room Actions description: '' triggers: - entity_id: sensor.living_button_action trigger: state conditions: [] actions: - choose: - conditions: - condition: state entity_id: sensor.living_button_action state: 1_single_press sequence: - target: area_id: woonkamer action: light.turn_on data: {} - conditions: - condition: state entity_id: sensor.living_button_action state: 2_long_press sequence: - target: area_id: kantoor action: light.toggle data: {} - conditions: - condition: state entity_id: sensor.living_button_action state: 1_long_press sequence: - target: area_id: keuken action: light.turn_off data: {} default: [] mode: single - id: '1731367575914' alias: 'Button Living Room: toggle tv mode' description: '' triggers: - domain: mqtt device_id: 32679cd523b0e0d77da0be6322db3aba type: action subtype: 1_initial_press trigger: device conditions: [] actions: - action: input_boolean.toggle target: entity_id: input_boolean.tv_mode data: {} mode: single - alias: 'Leaving: when everybody leaves the house turn off all lights' trigger: - platform: state entity_id: group.persons to: not_home action: - service: light.turn_off target: entity_id: all - service: fan.turn_off target: entity_id: all - id: '8276345345' alias: 'Lights: Adaptive Lighting TV Mode Control' description: Control the sleep mode for adaptive lighting based on media player state triggers: - trigger: state entity_id: media_player.woonkamer - trigger: state entity_id: input_boolean.tv_mode conditions: - condition: or conditions: - condition: state entity_id: media_player.woonkamer state: playing - condition: state entity_id: input_boolean.tv_mode state: 'on' - condition: or conditions: - condition: template value_template: '{{ states(''sensor.time'') >= states(''input_datetime.start_tvmodus'')[0:5] }} ' - condition: template value_template: '{{ states(''sensor.time'') <= states(''input_datetime.end_tvmodus'')[0:5] }} ' actions: - choose: - conditions: - condition: state entity_id: input_boolean.tv_mode state: 'on' - condition: state entity_id: media_player.woonkamer state: playing sequence: - action: switch.turn_on target: entity_id: switch.adaptive_lighting_sleep_mode_living_room - conditions: - condition: or conditions: - condition: state entity_id: input_boolean.tv_mode state: 'off' - condition: not conditions: - condition: state entity_id: media_player.woonkamer state: playing sequence: - action: switch.turn_off target: entity_id: switch.adaptive_lighting_sleep_mode_living_room mode: single - id: '2145243512' alias: 'Lights: PS5 switch adaptive lighting' description: '' mode: single triggers: - trigger: state entity_id: - sensor.ps5_668_activity attribute: activity - trigger: state entity_id: - input_boolean.game_mode conditions: - condition: or conditions: - condition: state entity_id: sensor.ps5_668_activity attribute: activity state: playing - condition: state entity_id: input_boolean.game_mode state: 'on' - condition: or conditions: - condition: template value_template: '{{ states(''sensor.time'') >= states(''input_datetime.start_tvmodus'')[0:5] }} ' - condition: template value_template: '{{ states(''sensor.time'') <= states(''input_datetime.end_tvmodus'')[0:5] }} ' actions: - choose: - conditions: - condition: state entity_id: input_boolean.game_mode state: 'on' - condition: state entity_id: sensor.ps5_668_activity attribute: activity state: playing sequence: - action: switch.turn_on metadata: {} data: {} target: entity_id: switch.adaptive_lighting_sleep_mode_living_room - conditions: - condition: or conditions: - condition: state entity_id: input_boolean.game_mode state: 'off' - condition: not conditions: - condition: state entity_id: sensor.ps5_668_activity attribute: activity state: playing sequence: - action: switch.turn_off metadata: {} data: {} target: entity_id: switch.adaptive_lighting_sleep_mode_living_room - alias: 'Lights: turn on kitchen' triggers: - trigger: state entity_id: binary_sensor.activity_in_kitchen to: 'on' conditions: - condition: state entity_id: input_boolean.cooking_mode state: 'off' actions: - action: light.turn_on target: entity_id: light.keuken - alias: 'Lights: turn off kitchen' triggers: - trigger: state entity_id: binary_sensor.activity_in_kitchen to: 'off' conditions: - condition: state entity_id: input_boolean.cooking_mode state: 'off' actions: - action: light.turn_off target: entity_id: light.keuken - alias: 'Button: Keuken Mode Automation' triggers: - trigger: state entity_id: sensor.kitchen_button_action to: single actions: - action: input_boolean.toggle target: entity_id: input_boolean.cooking_mode - alias: 'Light: Cooking Mode Lighting Control' triggers: - trigger: state entity_id: input_boolean.cooking_mode to: 'on' - trigger: state entity_id: input_boolean.cooking_mode to: 'off' actions: - choose: - conditions: - condition: state entity_id: input_boolean.cooking_mode state: 'on' sequence: - action: switch.turn_off target: entity_id: switch.adaptive_lighting_kitchen - action: light.turn_on target: entity_id: light.keuken data: color_temp: 183 brightness: 202 - conditions: - condition: state entity_id: input_boolean.cooking_mode state: 'off' sequence: - action: switch.turn_on target: entity_id: switch.adaptive_lighting_kitchen - alias: 'Lights: turn on when motion detected in the hallway' triggers: - trigger: state entity_id: binary_sensor.activity_in_hallway to: 'on' actions: - action: light.turn_on target: entity_id: light.gang - alias: 'Lights: turn off when motion detected in the hallway' triggers: - trigger: state entity_id: binary_sensor.activity_in_hallway to: 'off' actions: - action: light.turn_off target: entity_id: light.gang - alias: 'Lights: turn off when stopped motion detected in the hallway' triggers: - trigger: state entity_id: binary_sensor.activity_in_hallway to: 'off' for: minutes: 12 conditions: - condition: state entity_id: light.inloopkast state: 'on' actions: - action: light.turn_off target: entity_id: light.inloopkast - alias: 'Reset: reset daily at night' description: Reset certain things at 6:00 AM every day. trigger: - platform: time at: 06:00:00 actions: - action: input_boolean.turn_on target: entity_id: - input_boolean.game_mode - input_boolean.tv_mode - action: input_boolean.turn_off target: entity_id: - input_boolean.sleep_mode - input_boolean.cooking_mode mode: single - alias: 'Work: Willem left work notification for Nina' triggers: - trigger: state entity_id: person.willem_spork from: Office conditions: - condition: time after: '15:00:00' before: '23:00:00' actions: - action: notify.all_iphones data: title: Work message: Willem vertrekt van kantoor! ♥️🎉 - alias: 'Work: Nina left work notification for Willem' triggers: - trigger: state entity_id: person.nina_juffermans from: Office conditions: - condition: time after: '15:00:00' before: '23:00:00' actions: - action: notify.all_iphones data: title: Work message: Nina vertrekt van kantoor! ♥️🎉 - alias: 'Work: Nina left Rijksmuseum notification for Willem' triggers: - trigger: state entity_id: person.nina_juffermans from: Rijksmuseum conditions: - condition: time after: '15:00:00' before: '23:00:00' actions: - action: notify.all_iphones data: title: Work message: Nina vertrekt van Rijksmuseum! ♥️🎉 - alias: 'Notifications: front door has opened' triggers: - trigger: state entity_id: binary_sensor.gang_voordeur_deur to: 'on' conditions: - condition: state entity_id: input_boolean.front_door_open_warning state: 'on' actions: - action: notify.willem data: title: Security message: Front door opened! - action: input_boolean.turn_off entity_id: input_boolean.front_door_open_warning - alias: 'Notifications: put the trash outside' description: Herinnering om de afvalbak naar buiten te zetten op maandagavond om 21:00 triggers: - platform: time at: '21:00:00' conditions: - condition: time weekday: - mon actions: - service: notify.all_iphones data: title: 🗑️ Afvalherinnering message: Denk eraan om de afvalbak buiten te zetten! - wait_template: '{{ is_state(''sensor.willem_in_home_location'', ''Kantoor'') }}' timeout: 01:00:00 continue_on_timeout: false - delay: 00:00:30 - service: tts.speak target: entity_id: tts.elevenlabs_tts data: media_player_entity_id: - media_player.slaapkamer message: Vergeet de afvalbak niet buiten te zetten cache: false options: voice: Jessica stability: 1 similarity: 1 style: 0.3 use_speaker_boost: 'true' model: eleven_multilingual_v2 optimize_streaming_latency: 3 - alias: 'Notifications: someone logged in to Minecraft' description: Laat weten of er iemand in de Minecraftserver zit. trigger: - platform: numeric_state entity_id: sensor.minecraft_server_spelers_online above: 0 action: - service: notify.willem data: title: 👾 Minecraft message: Er is iemand online gekomen in de server! mode: single - alias: 'Security: motion detected but we are not home' triggers: - trigger: state entity_id: binary_sensor.motion_detected from: 'off' to: 'on' conditions: - condition: state entity_id: group.persons state: not_home actions: - action: notify.willem data: title: Security message: 'Security: motion is detected, but we are not home. 🚨' data: push: sound: name: default critical: 1 volume: 1.0 actions: - action: SOUND_ALARM title: Sound alarm activationMode: background authenticationRequired: true destructive: true - wait_for_trigger: triggers: - trigger: event event_type: mobile_app_notification_action event_data: action: SOUND_ALARM timeout: 01:00:00 continue_on_timeout: false - action: light.turn_on entity_id: all data: flash: long color_name: red - alias: 'Security: front door has been open for more than 5 minutes' triggers: - trigger: state entity_id: binary_sensor.gang_voordeur_deur from: 'off' to: 'on' for: 00:05:00 actions: - action: notify.all_iphones data: title: Security message: The front door has been open for more than 5 minutes. data: push: sound: name: default critical: 1 volume: 0.5 - alias: 'Security: back door has been open for more than 5 minutes' triggers: - trigger: state entity_id: binary_sensor.keuken_achterdeur_deur from: 'off' to: 'on' for: 00:05:00 actions: - action: notify.all_iphones data: title: Security message: The back door has been open for more than 5 minutes. data: push: sound: name: default critical: 1 volume: 0.5 - alias: 'Sleep mode: switch sleep_mode on/off based on input_boolean' description: Turn switches on when sleep mode is enabled and turn them off when disabled mode: single trigger: - platform: state entity_id: input_boolean.sleep_mode from: 'off' to: 'on' - platform: state entity_id: input_boolean.sleep_mode from: 'on' to: 'off' action: - choose: - conditions: - condition: state entity_id: input_boolean.sleep_mode state: 'on' sequence: - service: switch.turn_on target: entity_id: - switch.adaptive_lighting_sleep_mode_bedroom - switch.adaptive_lighting_sleep_mode_hallway - switch.adaptive_lighting_sleep_mode_kitchen - switch.adaptive_lighting_sleep_mode_living_room - switch.adaptive_lighting_sleep_mode_office - switch.adaptive_lighting_sleep_mode_wardrobe - conditions: - condition: state entity_id: input_boolean.sleep_mode state: 'off' sequence: - service: switch.turn_off target: entity_id: - switch.adaptive_lighting_sleep_mode_bedroom - switch.adaptive_lighting_sleep_mode_hallway - switch.adaptive_lighting_sleep_mode_kitchen - switch.adaptive_lighting_sleep_mode_living_room - switch.adaptive_lighting_sleep_mode_office - switch.adaptive_lighting_sleep_mode_wardrobe - alias: 'Test: notify groups' triggers: - trigger: state entity_id: input_boolean.test_mode to: 'on' actions: - action: input_boolean.turn_off entity_id: input_boolean.test_mode - action: tts.speak target: entity_id: tts.elevenlabs_tts data: media_player_entity_id: - media_player.slaapkamer message: 'ai ai ai ai ai ai ai ai ai ' cache: false options: voice: Jessica stability: 1 similarity: 1 style: 0.3 use_speaker_boost: 'true' model: eleven_multilingual_v2 optimize_streaming_latency: 3 - alias: 'Vacation mode: auto turn on' initial_state: 'on' triggers: - trigger: state entity_id: group.persons from: home to: not_home for: '24:00:00' conditions: - condition: state entity_id: input_boolean.guest_mode state: 'off' actions: - service: input_boolean.turn_on entity_id: input_boolean.vacation_mode - service: notify.all_iphones data: title: Vacation mode message: No one at home for 24 hours, switching on vacation mode. - alias: 'Vacation mode: auto turn off' initial_state: 'on' triggers: - trigger: state entity_id: group.persons from: not_home to: home conditions: - condition: state entity_id: input_boolean.vacation_mode state: 'on' - condition: state entity_id: input_boolean.guest_mode state: 'off' actions: - service: input_boolean.turn_off entity_id: input_boolean.vacation_mode - service: notify.all_iphones data: title: Vacation mode message: Welcome back! Switching off the vacation mode.