From 557ccb9c5b5874055327695f66210994be0ecb7e Mon Sep 17 00:00:00 2001 From: Joshua Date: Tue, 1 Jul 2025 13:23:50 -0400 Subject: [PATCH] updated --- automations.yaml | 383 ++++++++++++++++++++--------------------------- 1 file changed, 163 insertions(+), 220 deletions(-) diff --git a/automations.yaml b/automations.yaml index 460715c..9b67288 100644 --- a/automations.yaml +++ b/automations.yaml @@ -2,14 +2,11 @@ alias: Turn off living room lights description: '' triggers: - - trigger: state - entity_id: - - binary_sensor.living_room_temp_sensor_occupancy + - entity_id: binary_sensor.living_room_motion_2 to: 'off' for: - hours: 0 minutes: 1 - seconds: 0 + trigger: state conditions: - condition: time after: '19:00:00' @@ -23,19 +20,16 @@ - fri - sat actions: - - action: light.turn_off - metadata: {} + - target: + entity_id: + - light.living_room_lamp_2_2 + device_id: 77092d966014d6eb6222928cce911caf + action: light.turn_off + data: {} + - action: switch.turn_off data: {} target: - device_id: 77092d966014d6eb6222928cce911caf - - type: turn_off - device_id: 77092d966014d6eb6222928cce911caf - entity_id: af55f6e7e0ffa642407923fc6e8cdaf3 - domain: light - - type: turn_off - device_id: f94b4f4c1b2239789d2c19db7650947d - entity_id: 90375df689a68fe43b63994ae5457d46 - domain: switch + device_id: f94b4f4c1b2239789d2c19db7650947d mode: single - id: '1739061820991' alias: Turn off washing machine when leak sensed @@ -63,7 +57,7 @@ triggers: - trigger: state entity_id: - - binary_sensor.living_room_temp_sensor_motion_2 + - binary_sensor.living_room_motion_2 to: 'on' conditions: - condition: and @@ -71,7 +65,7 @@ - condition: sun after: sunset - condition: time - before: '23:59:00' + before: '21:30:00' actions: - action: light.turn_on metadata: {} @@ -81,38 +75,7 @@ target: entity_id: - light.living_room_lamp_1 - - light.living_room_lamp_2 - mode: single -- id: '1739831095321' - alias: Turn Off Living Room Light - description: '' - triggers: - - type: not_occupied - device_id: 6490580c401b733f92ab18ab70c5ed6c - entity_id: 6f20ea0b998c4f901d523bdcd3e5cfc5 - domain: binary_sensor - trigger: device - conditions: - - condition: time - after: '20:00:00' - before: 05:00:00 - weekday: - - sat - - fri - - thu - - wed - - tue - - mon - - sun - actions: - - type: turn_off - device_id: c248988685c61331586bda48ab8469f4 - entity_id: 746fb1f656fcbf25a3614cb6d941c883 - domain: light - - type: turn_off - device_id: 77092d966014d6eb6222928cce911caf - entity_id: af55f6e7e0ffa642407923fc6e8cdaf3 - domain: light + - light.living_room_lamp_2_2 mode: single - id: '1739835025769' alias: Turn on bedroom lights with motion @@ -120,12 +83,12 @@ triggers: - trigger: state entity_id: - - binary_sensor.master_bedroom_smart_sensor_motion + - binary_sensor.bedroom_motion to: 'on' conditions: - condition: time after: '17:00:00' - before: '22:00:00' + before: '21:00:00' weekday: - sun - mon @@ -151,7 +114,7 @@ triggers: - trigger: state entity_id: - - binary_sensor.master_bedroom_smart_sensor_occupancy + - binary_sensor.bedroom_occupancy to: 'off' for: hours: 0 @@ -214,7 +177,12 @@ entity_id: 0ae75b98556682467fedf0ff441346ef domain: light brightness_pct: 20 - enabled: false + enabled: true + - type: turn_on + device_id: ebe5b855306e22fa875326c566ba8024 + entity_id: 921d709eb7937eff5935783d7fbea451 + domain: light + brightness_pct: 50 mode: single - id: '1739841729184' alias: Declan’s Closet Open Notification @@ -551,7 +519,7 @@ triggers: - trigger: state entity_id: - - binary_sensor.office_smart_sensor_motion + - binary_sensor.office_motion to: 'on' conditions: [] actions: @@ -587,11 +555,11 @@ triggers: - trigger: state entity_id: - - binary_sensor.office_smart_sensor_occupancy + - binary_sensor.office_motion to: 'off' for: - hours: 1 - minutes: 0 + hours: 0 + minutes: 30 seconds: 0 conditions: [] actions: @@ -619,19 +587,6 @@ entity_id: 3bd3f6e27efa6dd483510529f3faeb16 domain: switch mode: single -- id: '1740144203014' - alias: 'Office Echo On ' - description: '' - triggers: - - trigger: time - at: 08:00:00 - conditions: [] - actions: - - type: turn_on - device_id: 31d67bb445f5c8920a1dc076d0d71e76 - entity_id: 6c1fd91e0ff15419f7bdb6b9e233cffc - domain: switch - mode: single - id: '1740144319171' alias: Living Room Tv On description: '' @@ -655,8 +610,8 @@ to: 'off' for: hours: 0 - minutes: 5 - seconds: 0 + minutes: 2 + seconds: 30 conditions: - condition: or conditions: @@ -819,7 +774,7 @@ description: '' triggers: - trigger: time - at: '21:00:00' + at: '22:00:00' conditions: [] actions: - type: turn_on @@ -1224,181 +1179,169 @@ alias: Daily Alexa Announcements for Kids description: Schedule of Alexa announcements for structured daily routine trigger: - - platform: time - at: "09:00:00" - - platform: time - at: "10:00:00" - - platform: time - at: "10:15:00" - - platform: time - at: "11:00:00" - - platform: time - at: "12:00:00" - - platform: time - at: "12:30:00" - - platform: time - at: "13:00:00" - - platform: time - at: "13:30:00" - - platform: time - at: "14:00:00" - - platform: time - at: "14:30:00" - - platform: time - at: "19:29:00" + - platform: time + at: 09:00:00 + - platform: time + at: '10:00:00' + - platform: time + at: '10:15:00' + - platform: time + at: '11:00:00' + - platform: time + at: '12:00:00' + - platform: time + at: '12:30:00' + - platform: time + at: '13:00:00' + - platform: time + at: '13:30:00' + - platform: time + at: '14:00:00' + - platform: time + at: '14:30:00' + - platform: time + at: '19:29:00' condition: - - condition: state - entity_id: calendar.m365_family_events - state: 'on' - - condition: template - value_template: > - {{ 'no camp' in ( - (state_attr('calendar.m365_family_events', 'data') or []) - | selectattr('summary', 'defined') - | map(attribute='summary') - | map('lower') - | list - ) }} + - condition: state + entity_id: calendar.m365_family_events + state: 'on' + - condition: template + value_template: "{{ 'no camp' in (\n (state_attr('calendar.m365_family_events', + 'data') or [])\n | selectattr('summary', 'defined')\n | map(attribute='summary')\n + \ | map('lower')\n | list\n) }}\n" action: - - variables: - messages: - "08:00:00": Time for breakfast and a little TV! - "09:00:00": Outside play time! If it’s bad weather, do your learning activities inside. - "10:00:00": Snack time! - "10:15:00": Time for quiet play or outside fun. - "11:00:00": Creative time! Draw, color, or write something cool! - "12:00:00": Lunch time! Wash up and head to the table. - "12:30:00": Happy Helper Time! Do your chores like a champ! - "13:00:00": TV break — relax and enjoy. - "13:30:00": Time to read a book or listen to a story. - "14:00:00": Let’s move! Try a Minecraft brain break! - "14:30:00": Time to relax with mindfulness or yoga. - - service: notify.alexa_media + - variables: + messages: + 08:00:00: Time for breakfast and a little TV! + 09:00:00: Outside play time! If it’s bad weather, do your learning activities + inside. + '10:00:00': Snack time! + '10:15:00': Time for quiet play or outside fun. + '11:00:00': Creative time! Draw, color, or write something cool! + '12:00:00': Lunch time! Wash up and head to the table. + '12:30:00': Happy Helper Time! Do your chores like a champ! + '13:00:00': TV break — relax and enjoy. + '13:30:00': Time to read a book or listen to a story. + '14:00:00': Let’s move! Try a Minecraft brain break! + '14:30:00': Time to relax with mindfulness or yoga. + - service: notify.alexa_media + data: + target: + - media_player.living_room + - media_player.jordyn_s_room + - media_player.chloe_s_room + - media_player.declan_s_room + - media_player.kitchen + message: '{{ messages[now().strftime(''%H:%M:%S'')] }}' data: - target: - - media_player.living_room - - media_player.jordyn_s_room - - media_player.chloe_s_room - - media_player.declan_s_room - - media_player.kitchen - message: "{{ messages[now().strftime('%H:%M:%S')] }}" - data: - type: announce - method: all + type: announce + method: all mode: single - id: '1744503044813' alias: Announce day camp preparation and pause TV - trigger: - - platform: time - at: "08:30:00" - condition: + triggers: + - at: 08:30:00 + trigger: time + conditions: - condition: state entity_id: calendar.m365_family_events state: 'on' - condition: template - value_template: > - {{ state_attr('calendar.m365_family_events', 'data') - | selectattr('summary', 'defined') - | map(attribute='summary') - | map('lower') - | select('search', 'camp') - | reject('search', 'no camp') - | list | count > 0 }} - action: - - service: media_player.play_media - data: - media_content_id: Pause kids TV - media_content_type: routine + value_template: "{{ state_attr('calendar.m365_family_events', 'data')\n | selectattr('summary', + 'defined')\n | map(attribute='summary')\n | map('lower')\n | select('search', + 'camp')\n | reject('search', 'no camp')\n | list | count > 0 }}\n" + actions: + - target: + entity_id: media_player.hisense_g204x_cd41 + action: media_player.media_pause + data: {} + - data: target: - entity_id: media_player.kitchen_echo - - service: notify.alexa_media - data: - target: - - media_player.living_room - - media_player.declan_s_room - - media_player.jordyn_s_room - - media_player.kitchen - - media_player.tv_alexa - message: > - Time to prepare for day camp. Please do the following: - Fill water bottles, Put on deodorant, Brush teeth, and Jordyn Brush your hair. + - media_player.living_room + - media_player.declan_s_room + - media_player.jordyn_s_room + - media_player.kitchen + message: 'Time to prepare for day camp. Please do the following: Fill water + bottles, put on deodorant, brush teeth, and Jordyn, brush your hair. + + ' + action: notify.alexa_media + mode: single - id: '1744503044814' alias: Announce time to leave for day camp and turn off TV - trigger: - - platform: time - at: "08:45:00" - condition: + triggers: + - at: 08:45:00 + trigger: time + conditions: - condition: state entity_id: calendar.m365_family_events state: 'on' - condition: template - value_template: > - {{ state_attr('calendar.m365_family_events', 'data') - | selectattr('summary', 'defined') - | map(attribute='summary') - | map('lower') - | select('search', 'camp') - | reject('search', 'no camp') - | list | count > 0 }} - action: - - service: media_player.play_media - data: - media_content_id: Turn Kids TV Off - media_content_type: routine + value_template: "{{ state_attr('calendar.m365_family_events', 'data')\n | selectattr('summary', + 'defined')\n | map(attribute='summary')\n | map('lower')\n | select('search', + 'camp')\n | reject('search', 'no camp')\n | list | count > 0 }}\n" + actions: + - target: + entity_id: media_player.basement_show + data: + media_content_id: Turn Kids TV Off + media_content_type: routine + action: media_player.play_media + - data: target: - entity_id: media_player.basement_show - - service: notify.alexa_media - data: - target: - - media_player.parents_room - message: > - It is time to leave for day camp. Please do the following: - Put on shoes, Get lunch, Get water bottle, Get bag if needed. + - media_player.living_room + message: 'It is time to leave for day camp. Please do the following: Put on + shoes, get lunch, get water bottle, and grab your bag if needed. + + ' + action: notify.alexa_media + - target: + entity_id: media_player.hisense_g204x_cd41 + action: media_player.turn_off + mode: single - id: '1744503044145' alias: Reset Alexa Announcement Volume - Camp Days description: Set Alexa announcement volume for structured daily routine trigger: - - platform: time - at: "09:15:00" + - platform: time + at: 09:15:00 condition: - - condition: state - entity_id: calendar.m365_family_events - state: 'on' - - condition: template - value_template: > - {{ state_attr('calendar.m365_family_events', 'data') | selectattr('summary', 'defined') | map(attribute='summary') | map('lower') | select('search', 'camp') | select('search', 'no', invert=True) | list | count > 0 }} + - condition: state + entity_id: calendar.m365_family_events + state: 'on' + - condition: template + value_template: '{{ state_attr(''calendar.m365_family_events'', ''data'') | selectattr(''summary'', + ''defined'') | map(attribute=''summary'') | map(''lower'') | select(''search'', + ''camp'') | select(''search'', ''no'', invert=True) | list | count > 0 }} + + ' action: - - service: media_player.play_media - data: - media_content_id: Reset Alexa Volume - media_content_type: routine - target: - entity_id: media_player.basement_show + - service: media_player.play_media + data: + media_content_id: Reset Alexa Volume + media_content_type: routine + target: + entity_id: media_player.basement_show mode: single - id: '1744503044146' alias: Reset Alexa Announcement Volume - No Camp Days description: Set Alexa announcement volume for structured daily routine trigger: - - platform: time - at: "19:17:00" + - platform: time + at: '19:17:00' condition: - - condition: state - entity_id: calendar.m365_family_events - state: 'on' - - condition: template - value_template: > - {{ 'no camp' in ( - state_attr('calendar.m365_family_events', 'data') - | selectattr('summary', 'defined') - | map(attribute='summary') - | map('lower') - | list - ) }} + - condition: state + entity_id: calendar.m365_family_events + state: 'on' + - condition: template + value_template: "{{ 'no camp' in (\n state_attr('calendar.m365_family_events', + 'data')\n | selectattr('summary', 'defined')\n | map(attribute='summary')\n + \ | map('lower')\n | list\n) }}\n" action: - - service: media_player.play_media - data: - media_content_id: Reset Alexa Volume - media_content_type: routine - target: - entity_id: media_player.basement_show + - service: media_player.play_media + data: + media_content_id: Reset Alexa Volume + media_content_type: routine + target: + entity_id: media_player.basement_show mode: single