diff --git a/automations/01_home_and_lighting.yaml b/automations/01_home_and_lighting.yaml index 674b5e3..b63cd03 100644 --- a/automations/01_home_and_lighting.yaml +++ b/automations/01_home_and_lighting.yaml @@ -1,987 +1 @@ # Home and lighting automations. - -- id: '1760000000001' - alias: Fireplace mantle outlet morning schedule - description: Turn the fireplace mantle outlet on each morning. - triggers: - - trigger: time - at: '05:30:00' - conditions: [] - actions: - - action: switch.turn_on - target: - entity_id: switch.fireplace - mode: single - -# Evening living-room motion automations disabled. -# -# - id: '1738951431044' -# alias: Turn off living room lights -# description: '' -# triggers: -# - entity_id: -# - binary_sensor.hsjq_motion -# to: 'off' -# for: -# hours: 0 -# minutes: 15 -# seconds: 0 -# trigger: state -# conditions: -# - condition: time -# after: 09:00:00 -# before: 06:00:00 -# weekday: -# - sun -# - mon -# - tue -# - wed -# - thu -# - fri -# - sat -# actions: -# - target: -# entity_id: media_player.hisense_g204x_cd41 -# action: media_player.turn_off -# data: {} -# enabled: false -# - action: light.turn_off -# data: {} -# target: -# entity_id: -# - light.living_room_light_2 -# mode: single -# -# - id: '1739826648241' -# alias: Turn on Living room lights motion sense -# description: '' -# triggers: -# - trigger: state -# entity_id: -# - binary_sensor.hsjq_motion -# to: 'on' -# conditions: -# - condition: and -# conditions: -# - condition: sun -# after: sunset -# - condition: time -# before: '22:30:00' -# actions: -# - action: light.turn_on -# metadata: {} -# data: -# color_temp_kelvin: 3701 -# brightness_pct: 78 -# target: -# device_id: -# - d76728b35b6f17a89be03ef00645812e -# entity_id: light.living_room_light_2 -# mode: single - -- id: '1788748800000' - alias: Living room nightly shutoff - description: Turn off all living-room lights and the fireplace at bedtime. - triggers: - - trigger: time - at: '22:00:00' - id: weeknight - - trigger: time - at: '00:00:00' - id: weekend_night - conditions: - - condition: or - conditions: - - condition: and - conditions: - - condition: trigger - id: weeknight - - condition: time - weekday: - - sun - - mon - - tue - - wed - - thu - - condition: and - conditions: - - condition: trigger - id: weekend_night - - condition: time - weekday: - - sat - - sun - actions: - - action: light.turn_off - target: - entity_id: - - light.living_room_light_2 - - light.living_room_lamp_1 - - light.small_living_room_lamp - - action: switch.turn_off - target: - entity_id: switch.fireplace - mode: single - -- id: '1739835025769' - alias: Turn on bedroom lights with motion - description: '' - triggers: - - trigger: state - entity_id: - - binary_sensor.bedroom_motion - to: 'on' - conditions: - - condition: time - after: '16:00:00' - before: '20:00:00' - weekday: - - sun - - mon - - tue - - wed - - thu - - fri - - sat - - condition: sun - after: sunset - actions: - - type: turn_on - device_id: a8b108e7836eeb9c66cd0169afc4a486 - entity_id: d48390b30da2add2f866a8cec5dc2726 - domain: switch - - type: turn_on - device_id: d371342d65df3ddbd28fb841b6ce0a13 - entity_id: 7df615008eff2c537a1d6ac4be76def4 - domain: switch - - delay: 00:10:00 - mode: single - -- id: '1739840523909' - alias: Turn off bedside lights in the evening - description: '' - triggers: - - trigger: state - entity_id: - - binary_sensor.bedroom_occupancy - to: 'off' - for: - hours: 0 - minutes: 1 - seconds: 0 - conditions: - - condition: time - after: '16:00:00' - before: '20:00:00' - weekday: - - sun - - mon - - tue - - wed - - thu - - fri - - sat - actions: - - type: turn_off - device_id: a8b108e7836eeb9c66cd0169afc4a486 - entity_id: d48390b30da2add2f866a8cec5dc2726 - domain: switch - - type: turn_off - device_id: d371342d65df3ddbd28fb841b6ce0a13 - entity_id: 7df615008eff2c537a1d6ac4be76def4 - domain: switch - mode: single - -- id: '1739841110645' - alias: Turn on family room in the morning - description: '' - triggers: - - trigger: state - entity_id: - - binary_sensor.meat_heater_motion - to: 'on' - conditions: - - condition: time - after: 05:00:00 - before: 07:45:00 - weekday: - - sun - - mon - - tue - - wed - - thu - - fri - - sat - actions: - - type: turn_on - device_id: 389d36aa5a0ecfd3eb2e1ec8795464d0 - entity_id: 0ae75b98556682467fedf0ff441346ef - domain: light - brightness_pct: 20 - enabled: true - - type: turn_on - device_id: 6f341a97517eecd7e4befd4633bb0c3a - entity_id: 4b21efa79430d63e813137d08a8df60e - domain: light - - type: turn_on - device_id: 77092d966014d6eb6222928cce911caf - entity_id: af55f6e7e0ffa642407923fc6e8cdaf3 - domain: light - enabled: false - - type: turn_on - device_id: 3096deb74c1dddf893e78fcdfa5b23aa - entity_id: aa15e9f5b3c00639b64501acd18f2081 - domain: switch - - type: turn_on - device_id: 58dfbd5f60265682b98691217b9bd038 - entity_id: abf15d05be0dadf1bba145f0835d3b3a - domain: switch - - type: turn_on - device_id: 2fde35e8a4dfe850d53d35a650d05b6e - entity_id: c4ec82fc55ef125a4b39f842e06b7261 - domain: switch - - type: turn_on - device_id: 4f7810cf96260d17363b63542447ffe7 - entity_id: 70347118804cc5d1b5770362ab369251 - domain: switch - - type: turn_on - device_id: 84566a79d41ebedd4512d2418195a898 - entity_id: fb7b78a1f6d3146585e2f93be33bf4c1 - domain: switch - - type: turn_on - device_id: 88c1bfde7eba191a46899d4c59754512 - entity_id: 594a0d24aa2fd2dc2156d9918a2204bf - domain: switch - - type: turn_on - device_id: 00ce230936f351558f177d5ed229759b - entity_id: 9ef15fb77ca7e81bcb6c7551329f50aa - domain: switch - mode: single - -- id: '1739970708082' - alias: Lights On Before Sunrise - description: '' - triggers: - - trigger: time - at: 05:45:00 - conditions: [] - actions: - - type: turn_on - device_id: c58fc0103836dffe365aeb33056cee71 - entity_id: 37852e5f667fe36826f2ac1ae9f2376a - domain: switch - - type: turn_on - device_id: 389d36aa5a0ecfd3eb2e1ec8795464d0 - entity_id: 0ae75b98556682467fedf0ff441346ef - domain: light - - type: turn_on - device_id: 31d67bb445f5c8920a1dc076d0d71e76 - entity_id: 6c1fd91e0ff15419f7bdb6b9e233cffc - domain: switch - - type: turn_on - device_id: 77092d966014d6eb6222928cce911caf - entity_id: af55f6e7e0ffa642407923fc6e8cdaf3 - domain: light - enabled: false - - type: turn_on - device_id: 00ce230936f351558f177d5ed229759b - entity_id: 9ef15fb77ca7e81bcb6c7551329f50aa - domain: switch - enabled: false - - type: turn_on - device_id: 6f341a97517eecd7e4befd4633bb0c3a - entity_id: 4b21efa79430d63e813137d08a8df60e - domain: light - enabled: false - mode: single - -- id: '1739970910638' - alias: 10PM Turn Jordyn's Lamp Off - description: '' - triggers: - - trigger: time - at: '22:00:00' - conditions: [] - actions: - - type: turn_off - device_id: ef731a5e6e666bf4fc20cc321f596029 - entity_id: 9629035816fddf7de8926e4e4c29aa34 - domain: switch - mode: single - -- id: '1739971192633' - alias: Turn On Lights in Evening - description: '' - triggers: - - trigger: sun - event: sunset - offset: -00:30:00 - conditions: [] - actions: - - type: turn_on - device_id: e04306aa947ba9901108c363d8109ca0 - entity_id: 12662d2294935b2a21500e3f6d69ba15 - domain: switch - enabled: true - - type: turn_on - device_id: e2343a74462cc1434c4acfa2e32d1364 - entity_id: ea84e174f0fa3316b9923c4254454a37 - domain: switch - enabled: true - - type: turn_on - device_id: c0de273e40c6f4f1cafe4db27e5a6782 - entity_id: e6f4af2d9bc05634f994af34bad9a477 - domain: switch - enabled: true - - type: turn_on - device_id: 389d36aa5a0ecfd3eb2e1ec8795464d0 - entity_id: 0ae75b98556682467fedf0ff441346ef - domain: light - brightness_pct: 50 - enabled: true - - type: turn_on - device_id: a1fdc7c838bdded4d8e90bb7941476a3 - entity_id: 84d24335edc946153ed4f81ac7906f3c - domain: switch - enabled: true - - type: turn_on - device_id: a8b108e7836eeb9c66cd0169afc4a486 - entity_id: d48390b30da2add2f866a8cec5dc2726 - domain: switch - - type: turn_on - device_id: d371342d65df3ddbd28fb841b6ce0a13 - entity_id: 7df615008eff2c537a1d6ac4be76def4 - domain: switch - - type: turn_on - device_id: 872cdc7e609c8df8544349fceae0828e - entity_id: df6f91a7fc4619ff7d664e12518fc9c2 - domain: switch - enabled: true - - type: turn_on - device_id: 6f341a97517eecd7e4befd4633bb0c3a - entity_id: 4b21efa79430d63e813137d08a8df60e - domain: light - brightness_pct: 15 - - type: turn_on - device_id: 40d38ce4c97de6008962e2b3d84896c9 - entity_id: d794e094113a14e6de0db3e5d3f65e88 - domain: light - brightness_pct: 50 - - type: turn_on - device_id: 84566a79d41ebedd4512d2418195a898 - entity_id: fb7b78a1f6d3146585e2f93be33bf4c1 - domain: switch - - type: turn_on - device_id: 31622aa8682d29be0d631680776131c3 - entity_id: dbc4e84732121a8cc63eb1b6e95fd78b - domain: switch - enabled: false - - type: turn_on - device_id: 3096deb74c1dddf893e78fcdfa5b23aa - entity_id: aa15e9f5b3c00639b64501acd18f2081 - domain: switch - enabled: false - - type: turn_on - device_id: eae417dc05ec7c9f1da72f76f32bff18 - entity_id: 8ebd9a84e00e9a8a4c05860cb01767ef - domain: switch - enabled: false - - type: turn_on - device_id: 2fde35e8a4dfe850d53d35a650d05b6e - entity_id: c4ec82fc55ef125a4b39f842e06b7261 - domain: switch - enabled: false - - type: turn_on - device_id: 58dfbd5f60265682b98691217b9bd038 - entity_id: abf15d05be0dadf1bba145f0835d3b3a - domain: switch - enabled: false - - type: turn_on - device_id: 4f7810cf96260d17363b63542447ffe7 - entity_id: 70347118804cc5d1b5770362ab369251 - domain: switch - enabled: false - - type: turn_on - device_id: 88c1bfde7eba191a46899d4c59754512 - entity_id: 594a0d24aa2fd2dc2156d9918a2204bf - domain: switch - enabled: false - - type: turn_on - device_id: 77092d966014d6eb6222928cce911caf - entity_id: af55f6e7e0ffa642407923fc6e8cdaf3 - domain: light - enabled: false - - type: turn_on - device_id: e117bada67c4b115d445163c93d2f78c - entity_id: ee44672a0acd4c35658f69b1ec71bdf7 - domain: light - enabled: false - mode: single - -- id: '1739971331649' - alias: Master Bedroom On At 8PM - description: '' - triggers: - - trigger: time - at: '20:00:00' - conditions: [] - actions: - - type: turn_on - device_id: a8b108e7836eeb9c66cd0169afc4a486 - entity_id: d48390b30da2add2f866a8cec5dc2726 - domain: switch - - type: turn_on - device_id: d371342d65df3ddbd28fb841b6ce0a13 - entity_id: 7df615008eff2c537a1d6ac4be76def4 - domain: switch - - type: turn_on - device_id: 8b5cc6f6d2e727522ad3069656e2020f - entity_id: ff7e86ebc87458f60b69d1599ff06d13 - domain: fan - mode: single - -- id: '1739980877023' - alias: Downstairs Lights off at 9AM - description: '' - triggers: - - trigger: time - at: 09:00:00 - conditions: [] - actions: - - type: turn_off - device_id: 8b5cc6f6d2e727522ad3069656e2020f - entity_id: ff7e86ebc87458f60b69d1599ff06d13 - domain: fan - - action: light.turn_off - metadata: {} - data: {} - target: - device_id: - - 389d36aa5a0ecfd3eb2e1ec8795464d0 - - type: turn_off - device_id: 6f341a97517eecd7e4befd4633bb0c3a - entity_id: 4b21efa79430d63e813137d08a8df60e - domain: light - - type: turn_off - device_id: 77092d966014d6eb6222928cce911caf - entity_id: af55f6e7e0ffa642407923fc6e8cdaf3 - domain: light - - type: turn_off - device_id: 3096deb74c1dddf893e78fcdfa5b23aa - entity_id: aa15e9f5b3c00639b64501acd18f2081 - domain: switch - enabled: false - - type: turn_off - device_id: 58dfbd5f60265682b98691217b9bd038 - entity_id: abf15d05be0dadf1bba145f0835d3b3a - domain: switch - enabled: false - - type: turn_off - device_id: 2fde35e8a4dfe850d53d35a650d05b6e - entity_id: c4ec82fc55ef125a4b39f842e06b7261 - domain: switch - enabled: false - - type: turn_off - device_id: 4f7810cf96260d17363b63542447ffe7 - entity_id: 70347118804cc5d1b5770362ab369251 - domain: switch - enabled: false - - type: turn_off - device_id: d76728b35b6f17a89be03ef00645812e - entity_id: 7c25efba75f15af0be530ff9c9b9c729 - domain: light - enabled: false - - type: turn_off - device_id: 84566a79d41ebedd4512d2418195a898 - entity_id: fb7b78a1f6d3146585e2f93be33bf4c1 - domain: switch - enabled: false - - type: turn_off - device_id: d76728b35b6f17a89be03ef00645812e - entity_id: 7c25efba75f15af0be530ff9c9b9c729 - domain: light - - type: turn_off - device_id: 9d37094a9a9d22b1fb8bf640ca072083 - entity_id: f0a27ed262997bfc54caf8a75ac15619 - domain: light - - type: turn_off - device_id: 88c1bfde7eba191a46899d4c59754512 - entity_id: 594a0d24aa2fd2dc2156d9918a2204bf - domain: switch - enabled: false - - type: turn_off - device_id: e117bada67c4b115d445163c93d2f78c - entity_id: ee44672a0acd4c35658f69b1ec71bdf7 - domain: light - enabled: false - mode: single - -- id: '1739997032502' - alias: Echo Plug Power Toggle Automation - description: '' - triggers: - - trigger: time - at: '17:00:00' - conditions: [] - actions: - - type: turn_off - device_id: 31d67bb445f5c8920a1dc076d0d71e76 - entity_id: 6c1fd91e0ff15419f7bdb6b9e233cffc - domain: switch - mode: single - -- id: '1740099961116' - alias: Office Lights on with Motion - description: '' - triggers: - - trigger: state - entity_id: - - binary_sensor.office_motion - to: 'on' - conditions: [] - actions: - - action: light.turn_on - metadata: {} - data: - brightness_pct: 100 - color_temp_kelvin: 6500 - target: - device_id: - - 42b9a4c3e4edfd663f2b8a0a95c3997c - - 889b4b9e38814db0249b94d2dea4ae43 - - type: turn_on - device_id: 397d7f06bfbbeaf3014d989a1e32ce07 - entity_id: 92505d68c2d00ef59e8ba61c3e3db32b - domain: switch - mode: single - -- id: '1740100159283' - alias: Turn off lights when no one is in office - description: '' - triggers: - - trigger: state - entity_id: - - binary_sensor.office_occupancy - to: 'off' - for: - hours: 1 - minutes: 0 - seconds: 0 - conditions: [] - actions: - - action: light.turn_off - metadata: {} - data: {} - target: - device_id: - - 42b9a4c3e4edfd663f2b8a0a95c3997c - - 889b4b9e38814db0249b94d2dea4ae43 - - type: turn_off - device_id: 397d7f06bfbbeaf3014d989a1e32ce07 - entity_id: 92505d68c2d00ef59e8ba61c3e3db32b - domain: switch - mode: single - -- id: '1740929956187' - alias: Turn off Family room when no one is in it. - description: '' - triggers: - - trigger: state - entity_id: - - binary_sensor.meat_heater_motion - to: 'off' - for: - hours: 0 - minutes: 30 - seconds: 0 - conditions: - - condition: or - conditions: - - condition: time - after: '22:00:00' - before: 02:00:00 - weekday: - - sat - - fri - - thu - - wed - - tue - - mon - - sun - - condition: time - after: 09:00:00 - before: '16:00:00' - weekday: - - sat - - fri - - thu - - wed - - tue - - mon - - sun - actions: - - type: turn_off - device_id: 389d36aa5a0ecfd3eb2e1ec8795464d0 - entity_id: 0ae75b98556682467fedf0ff441346ef - domain: light - - type: turn_off - device_id: 389d36aa5a0ecfd3eb2e1ec8795464d0 - entity_id: 0ae75b98556682467fedf0ff441346ef - domain: light - mode: single - -- id: '1742691391008' - alias: Turn on office echo - description: '' - triggers: - - trigger: time - at: '18:00:00' - conditions: [] - actions: - - type: turn_on - device_id: 31d67bb445f5c8920a1dc076d0d71e76 - entity_id: 6c1fd91e0ff15419f7bdb6b9e233cffc - domain: switch - mode: single - -- id: '1742691696852' - alias: Family Room Off at Midnight - description: '' - triggers: - - trigger: time - at: 00:00:00 - conditions: [] - actions: - - type: turn_off - device_id: 389d36aa5a0ecfd3eb2e1ec8795464d0 - entity_id: 0ae75b98556682467fedf0ff441346ef - domain: light - - type: turn_off - device_id: 77092d966014d6eb6222928cce911caf - entity_id: af55f6e7e0ffa642407923fc6e8cdaf3 - domain: light - - type: turn_off - device_id: 6f341a97517eecd7e4befd4633bb0c3a - entity_id: 4b21efa79430d63e813137d08a8df60e - domain: light - mode: single - -- id: '1751505592389' - alias: Turn off bug zapper at 1030PM - description: '' - triggers: - - trigger: time - at: '22:30:00' - conditions: [] - actions: - - type: turn_off - device_id: 872cdc7e609c8df8544349fceae0828e - entity_id: df6f91a7fc4619ff7d664e12518fc9c2 - domain: switch - mode: single - -- id: '1756172550854' - alias: Turn off Fan in AM - description: '' - triggers: - - trigger: time - at: 08:00:00 - conditions: [] - actions: - - type: turn_off - device_id: 31622aa8682d29be0d631680776131c3 - entity_id: dbc4e84732121a8cc63eb1b6e95fd78b - domain: switch - mode: single - -- id: '1757038271421' - alias: Turn off ceiling fan when it’s below 55 - description: '' - triggers: - - trigger: numeric_state - entity_id: - - sensor.openweathermap_temperature - below: 55 - conditions: - - condition: time - after: '23:00:00' - before: 06:00:00 - actions: - - type: turn_off - device_id: 31622aa8682d29be0d631680776131c3 - entity_id: dbc4e84732121a8cc63eb1b6e95fd78b - domain: switch - mode: single - -- id: '1757038394971' - alias: Ceiling fan on above 71 - description: '' - triggers: - - trigger: numeric_state - entity_id: - - sensor.bedroom_temperature - above: 70 - conditions: [] - actions: - - type: turn_on - device_id: 31622aa8682d29be0d631680776131c3 - entity_id: dbc4e84732121a8cc63eb1b6e95fd78b - domain: switch - mode: single - -- id: '1759631437832' - alias: 'Turn off decorations ' - description: '' - triggers: - - trigger: time - at: 00:00:00 - conditions: [] - actions: - - type: turn_off - device_id: a1fdc7c838bdded4d8e90bb7941476a3 - entity_id: 84d24335edc946153ed4f81ac7906f3c - domain: switch - - type: turn_off - device_id: 872cdc7e609c8df8544349fceae0828e - entity_id: df6f91a7fc4619ff7d664e12518fc9c2 - domain: switch - - type: turn_off - device_id: eae417dc05ec7c9f1da72f76f32bff18 - entity_id: 8ebd9a84e00e9a8a4c05860cb01767ef - domain: switch - enabled: true - - type: turn_off - device_id: 3096deb74c1dddf893e78fcdfa5b23aa - entity_id: aa15e9f5b3c00639b64501acd18f2081 - domain: switch - - type: turn_off - device_id: 58dfbd5f60265682b98691217b9bd038 - entity_id: abf15d05be0dadf1bba145f0835d3b3a - domain: switch - - type: turn_off - device_id: 4f7810cf96260d17363b63542447ffe7 - entity_id: 70347118804cc5d1b5770362ab369251 - domain: switch - - type: turn_off - device_id: 2fde35e8a4dfe850d53d35a650d05b6e - entity_id: c4ec82fc55ef125a4b39f842e06b7261 - domain: switch - - type: turn_off - device_id: e117bada67c4b115d445163c93d2f78c - entity_id: ee44672a0acd4c35658f69b1ec71bdf7 - domain: light - - type: turn_off - device_id: 88c1bfde7eba191a46899d4c59754512 - entity_id: 594a0d24aa2fd2dc2156d9918a2204bf - domain: switch - - type: turn_off - device_id: 84566a79d41ebedd4512d2418195a898 - entity_id: fb7b78a1f6d3146585e2f93be33bf4c1 - domain: switch - - type: turn_off - device_id: c0de273e40c6f4f1cafe4db27e5a6782 - entity_id: e6f4af2d9bc05634f994af34bad9a477 - domain: switch - mode: single - -- id: '1762279134131' - alias: Turn on decorations in the AM - description: '' - triggers: - - trigger: time - at: 06:00:00 - conditions: [] - actions: - - type: turn_on - device_id: eae417dc05ec7c9f1da72f76f32bff18 - entity_id: 8ebd9a84e00e9a8a4c05860cb01767ef - domain: switch - enabled: false - - type: turn_on - device_id: a1fdc7c838bdded4d8e90bb7941476a3 - entity_id: 84d24335edc946153ed4f81ac7906f3c - domain: switch - enabled: false - - type: turn_on - device_id: 3096deb74c1dddf893e78fcdfa5b23aa - entity_id: aa15e9f5b3c00639b64501acd18f2081 - domain: switch - - type: turn_on - device_id: 58dfbd5f60265682b98691217b9bd038 - entity_id: abf15d05be0dadf1bba145f0835d3b3a - domain: switch - - type: turn_on - device_id: 2fde35e8a4dfe850d53d35a650d05b6e - entity_id: c4ec82fc55ef125a4b39f842e06b7261 - domain: switch - - type: turn_on - device_id: 4f7810cf96260d17363b63542447ffe7 - entity_id: 70347118804cc5d1b5770362ab369251 - domain: switch - - type: turn_on - device_id: 84566a79d41ebedd4512d2418195a898 - entity_id: fb7b78a1f6d3146585e2f93be33bf4c1 - domain: switch - - type: turn_on - device_id: e117bada67c4b115d445163c93d2f78c - entity_id: ee44672a0acd4c35658f69b1ec71bdf7 - domain: light - - type: turn_on - device_id: 00ce230936f351558f177d5ed229759b - entity_id: 9ef15fb77ca7e81bcb6c7551329f50aa - domain: switch - - type: turn_on - device_id: 88c1bfde7eba191a46899d4c59754512 - entity_id: 594a0d24aa2fd2dc2156d9918a2204bf - domain: switch - mode: single - -- id: '1763411863796' - alias: Holiday Christmas Pandora at 5PM - description: Trigger Alexa routine to play Christmas Hits Holiday Playlist on Pandora - triggers: - - at: '17:00:00' - trigger: time - conditions: - - condition: template - value_template: '{{ now().month == 11 or now().month == 12 }} - - ' - actions: - - target: - entity_id: media_player.family_room_show - data: - media: - media_content_id: Play Christmas Music - media_content_type: routine - metadata: {} - action: media_player.play_media - mode: single - -- id: '1765116337200' - alias: Turn off living room tv when empty - description: '' - triggers: - - entity_id: - - binary_sensor.hsjq_motion - to: - - 'off' - for: - hours: 0 - minutes: 30 - seconds: 0 - trigger: state - conditions: - - condition: time - after: '18:00:00' - before: 06:00:00 - weekday: - - sun - - mon - - tue - - wed - - thu - - fri - - sat - actions: - - target: - entity_id: media_player.hisense_g204x_cd41 - action: media_player.turn_off - data: {} - enabled: true - mode: single - -- id: '1769311377293' - alias: Front Porch Off at 10P - description: '' - triggers: - - trigger: time - at: '22:00:00' - conditions: [] - actions: - - type: turn_off - device_id: e04306aa947ba9901108c363d8109ca0 - entity_id: 12662d2294935b2a21500e3f6d69ba15 - domain: switch - - type: turn_off - device_id: c0de273e40c6f4f1cafe4db27e5a6782 - entity_id: e6f4af2d9bc05634f994af34bad9a477 - domain: switch - - type: turn_off - device_id: e2343a74462cc1434c4acfa2e32d1364 - entity_id: ea84e174f0fa3316b9923c4254454a37 - domain: switch - - type: turn_off - device_id: 872cdc7e609c8df8544349fceae0828e - entity_id: df6f91a7fc4619ff7d664e12518fc9c2 - domain: switch - - type: turn_off - device_id: a1fdc7c838bdded4d8e90bb7941476a3 - entity_id: 84d24335edc946153ed4f81ac7906f3c - domain: switch - mode: single - -- id: '1770433866161' - alias: Turn off Kitchen Sink at Sunrise - description: '' - triggers: - - trigger: sun - event: sunrise - offset: 01:00:00 - conditions: [] - actions: - - type: turn_off - device_id: 40d38ce4c97de6008962e2b3d84896c9 - entity_id: d794e094113a14e6de0db3e5d3f65e88 - domain: light - mode: single - -- id: freddy_fazbear_mask_schedule - alias: Freddy Fazbear Mask - Sunrise on, bedtime off - description: Turn the Freddy Fazbear Mask on at sunrise; off at 10:00 PM Sun-Thu and 11:59 PM Fri-Sat. - mode: single - triggers: - - trigger: sun - event: sunrise - id: mask_on - - trigger: time - at: '22:00:00' - id: mask_off_school_night - - trigger: time - at: '23:59:00' - id: mask_off_weekend - conditions: [] - actions: - - choose: - - conditions: - - condition: trigger - id: mask_on - sequence: - - action: homeassistant.turn_on - target: - entity_id: switch.freddy_fazbear_mask - - conditions: - - condition: trigger - id: mask_off_school_night - - condition: time - weekday: - - sun - - mon - - tue - - wed - - thu - sequence: - - action: homeassistant.turn_off - target: - entity_id: switch.freddy_fazbear_mask - - conditions: - - condition: trigger - id: mask_off_weekend - - condition: time - weekday: - - fri - - sat - sequence: - - action: homeassistant.turn_off - target: - entity_id: switch.freddy_fazbear_mask diff --git a/automations/01_home_and_lighting/01a_office_automations.yaml b/automations/01_home_and_lighting/01a_office_automations.yaml new file mode 100644 index 0000000..d034aa8 --- /dev/null +++ b/automations/01_home_and_lighting/01a_office_automations.yaml @@ -0,0 +1,83 @@ +############################################## +############ OFFICE AUTOMATIONS ############## +############################################## + +- id: '1740099961116' + alias: Office Lights turn on with motion + description: '' + triggers: + - trigger: state + entity_id: + - binary_sensor.office_motion + to: 'on' + conditions: [] + actions: + - action: light.turn_on + metadata: {} + data: + brightness_pct: 100 + color_temp_kelvin: 6500 + target: + device_id: + - 42b9a4c3e4edfd663f2b8a0a95c3997c + - 889b4b9e38814db0249b94d2dea4ae43 + - type: turn_on + device_id: 397d7f06bfbbeaf3014d989a1e32ce07 + entity_id: 92505d68c2d00ef59e8ba61c3e3db32b + domain: switch + mode: single + +- id: '1742691391008' + alias: Turn on office echo + description: '' + triggers: + - trigger: time + at: '18:00:00' + conditions: [] + actions: + - type: turn_on + device_id: 31d67bb445f5c8920a1dc076d0d71e76 + entity_id: 6c1fd91e0ff15419f7bdb6b9e233cffc + domain: switch + mode: single + +- id: '1740100159283' + alias: Turn off lights when no one is in office + description: '' + triggers: + - trigger: state + entity_id: + - binary_sensor.office_occupancy + to: 'off' + for: + hours: 1 + minutes: 0 + seconds: 0 + conditions: [] + actions: + - action: light.turn_off + metadata: {} + data: {} + target: + device_id: + - 42b9a4c3e4edfd663f2b8a0a95c3997c + - 889b4b9e38814db0249b94d2dea4ae43 + - type: turn_off + device_id: 397d7f06bfbbeaf3014d989a1e32ce07 + entity_id: 92505d68c2d00ef59e8ba61c3e3db32b + domain: switch + mode: single + +- id: '1739997032502' + alias: Office echo Plug Power Toggle Automation + description: '' + triggers: + - trigger: time + at: '20:00:00' + conditions: [] + actions: + - type: turn_off + device_id: 31d67bb445f5c8920a1dc076d0d71e76 + entity_id: 6c1fd91e0ff15419f7bdb6b9e233cffc + domain: switch + mode: single \ No newline at end of file diff --git a/automations/01_home_and_lighting/01b_first_floor_automations.yaml b/automations/01_home_and_lighting/01b_first_floor_automations.yaml new file mode 100644 index 0000000..7f414fe --- /dev/null +++ b/automations/01_home_and_lighting/01b_first_floor_automations.yaml @@ -0,0 +1,480 @@ +############################################### +########### FIRST FLOOR AUTOMATIONS ########### +############################################### + +################### +#### ALL AREAS #### +################### + +- id: '1739970708082' + alias: Lights On Before Sunrise + description: '' + triggers: + - trigger: time + at: 05:45:00 + conditions: [] + actions: + - type: turn_on + device_id: c58fc0103836dffe365aeb33056cee71 + entity_id: 37852e5f667fe36826f2ac1ae9f2376a + domain: switch + - type: turn_on + device_id: 389d36aa5a0ecfd3eb2e1ec8795464d0 + entity_id: 0ae75b98556682467fedf0ff441346ef + domain: light + - type: turn_on + device_id: 31d67bb445f5c8920a1dc076d0d71e76 + entity_id: 6c1fd91e0ff15419f7bdb6b9e233cffc + domain: switch + - type: turn_on + device_id: 77092d966014d6eb6222928cce911caf + entity_id: af55f6e7e0ffa642407923fc6e8cdaf3 + domain: light + enabled: false + - type: turn_on + device_id: 00ce230936f351558f177d5ed229759b + entity_id: 9ef15fb77ca7e81bcb6c7551329f50aa + domain: switch + enabled: false + - type: turn_on + device_id: 6f341a97517eecd7e4befd4633bb0c3a + entity_id: 4b21efa79430d63e813137d08a8df60e + domain: light + enabled: false + mode: single + +- id: '1739980877023' + alias: First floor lights off at 9AM + description: '' + triggers: + - trigger: time + at: 09:00:00 + conditions: [] + actions: + - type: turn_off + device_id: 8b5cc6f6d2e727522ad3069656e2020f + entity_id: ff7e86ebc87458f60b69d1599ff06d13 + domain: fan + - action: light.turn_off + metadata: {} + data: {} + target: + device_id: + - 389d36aa5a0ecfd3eb2e1ec8795464d0 + - type: turn_off + device_id: 6f341a97517eecd7e4befd4633bb0c3a + entity_id: 4b21efa79430d63e813137d08a8df60e + domain: light + - type: turn_off + device_id: 77092d966014d6eb6222928cce911caf + entity_id: af55f6e7e0ffa642407923fc6e8cdaf3 + domain: light + - type: turn_off + device_id: 3096deb74c1dddf893e78fcdfa5b23aa + entity_id: aa15e9f5b3c00639b64501acd18f2081 + domain: switch + enabled: false + - type: turn_off + device_id: 58dfbd5f60265682b98691217b9bd038 + entity_id: abf15d05be0dadf1bba145f0835d3b3a + domain: switch + enabled: false + - type: turn_off + device_id: 2fde35e8a4dfe850d53d35a650d05b6e + entity_id: c4ec82fc55ef125a4b39f842e06b7261 + domain: switch + enabled: false + - type: turn_off + device_id: 4f7810cf96260d17363b63542447ffe7 + entity_id: 70347118804cc5d1b5770362ab369251 + domain: switch + enabled: false + - type: turn_off + device_id: d76728b35b6f17a89be03ef00645812e + entity_id: 7c25efba75f15af0be530ff9c9b9c729 + domain: light + enabled: false + - type: turn_off + device_id: 84566a79d41ebedd4512d2418195a898 + entity_id: fb7b78a1f6d3146585e2f93be33bf4c1 + domain: switch + enabled: false + - type: turn_off + device_id: d76728b35b6f17a89be03ef00645812e + entity_id: 7c25efba75f15af0be530ff9c9b9c729 + domain: light + - type: turn_off + device_id: 9d37094a9a9d22b1fb8bf640ca072083 + entity_id: f0a27ed262997bfc54caf8a75ac15619 + domain: light + - type: turn_off + device_id: 88c1bfde7eba191a46899d4c59754512 + entity_id: 594a0d24aa2fd2dc2156d9918a2204bf + domain: switch + enabled: false + - type: turn_off + device_id: e117bada67c4b115d445163c93d2f78c + entity_id: ee44672a0acd4c35658f69b1ec71bdf7 + domain: light + enabled: false + mode: single + +- id: '1739971192633' + alias: Turn On Lights in Evening + description: '' + triggers: + - trigger: sun + event: sunset + offset: -00:30:00 + conditions: [] + actions: + - type: turn_on + device_id: e04306aa947ba9901108c363d8109ca0 + entity_id: 12662d2294935b2a21500e3f6d69ba15 + domain: switch + enabled: true + - type: turn_on + device_id: e2343a74462cc1434c4acfa2e32d1364 + entity_id: ea84e174f0fa3316b9923c4254454a37 + domain: switch + enabled: true + - type: turn_on + device_id: c0de273e40c6f4f1cafe4db27e5a6782 + entity_id: e6f4af2d9bc05634f994af34bad9a477 + domain: switch + enabled: true + - type: turn_on + device_id: 389d36aa5a0ecfd3eb2e1ec8795464d0 + entity_id: 0ae75b98556682467fedf0ff441346ef + domain: light + brightness_pct: 50 + enabled: true + - type: turn_on + device_id: a1fdc7c838bdded4d8e90bb7941476a3 + entity_id: 84d24335edc946153ed4f81ac7906f3c + domain: switch + enabled: true + - type: turn_on + device_id: a8b108e7836eeb9c66cd0169afc4a486 + entity_id: d48390b30da2add2f866a8cec5dc2726 + domain: switch + - type: turn_on + device_id: d371342d65df3ddbd28fb841b6ce0a13 + entity_id: 7df615008eff2c537a1d6ac4be76def4 + domain: switch + - type: turn_on + device_id: 872cdc7e609c8df8544349fceae0828e + entity_id: df6f91a7fc4619ff7d664e12518fc9c2 + domain: switch + enabled: true + - type: turn_on + device_id: 6f341a97517eecd7e4befd4633bb0c3a + entity_id: 4b21efa79430d63e813137d08a8df60e + domain: light + brightness_pct: 15 + - type: turn_on + device_id: 40d38ce4c97de6008962e2b3d84896c9 + entity_id: d794e094113a14e6de0db3e5d3f65e88 + domain: light + brightness_pct: 50 + - type: turn_on + device_id: 84566a79d41ebedd4512d2418195a898 + entity_id: fb7b78a1f6d3146585e2f93be33bf4c1 + domain: switch + - type: turn_on + device_id: 31622aa8682d29be0d631680776131c3 + entity_id: dbc4e84732121a8cc63eb1b6e95fd78b + domain: switch + enabled: false + - type: turn_on + device_id: 3096deb74c1dddf893e78fcdfa5b23aa + entity_id: aa15e9f5b3c00639b64501acd18f2081 + domain: switch + enabled: false + - type: turn_on + device_id: eae417dc05ec7c9f1da72f76f32bff18 + entity_id: 8ebd9a84e00e9a8a4c05860cb01767ef + domain: switch + enabled: false + - type: turn_on + device_id: 2fde35e8a4dfe850d53d35a650d05b6e + entity_id: c4ec82fc55ef125a4b39f842e06b7261 + domain: switch + enabled: false + - type: turn_on + device_id: 58dfbd5f60265682b98691217b9bd038 + entity_id: abf15d05be0dadf1bba145f0835d3b3a + domain: switch + enabled: false + - type: turn_on + device_id: 4f7810cf96260d17363b63542447ffe7 + entity_id: 70347118804cc5d1b5770362ab369251 + domain: switch + enabled: false + - type: turn_on + device_id: 88c1bfde7eba191a46899d4c59754512 + entity_id: 594a0d24aa2fd2dc2156d9918a2204bf + domain: switch + enabled: false + - type: turn_on + device_id: 77092d966014d6eb6222928cce911caf + entity_id: af55f6e7e0ffa642407923fc6e8cdaf3 + domain: light + enabled: false + - type: turn_on + device_id: e117bada67c4b115d445163c93d2f78c + entity_id: ee44672a0acd4c35658f69b1ec71bdf7 + domain: light + enabled: false + mode: single + +########################### +####### FAMILY ROOM ####### +########################### + +- id: '1739841110645' + alias: Turn on family room in the morning + description: '' + triggers: + - trigger: state + entity_id: + - binary_sensor.meat_heater_motion + to: 'on' + conditions: + - condition: time + after: 05:00:00 + before: 07:45:00 + weekday: + - sun + - mon + - tue + - wed + - thu + - fri + - sat + actions: + - type: turn_on + device_id: 389d36aa5a0ecfd3eb2e1ec8795464d0 + entity_id: 0ae75b98556682467fedf0ff441346ef + domain: light + brightness_pct: 20 + enabled: true + - type: turn_on + device_id: 6f341a97517eecd7e4befd4633bb0c3a + entity_id: 4b21efa79430d63e813137d08a8df60e + domain: light + - type: turn_on + device_id: 77092d966014d6eb6222928cce911caf + entity_id: af55f6e7e0ffa642407923fc6e8cdaf3 + domain: light + enabled: false + - type: turn_on + device_id: 3096deb74c1dddf893e78fcdfa5b23aa + entity_id: aa15e9f5b3c00639b64501acd18f2081 + domain: switch + - type: turn_on + device_id: 58dfbd5f60265682b98691217b9bd038 + entity_id: abf15d05be0dadf1bba145f0835d3b3a + domain: switch + - type: turn_on + device_id: 2fde35e8a4dfe850d53d35a650d05b6e + entity_id: c4ec82fc55ef125a4b39f842e06b7261 + domain: switch + - type: turn_on + device_id: 4f7810cf96260d17363b63542447ffe7 + entity_id: 70347118804cc5d1b5770362ab369251 + domain: switch + - type: turn_on + device_id: 84566a79d41ebedd4512d2418195a898 + entity_id: fb7b78a1f6d3146585e2f93be33bf4c1 + domain: switch + - type: turn_on + device_id: 88c1bfde7eba191a46899d4c59754512 + entity_id: 594a0d24aa2fd2dc2156d9918a2204bf + domain: switch + - type: turn_on + device_id: 00ce230936f351558f177d5ed229759b + entity_id: 9ef15fb77ca7e81bcb6c7551329f50aa + domain: switch + mode: single + +- id: '1740929956187' + alias: Turn off family room lights when empty + description: '' + triggers: + - trigger: state + entity_id: + - binary_sensor.meat_heater_motion + to: 'off' + for: + hours: 0 + minutes: 30 + seconds: 0 + - trigger: time + at: '09:00:00' + - trigger: time + at: '22:00:00' + - trigger: event + event_type: automation_reloaded + conditions: + - condition: state + entity_id: binary_sensor.meat_heater_motion + state: 'off' + for: '00:30:00' + - condition: or + conditions: + - condition: time + after: '22:00:00' + before: 02:00:00 + weekday: + - sat + - fri + - thu + - wed + - tue + - mon + - sun + - condition: time + after: 09:00:00 + before: '16:00:00' + weekday: + - sat + - fri + - thu + - wed + - tue + - mon + - sun + actions: + - type: turn_off + device_id: 389d36aa5a0ecfd3eb2e1ec8795464d0 + entity_id: 0ae75b98556682467fedf0ff441346ef + domain: light + mode: single + +- id: '1742691696852' + alias: Family room turn off at Midnight + description: '' + triggers: + - trigger: time + at: 00:00:00 + conditions: [] + actions: + - type: turn_off + device_id: 389d36aa5a0ecfd3eb2e1ec8795464d0 + entity_id: 0ae75b98556682467fedf0ff441346ef + domain: light + - type: turn_off + device_id: 77092d966014d6eb6222928cce911caf + entity_id: af55f6e7e0ffa642407923fc6e8cdaf3 + domain: light + - type: turn_off + device_id: 6f341a97517eecd7e4befd4633bb0c3a + entity_id: 4b21efa79430d63e813137d08a8df60e + domain: light + mode: single + +- id: '1765116337200' + alias: Turn off family room tv when empty + description: '' + triggers: + - entity_id: + - binary_sensor.hsjq_motion + to: + - 'off' + for: + hours: 0 + minutes: 15 + seconds: 0 + trigger: state + conditions: + - condition: time + after: '18:00:00' + before: 06:00:00 + weekday: + - sun + - mon + - tue + - wed + - thu + - fri + - sat + actions: + - target: + entity_id: media_player.hisense_g204x_cd41 + action: media_player.turn_off + data: {} + enabled: true + mode: single + +- id: '1770433866161' + alias: Turn off kitchen sink light at Sunrise + description: '' + triggers: + - trigger: sun + event: sunrise + offset: 01:00:00 + conditions: [] + actions: + - type: turn_off + device_id: 40d38ce4c97de6008962e2b3d84896c9 + entity_id: d794e094113a14e6de0db3e5d3f65e88 + domain: light + mode: single + +- id: '1788748800000' + alias: Living room nightly shutoff + description: Turn off all living-room lights and the fireplace at bedtime. + triggers: + - trigger: time + at: '22:30:00' + id: weeknight + - trigger: time + at: '00:00:00' + id: weekend_night + conditions: + - condition: or + conditions: + - condition: and + conditions: + - condition: trigger + id: weeknight + - condition: time + weekday: + - sun + - mon + - tue + - wed + - thu + - condition: and + conditions: + - condition: trigger + id: weekend_night + - condition: time + weekday: + - sat + - sun + actions: + - action: light.turn_off + target: + entity_id: + - light.living_room_light_2 + - light.living_room_lamp_1 + - light.small_living_room_lamp + - action: switch.turn_off + target: + entity_id: switch.fireplace + mode: single + +- id: '1760000000001' + alias: Fireplace mantle outlet morning schedule + description: Turn the fireplace mantle outlet on each morning. + triggers: + - trigger: time + at: '05:30:00' + conditions: [] + actions: + - action: switch.turn_on + target: + entity_id: switch.fireplace + mode: single \ No newline at end of file diff --git a/automations/01_home_and_lighting/01c_second_floor_automations.yaml b/automations/01_home_and_lighting/01c_second_floor_automations.yaml new file mode 100644 index 0000000..b30c3a4 --- /dev/null +++ b/automations/01_home_and_lighting/01c_second_floor_automations.yaml @@ -0,0 +1,163 @@ +################################################### +############ SECOND FLOOR AUTOMATIONS ############# +################################################### + +########### +### MBR ### +########### + +- id: '1756172550854' + alias: Parents ceiling fan off at 8AM + description: '' + triggers: + - trigger: time + at: 08:00:00 + conditions: [] + actions: + - type: turn_off + device_id: 31622aa8682d29be0d631680776131c3 + entity_id: dbc4e84732121a8cc63eb1b6e95fd78b + domain: switch + mode: single + +- id: '1757038271421' + alias: Parents ceiling fan off when it’s below 55 + description: Recheck the cold-weather cutoff when the nighttime window starts and after startup or reload. + triggers: + - trigger: numeric_state + entity_id: + - sensor.openweathermap_temperature + below: 55 + - trigger: time + at: '23:00:00' + - trigger: homeassistant + event: start + - trigger: event + event_type: automation_reloaded + conditions: + - condition: numeric_state + entity_id: sensor.openweathermap_temperature + below: 55 + - condition: time + after: '23:00:00' + before: 06:00:00 + actions: + - type: turn_off + device_id: 31622aa8682d29be0d631680776131c3 + entity_id: dbc4e84732121a8cc63eb1b6e95fd78b + domain: switch + mode: single + +- id: '1757038394971' + alias: Parents ceiling fan on above 70 + description: Turn on above 70 unless the nighttime cold-weather cutoff takes priority. + triggers: + - trigger: numeric_state + entity_id: + - sensor.bedroom_temperature + above: 70 + conditions: + - condition: template + value_template: >- + {{ not ((now().hour >= 23 or now().hour < 6) + and is_number(states('sensor.openweathermap_temperature')) + and states('sensor.openweathermap_temperature') | float(55) < 55) }} + actions: + - type: turn_on + device_id: 31622aa8682d29be0d631680776131c3 + entity_id: dbc4e84732121a8cc63eb1b6e95fd78b + domain: switch + mode: single + +- id: '1739971331649' + alias: Master Bedroom bedside lights, ceiling fan and air purifier on at 8PM + description: Turn on both bedside lights, the ceiling fan outlet and the air purifier at 20:00. + triggers: + - trigger: time + at: '20:00:00' + conditions: [] + actions: + - type: turn_on + device_id: a8b108e7836eeb9c66cd0169afc4a486 + entity_id: d48390b30da2add2f866a8cec5dc2726 + domain: switch + - type: turn_on + device_id: d371342d65df3ddbd28fb841b6ce0a13 + entity_id: 7df615008eff2c537a1d6ac4be76def4 + domain: switch + - type: turn_on + device_id: 8b5cc6f6d2e727522ad3069656e2020f + entity_id: ff7e86ebc87458f60b69d1599ff06d13 + domain: fan + - action: switch.turn_on + target: + entity_id: switch.parents_ceiling_fan + mode: single + +- id: '1739835025769' + alias: Turn on master bedroom lights with motion + description: '' + triggers: + - trigger: state + entity_id: + - binary_sensor.bedroom_motion + to: 'on' + conditions: + - condition: time + after: '16:00:00' + before: '20:00:00' + weekday: + - sun + - mon + - tue + - wed + - thu + - fri + - sat + - condition: sun + after: sunset + actions: + - type: turn_on + device_id: a8b108e7836eeb9c66cd0169afc4a486 + entity_id: d48390b30da2add2f866a8cec5dc2726 + domain: switch + - type: turn_on + device_id: d371342d65df3ddbd28fb841b6ce0a13 + entity_id: 7df615008eff2c537a1d6ac4be76def4 + domain: switch + mode: single + +- id: '1739840523909' + alias: Turn off master bedroom bedside lights in the evening when no one is in the room + description: '' + triggers: + - trigger: state + entity_id: + - binary_sensor.bedroom_occupancy + to: 'off' + for: + hours: 0 + minutes: 10 + seconds: 0 + conditions: + - condition: time + after: '16:00:00' + before: '20:00:00' + weekday: + - sun + - mon + - tue + - wed + - thu + - fri + - sat + actions: + - type: turn_off + device_id: a8b108e7836eeb9c66cd0169afc4a486 + entity_id: d48390b30da2add2f866a8cec5dc2726 + domain: switch + - type: turn_off + device_id: d371342d65df3ddbd28fb841b6ce0a13 + entity_id: 7df615008eff2c537a1d6ac4be76def4 + domain: switch + mode: single \ No newline at end of file diff --git a/automations/01_home_and_lighting/01d_outside_automations.yaml b/automations/01_home_and_lighting/01d_outside_automations.yaml new file mode 100644 index 0000000..660c4b3 --- /dev/null +++ b/automations/01_home_and_lighting/01d_outside_automations.yaml @@ -0,0 +1,48 @@ +################################################ +############## OUTSIDE AUTOMATIONS ############# +################################################ + +- id: '1751505592389' + alias: Turn off bug zapper at 1030PM + description: Disabled because the front porch schedule already turns this outlet off at 22:00. + initial_state: false + triggers: + - trigger: time + at: '22:30:00' + conditions: [] + actions: + - type: turn_off + device_id: 872cdc7e609c8df8544349fceae0828e + entity_id: df6f91a7fc4619ff7d664e12518fc9c2 + domain: switch + mode: single + +- id: '1769311377293' + alias: Front Porch outlets turn off at 10P + description: '' + triggers: + - trigger: time + at: '22:00:00' + conditions: [] + actions: + - type: turn_off + device_id: e04306aa947ba9901108c363d8109ca0 + entity_id: 12662d2294935b2a21500e3f6d69ba15 + domain: switch + - type: turn_off + device_id: c0de273e40c6f4f1cafe4db27e5a6782 + entity_id: e6f4af2d9bc05634f994af34bad9a477 + domain: switch + - type: turn_off + device_id: e2343a74462cc1434c4acfa2e32d1364 + entity_id: ea84e174f0fa3316b9923c4254454a37 + domain: switch + - type: turn_off + device_id: 872cdc7e609c8df8544349fceae0828e + entity_id: df6f91a7fc4619ff7d664e12518fc9c2 + domain: switch + - type: turn_off + device_id: a1fdc7c838bdded4d8e90bb7941476a3 + entity_id: 84d24335edc946153ed4f81ac7906f3c + domain: switch + mode: single \ No newline at end of file diff --git a/automations/01_home_and_lighting/01e_holiday_automations.yaml b/automations/01_home_and_lighting/01e_holiday_automations.yaml new file mode 100644 index 0000000..ce89e6c --- /dev/null +++ b/automations/01_home_and_lighting/01e_holiday_automations.yaml @@ -0,0 +1,194 @@ +################################################################### +################## HOLIDAY AUTOMATIONS ############################ +################################################################### + +################# +#### GENERAL #### +################# + +- id: '1759631437832' + alias: 'Turn off decorations ' + description: Midnight recovery sweep for decorations, including outlets already shut off by the 22:00 porch schedule. + triggers: + - trigger: time + at: 00:00:00 + conditions: [] + actions: + - type: turn_off + device_id: a1fdc7c838bdded4d8e90bb7941476a3 + entity_id: 84d24335edc946153ed4f81ac7906f3c + domain: switch + - type: turn_off + device_id: 872cdc7e609c8df8544349fceae0828e + entity_id: df6f91a7fc4619ff7d664e12518fc9c2 + domain: switch + - type: turn_off + device_id: eae417dc05ec7c9f1da72f76f32bff18 + entity_id: 8ebd9a84e00e9a8a4c05860cb01767ef + domain: switch + enabled: true + - type: turn_off + device_id: 3096deb74c1dddf893e78fcdfa5b23aa + entity_id: aa15e9f5b3c00639b64501acd18f2081 + domain: switch + - type: turn_off + device_id: 58dfbd5f60265682b98691217b9bd038 + entity_id: abf15d05be0dadf1bba145f0835d3b3a + domain: switch + - type: turn_off + device_id: 4f7810cf96260d17363b63542447ffe7 + entity_id: 70347118804cc5d1b5770362ab369251 + domain: switch + - type: turn_off + device_id: 2fde35e8a4dfe850d53d35a650d05b6e + entity_id: c4ec82fc55ef125a4b39f842e06b7261 + domain: switch + - type: turn_off + device_id: e117bada67c4b115d445163c93d2f78c + entity_id: ee44672a0acd4c35658f69b1ec71bdf7 + domain: light + - type: turn_off + device_id: 88c1bfde7eba191a46899d4c59754512 + entity_id: 594a0d24aa2fd2dc2156d9918a2204bf + domain: switch + - type: turn_off + device_id: 84566a79d41ebedd4512d2418195a898 + entity_id: fb7b78a1f6d3146585e2f93be33bf4c1 + domain: switch + - type: turn_off + device_id: c0de273e40c6f4f1cafe4db27e5a6782 + entity_id: e6f4af2d9bc05634f994af34bad9a477 + domain: switch + mode: single + +- id: '1762279134131' + alias: Turn on decorations in the AM + description: '' + triggers: + - trigger: time + at: 06:00:00 + conditions: [] + actions: + - type: turn_on + device_id: eae417dc05ec7c9f1da72f76f32bff18 + entity_id: 8ebd9a84e00e9a8a4c05860cb01767ef + domain: switch + enabled: false + - type: turn_on + device_id: a1fdc7c838bdded4d8e90bb7941476a3 + entity_id: 84d24335edc946153ed4f81ac7906f3c + domain: switch + enabled: false + - type: turn_on + device_id: 3096deb74c1dddf893e78fcdfa5b23aa + entity_id: aa15e9f5b3c00639b64501acd18f2081 + domain: switch + - type: turn_on + device_id: 58dfbd5f60265682b98691217b9bd038 + entity_id: abf15d05be0dadf1bba145f0835d3b3a + domain: switch + - type: turn_on + device_id: 2fde35e8a4dfe850d53d35a650d05b6e + entity_id: c4ec82fc55ef125a4b39f842e06b7261 + domain: switch + - type: turn_on + device_id: 4f7810cf96260d17363b63542447ffe7 + entity_id: 70347118804cc5d1b5770362ab369251 + domain: switch + - type: turn_on + device_id: 84566a79d41ebedd4512d2418195a898 + entity_id: fb7b78a1f6d3146585e2f93be33bf4c1 + domain: switch + - type: turn_on + device_id: e117bada67c4b115d445163c93d2f78c + entity_id: ee44672a0acd4c35658f69b1ec71bdf7 + domain: light + - type: turn_on + device_id: 00ce230936f351558f177d5ed229759b + entity_id: 9ef15fb77ca7e81bcb6c7551329f50aa + domain: switch + - type: turn_on + device_id: 88c1bfde7eba191a46899d4c59754512 + entity_id: 594a0d24aa2fd2dc2156d9918a2204bf + domain: switch + mode: single + +################### +#### HALLOWEEN #### +################### + +- id: freddy_fazbear_mask_schedule + alias: Freddy Fazbear Mask - Sunrise on, bedtime off + description: Turn the Freddy Fazbear Mask on at sunrise; off at 10:00 PM Sun-Thu and 11:59 PM Fri-Sat. + mode: single + triggers: + - trigger: sun + event: sunrise + id: mask_on + - trigger: time + at: '22:00:00' + id: mask_off_school_night + - trigger: time + at: '23:59:00' + id: mask_off_weekend + conditions: [] + actions: + - choose: + - conditions: + - condition: trigger + id: mask_on + sequence: + - action: homeassistant.turn_on + target: + entity_id: switch.freddy_fazbear_mask + - conditions: + - condition: trigger + id: mask_off_school_night + - condition: time + weekday: + - sun + - mon + - tue + - wed + - thu + sequence: + - action: homeassistant.turn_off + target: + entity_id: switch.freddy_fazbear_mask + - conditions: + - condition: trigger + id: mask_off_weekend + - condition: time + weekday: + - fri + - sat + sequence: + - action: homeassistant.turn_off + target: + entity_id: switch.freddy_fazbear_mask + +################### +#### CHRISTMAS #### +################### + +- id: '1763411863796' + alias: Holiday Christmas Pandora at 5PM + description: Trigger Alexa routine to play Christmas Hits Holiday Playlist on Pandora + triggers: + - at: '17:00:00' + trigger: time + conditions: + - condition: template + value_template: '{{ now().month == 11 or now().month == 12 }} + + ' + actions: + - target: + entity_id: media_player.family_room_show + data: + media: + media_content_id: Play Christmas Music + media_content_type: routine + metadata: {} + action: media_player.play_media + mode: single \ No newline at end of file diff --git a/automations/02_alerts_and_notifications.yaml b/automations/02_alerts_and_notifications.yaml index 3f60cff..532fab8 100644 --- a/automations/02_alerts_and_notifications.yaml +++ b/automations/02_alerts_and_notifications.yaml @@ -8,7 +8,7 @@ to: 'on' conditions: [] actions: - - action: notify.notify_events_alerts + - action: script.notify_events_alerts metadata: {} data: message: Garage floodlight batteries low @@ -35,179 +35,104 @@ - id: '1742841650033' alias: The Deuce Litter Level - description: '' - triggers: - - trigger: state - entity_id: - - sensor.the_deuce_litter_level - enabled: true - to: '65' - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: The Deuce's Litter is Low + description: Alert at or below 65 after two minutes; refill above 65 rearms the alert. + use_blueprint: + path: local/litter_low_notification.yaml + input: + litter_sensor: sensor.the_deuce_litter_level + threshold: 65 title: The Deuce's Litter is Low - mode: single + message: The Deuce's Litter is Low - id: '1742841709247' alias: Triple Threat Litter Level Notification - description: '' - triggers: - - trigger: state - entity_id: - - sensor.triple_threat_litter_level - enabled: true - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: Triple Threat's Litter is Low + description: Alert at or below 65 after two minutes; refill above 65 rearms the alert. + use_blueprint: + path: local/litter_low_notification.yaml + input: + litter_sensor: sensor.triple_threat_litter_level + threshold: 65 title: Triple Threat's Litter is Low - mode: single + message: Triple Threat's Litter is Low - id: '1742841764585' alias: Cat Crapper 3000 Low Litter Level Notification - description: '' - triggers: - - trigger: state - entity_id: - - sensor.cat_crapper_3000_litter_level - enabled: true - to: '65' - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: Cat Crapper 3000's Litter is Low + description: Alert at or below 65 after two minutes; refill above 65 rearms the alert. + use_blueprint: + path: local/litter_low_notification.yaml + input: + litter_sensor: sensor.cat_crapper_3000_litter_level + threshold: 65 title: Cat Crapper 3000's Litter is Low - mode: single + message: Cat Crapper 3000's Litter is Low - id: '1742841838536' alias: Poop Box Low Litter Level Notification - description: '' - triggers: - - trigger: state - entity_id: - - sensor.poop_box_litter_level - enabled: true - to: '65' - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: Poop Box's Litter is Low + description: Alert at or below 65 after two minutes; refill above 65 rearms the alert. + use_blueprint: + path: local/litter_low_notification.yaml + input: + litter_sensor: sensor.poop_box_litter_level + threshold: 65 title: Poop Box's Litter is Low - mode: single + message: Poop Box's Litter is Low - id: '1742842192548' alias: Cat Crapper 3000 is full of crap notification - description: '' - triggers: - - trigger: state - entity_id: - - binary_sensor.cat_crapper_3000_wastebin_filled - enabled: true - to: 'on' - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: Cat Crapper 3000 is full of crap + description: Notify when the litter-box alert flag turns on. + use_blueprint: + path: local/litter_binary_notification.yaml + input: + alert_sensor: binary_sensor.cat_crapper_3000_wastebin_filled title: CLEAN Cat Crapper 3000 - it's full of crap - mode: single + message: Cat Crapper 3000 is full of crap - id: '1742842261527' alias: The Deuce is full of deuces notification - description: '' - triggers: - - trigger: state - entity_id: - - binary_sensor.the_deuce_wastebin_filled - enabled: true - to: 'on' - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: The Deuce is full of deuces (laundry room) + description: Notify when the litter-box alert flag turns on. + use_blueprint: + path: local/litter_binary_notification.yaml + input: + alert_sensor: binary_sensor.the_deuce_wastebin_filled title: Too many dueces have been dropped! - mode: single + message: The Deuce is full of deuces (laundry room) - id: '1742842372471' alias: The Poop Box has runneth over Notification - description: '' - triggers: - - trigger: state - entity_id: - - binary_sensor.poop_box_wastebin_filled - enabled: true - to: 'on' - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: The Poop Box has runneth over (basement, left side) + description: Notify when the litter-box alert flag turns on. + use_blueprint: + path: local/litter_binary_notification.yaml + input: + alert_sensor: binary_sensor.poop_box_wastebin_filled title: The poop box is bursting!! - mode: single + message: The Poop Box has runneth over (basement, left side) - id: '1742842458817' alias: Triple Threat Full Notification - description: '' - triggers: - - trigger: state - entity_id: - - binary_sensor.triple_threat_wastebin_filled - enabled: true - to: 'on' - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: Triple Threat can't take no more! (Basement, right side) + description: Notify when the litter-box alert flag turns on. + use_blueprint: + path: local/litter_binary_notification.yaml + input: + alert_sensor: binary_sensor.triple_threat_wastebin_filled title: Triple Threat can't take no more! - mode: single + message: Triple Threat can't take no more! (Basement, right side) - id: '1782932601001' alias: Luma Smart Litter Box Waste Bin Full Notification description: Notify when the Petlibro Luma Smart Litter Box waste bin is full. - triggers: - - trigger: state - entity_id: - - binary_sensor.luma_smart_litter_box_waste_bin_full - enabled: true - to: 'on' - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: Luma Smart Litter Box is full of crap + use_blueprint: + path: local/litter_binary_notification.yaml + input: + alert_sensor: binary_sensor.luma_smart_litter_box_waste_bin_full title: CLEAN Luma Smart Litter Box - it's full of crap - mode: single + message: Luma Smart Litter Box is full of crap - id: '1782932601004' alias: Luma Smart Litter Box Door Error Notification description: Notify when the Petlibro Luma Smart Litter Box reports a door error. - triggers: - - trigger: state - entity_id: - - binary_sensor.luma_smart_litter_box_door_error - enabled: true - to: 'on' - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: Luma Smart Litter Box has a door error + use_blueprint: + path: local/litter_binary_notification.yaml + input: + alert_sensor: binary_sensor.luma_smart_litter_box_door_error title: Luma Smart Litter Box door error - mode: single + message: Luma Smart Litter Box has a door error diff --git a/automations/02_alerts_and_notifications.yaml.bak.20260808120900 b/automations/02_alerts_and_notifications.yaml.bak.20260808120900 deleted file mode 100644 index 06e7cf3..0000000 --- a/automations/02_alerts_and_notifications.yaml.bak.20260808120900 +++ /dev/null @@ -1,213 +0,0 @@ -# Safety, device, and household alert automations. -- id: '1742155540986' - alias: 'Garage Floodlight Low Battery Notification ' - description: '' - triggers: - - trigger: state - entity_id: binary_sensor.garage_floodlight_battery - to: 'on' - conditions: [] - actions: - - action: script.notify_events_alerts - metadata: {} - data: - message: Garage floodlight batteries low - title: Garage floodlight batteries low - mode: single - -- id: '1742841280696' - alias: Triple Threat Anti-Stink Juice Empty - description: '' - triggers: - - trigger: state - entity_id: - - sensor.triple_threat_spray_deodorant_liquid - enabled: true - to: '0' - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: Triple Threat's Anti-Stinky Juice is Empty - title: Triple Threat's Anti-Stinky Juice is Empty - mode: single - -- id: '1742841650033' - alias: The Deuce Litter Level - description: '' - triggers: - - trigger: state - entity_id: - - sensor.the_deuce_litter_level - enabled: true - to: '65' - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: The Deuce's Litter is Low - title: The Deuce's Litter is Low - mode: single - -- id: '1742841709247' - alias: Triple Threat Litter Level Notification - description: '' - triggers: - - trigger: state - entity_id: - - sensor.triple_threat_litter_level - enabled: true - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: Triple Threat's Litter is Low - title: Triple Threat's Litter is Low - mode: single - -- id: '1742841764585' - alias: Cat Crapper 3000 Low Litter Level Notification - description: '' - triggers: - - trigger: state - entity_id: - - sensor.cat_crapper_3000_litter_level - enabled: true - to: '65' - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: Cat Crapper 3000's Litter is Low - title: Cat Crapper 3000's Litter is Low - mode: single - -- id: '1742841838536' - alias: Poop Box Low Litter Level Notification - description: '' - triggers: - - trigger: state - entity_id: - - sensor.poop_box_litter_level - enabled: true - to: '65' - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: Poop Box's Litter is Low - title: Poop Box's Litter is Low - mode: single - -- id: '1742842192548' - alias: Cat Crapper 3000 is full of crap notification - description: '' - triggers: - - trigger: state - entity_id: - - binary_sensor.cat_crapper_3000_wastebin_filled - enabled: true - to: 'on' - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: Cat Crapper 3000 is full of crap - title: CLEAN Cat Crapper 3000 - it's full of crap - mode: single - -- id: '1742842261527' - alias: The Deuce is full of deuces notification - description: '' - triggers: - - trigger: state - entity_id: - - binary_sensor.the_deuce_wastebin_filled - enabled: true - to: 'on' - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: The Deuce is full of deuces (laundry room) - title: Too many dueces have been dropped! - mode: single - -- id: '1742842372471' - alias: The Poop Box has runneth over Notification - description: '' - triggers: - - trigger: state - entity_id: - - binary_sensor.poop_box_wastebin_filled - enabled: true - to: 'on' - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: The Poop Box has runneth over (basement, left side) - title: The poop box is bursting!! - mode: single - -- id: '1742842458817' - alias: Triple Threat Full Notification - description: '' - triggers: - - trigger: state - entity_id: - - binary_sensor.triple_threat_wastebin_filled - enabled: true - to: 'on' - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: Triple Threat can't take no more! (Basement, right side) - title: Triple Threat can't take no more! - mode: single - -- id: '1782932601001' - alias: Luma Smart Litter Box Waste Bin Full Notification - description: Notify when the Petlibro Luma Smart Litter Box waste bin is full. - triggers: - - trigger: state - entity_id: - - binary_sensor.luma_smart_litter_box_waste_bin_full - enabled: true - to: 'on' - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: Luma Smart Litter Box is full of crap - title: CLEAN Luma Smart Litter Box - it's full of crap - mode: single - -- id: '1782932601004' - alias: Luma Smart Litter Box Door Error Notification - description: Notify when the Petlibro Luma Smart Litter Box reports a door error. - triggers: - - trigger: state - entity_id: - - binary_sensor.luma_smart_litter_box_door_error - enabled: true - to: 'on' - conditions: [] - actions: - - action: notify.notify_events_cats - metadata: {} - data: - message: Luma Smart Litter Box has a door error - title: Luma Smart Litter Box door error - mode: single diff --git a/automations/03_presence_and_security.yaml b/automations/03_presence_and_security.yaml index 14a02df..52e5a42 100644 --- a/automations/03_presence_and_security.yaml +++ b/automations/03_presence_and_security.yaml @@ -1,107 +1,88 @@ -# Presence and camera/security automations. - -- id: '1742155298923' - alias: Disarm cameras when Joshua comes home - description: '' - triggers: - - trigger: zone - entity_id: device_tracker.joshuas_iphone_of_pain - zone: zone.home - event: enter - conditions: [] - actions: - - action: camera.disable_motion_detection - metadata: {} - data: {} - target: - device_id: - - 3df00a0796efe006e4ea349a9752faba - - 0c13483d761efe3b85e534fadd323fe3 - - 5aa158596e48441ea606dd881a34402d - - d045a0a68c3c4d52a7beb2a28fdf6993 - - 044c43ea05ceff58b1209f6441c24183 - mode: single - -- id: '1742155338014' - alias: Disable Cameras when Polly comes home - description: '' - triggers: - - trigger: zone - entity_id: device_tracker.pollys_iphone - zone: zone.home - event: enter - conditions: [] - actions: - - action: camera.disable_motion_detection - metadata: {} - data: {} - target: - device_id: - - 3df00a0796efe006e4ea349a9752faba - - 0c13483d761efe3b85e534fadd323fe3 - - 5aa158596e48441ea606dd881a34402d - - d045a0a68c3c4d52a7beb2a28fdf6993 - - 044c43ea05ceff58b1209f6441c24183 - mode: single - -- id: '1754414591718' - alias: Arm Inside Blink Cameras When Everyone Leaves - description: Arm Blink 'Inside' camera group when both Joshua and Polly are not - home - triggers: - - trigger: zone - entity_id: device_tracker.joshuas_iphone_of_pain - zone: zone.home - event: leave - - trigger: zone - entity_id: device_tracker.pollys_iphone - zone: zone.home - event: leave - conditions: - - condition: device - device_id: eabafa43fa1148e4facc8e5a4151958d - domain: device_tracker - entity_id: 74ded93c7bee3648dccc7f024095b7c6 - type: is_not_home - - condition: device - device_id: 638383852928fbd17397baa190c2d853 - domain: device_tracker - entity_id: 0f494c69f886f56391b07f0517b0c0f3 - type: is_not_home - actions: - - target: - entity_id: alarm_control_panel.blink_inside - action: alarm_control_panel.alarm_arm_away - mode: single - +# One controller owns the Blink group and its cameras' motion detection. - id: '1758196295864' - alias: Disarm Blink when family is home - description: Arm Blink 'Inside' camera group when both Joshua and Polly are not - home + alias: Inside Blink Cameras - Reconcile Family Presence + description: >- + Disarm when either parent is home. Enable camera motion detection and arm + only when both trackers have valid away states. Reconcile on startup, + automation reload and Blink recovery; unknown location never means away. triggers: - - trigger: zone - entity_id: device_tracker.joshuas_iphone_of_pain - zone: zone.home - event: enter - - trigger: zone - entity_id: device_tracker.pollys_iphone - zone: zone.home - event: enter - conditions: - - condition: device - device_id: eabafa43fa1148e4facc8e5a4151958d - domain: device_tracker - entity_id: 74ded93c7bee3648dccc7f024095b7c6 - type: is_home - - condition: device - device_id: 638383852928fbd17397baa190c2d853 - domain: device_tracker - entity_id: 0f494c69f886f56391b07f0517b0c0f3 - type: is_home + - trigger: state + entity_id: + - device_tracker.joshuas_iphone_of_pain + - device_tracker.pollys_iphone + to: null + - trigger: homeassistant + event: start + - trigger: event + event_type: automation_reloaded + - trigger: state + entity_id: alarm_control_panel.blink_inside + to: + - armed_away + - disarmed + conditions: [] actions: - - action: alarm_control_panel.alarm_disarm - target: - entity_id: - - alarm_control_panel.blink_inside - data: {} - mode: single + - choose: + - conditions: + - condition: template + value_template: >- + {{ is_state('device_tracker.joshuas_iphone_of_pain', 'home') + or is_state('device_tracker.pollys_iphone', 'home') }} + sequence: + - if: + - condition: template + value_template: >- + {{ has_value('alarm_control_panel.blink_inside') + and not is_state('alarm_control_panel.blink_inside', 'disarmed') }} + then: + - action: alarm_control_panel.alarm_disarm + continue_on_error: true + target: + entity_id: alarm_control_panel.blink_inside + # Recheck after the network action, before changing camera settings. + - condition: template + value_template: >- + {{ is_state('device_tracker.joshuas_iphone_of_pain', 'home') + or is_state('device_tracker.pollys_iphone', 'home') }} + - action: camera.disable_motion_detection + continue_on_error: true + target: + device_id: + - 3df00a0796efe006e4ea349a9752faba + - 0c13483d761efe3b85e534fadd323fe3 + - 5aa158596e48441ea606dd881a34402d + - d045a0a68c3c4d52a7beb2a28fdf6993 + - 044c43ea05ceff58b1209f6441c24183 + - conditions: + - condition: template + value_template: >- + {{ states('device_tracker.joshuas_iphone_of_pain') + not in ['home', 'unknown', 'unavailable', ''] + and states('device_tracker.pollys_iphone') + not in ['home', 'unknown', 'unavailable', ''] + and has_value('alarm_control_panel.blink_inside') }} + sequence: + - action: camera.enable_motion_detection + # One unavailable camera must not prevent arming the rest of the group. + continue_on_error: true + target: + device_id: + - 3df00a0796efe006e4ea349a9752faba + - 0c13483d761efe3b85e534fadd323fe3 + - 5aa158596e48441ea606dd881a34402d + - d045a0a68c3c4d52a7beb2a28fdf6993 + - 044c43ea05ceff58b1209f6441c24183 + - condition: template + value_template: >- + {{ states('device_tracker.joshuas_iphone_of_pain') + not in ['home', 'unknown', 'unavailable', ''] + and states('device_tracker.pollys_iphone') + not in ['home', 'unknown', 'unavailable', ''] }} + - if: + - condition: template + value_template: "{{ not is_state('alarm_control_panel.blink_inside', 'armed_away') }}" + then: + - action: alarm_control_panel.alarm_arm_away + target: + entity_id: alarm_control_panel.blink_inside + mode: restart diff --git a/automations/04_kids_and_announcements.yaml b/automations/04_kids_and_announcements.yaml deleted file mode 100644 index 477c0fb..0000000 --- a/automations/04_kids_and_announcements.yaml +++ /dev/null @@ -1,739 +0,0 @@ -# Kids routines, school prep, and announcement automations. - -- id: '1788133654306' - alias: Declan - Non-school day afternoon medication reminder - description: Remind Declan to take his medicine at 2 PM on non-school days. - triggers: - - trigger: time - at: '14:00:00' - conditions: - - condition: or - conditions: - - condition: time - weekday: - - sat - - sun - - condition: state - entity_id: calendar.holidays_in_united_states - state: 'on' - - condition: template - value_template: > - {{ states('calendar.family_events') == 'on' - and 'no school' in (state_attr('calendar.family_events', 'message') - | default('') | lower) }} - actions: - - action: notify.alexa_media - data: - target: - - media_player.living_room - - media_player.declan_s_room - message: Declan, this is your reminder to take your afternoon medicine. - - action: notify.notify_events_alerts - data: - title: Declan medication reminder - message: Declan's afternoon medicine reminder. - mode: single - -- id: '1788133654303' - alias: Set weekday announcement speakers to volume 5 - description: Set the school-announcement speakers to volume level 5 each weekday. - triggers: - - trigger: time - at: '07:10:00' - conditions: - - condition: time - weekday: - - mon - - tue - - wed - - thu - - fri - actions: - - action: media_player.volume_set - target: - entity_id: - - media_player.family_room - - media_player.living_room - - media_player.kitchen - - media_player.dinning_room - - media_player.declan_s_room - data: - volume_level: 0.5 - mode: single - -- id: '1788133651043' - alias: Set Jordyns announcement speaker to volume 6 - description: Set the school-announcement speakers to volume level 6 each weekday. - triggers: - - trigger: time - at: '07:35:00' - conditions: - - condition: time - weekday: - - tue - actions: - - action: media_player.volume_set - target: - entity_id: - - media_player.jordyn_s_room - data: - volume_level: 0.6 - mode: single - -- id: '1743380000904' - alias: Jordyn OT Wake Up Call 1 - description: '' - triggers: - - at: '07:40:00' - trigger: time - enabled: true - conditions: - - condition: time - weekday: - - tue - actions: - - data: - message: Jordyn, time to wake up and get out of bed for OT! Get dressed, put on deodorant, brush your teeth, and brush your hair. You got this! - action: notify.alexa_media_jordyn_s_room - mode: single - -- id: '1743380036904' - alias: Jordyn OT Wake Up Call 2 - description: '' - triggers: - - at: '07:43:00' - trigger: time - enabled: true - conditions: - - condition: time - weekday: - - tue - actions: - - data: - message: Jordyn, you need to wake up and get out of bed for OT! Get dressed, put on deodorant, brush your teeth, and brush your hair. You got this! - action: notify.alexa_media_jordyn_s_room - mode: single - -- id: '1743382700904' - alias: Jordyn OT Wake Up Call 3 - description: '' - triggers: - - at: '07:46:00' - trigger: time - enabled: true - conditions: - - condition: time - weekday: - - tue - actions: - - data: - message: Jordyn, get out of bed! Move! Move! Move! Move! Get dressed, put on deodorant, brush your teeth, and brush your hair. You got this! - action: notify.alexa_media_jordyn_s_room - mode: single - -- id: '1788133654304' - alias: Jordyn-Bedtime-Snack-Notification-Weekend - description: Triggers an Alexa notification at 8:00 PM if the Google Calendar event - is 'Girls at Home' - triggers: - - at: '20:30:00' - trigger: time - enabled: true - conditions: - - condition: time - weekday: - - fri - - sat - - condition: state - entity_id: calendar.family_events - state: 'on' - - condition: template - value_template: '{{ state_attr(''calendar.family_events'', ''message'') == ''Girls - at Home'' }}' - actions: - - data: - message: Jordyn, time to put away screens and get a bedtime snack. - action: notify.alexa_media_living_room - mode: single - -- id: '1743381226135' - alias: Jordyn-Bedtime-Snack-Notification - description: Triggers an Alexa notification at 8 PM if the Google Family Calendar - event is 'Girls at Home' - triggers: - - trigger: time - at: '20:00:00' - enabled: true - conditions: - - condition: time - weekday: - - sun - - mon - - tue - - wed - - condition: state - entity_id: calendar.family_events - state: 'on' - - condition: template - value_template: '{{ state_attr(''calendar.family_events'', ''message'') == ''Girls - at Home'' }}' - actions: - - target: - entity_id: - - media_player.living_room - - media_player.jordyn_s_room - - media_player.dining_room - data: - media: - media_content_id: Jordyn Weekday Bedtime Routine - media_content_type: routine - metadata: {} - action: media_player.play_media - mode: single - -- id: '1743311126135' - alias: Jordyn-Bedtime-10-minute-warning-Notification - description: Triggers an Alexa notification at 7:50 PM if the Google Family Calendar - event is 'Girls at Home' - triggers: - - trigger: time - at: '19:50:00' - enabled: true - conditions: - - condition: time - weekday: - - sun - - mon - - tue - - wed - - condition: state - entity_id: calendar.family_events - state: 'on' - - condition: template - value_template: '{{ state_attr(''calendar.family_events'', ''message'') == ''Girls - at Home'' }}' - actions: - - action: notify.alexa_media - data: - target: - - media_player.living_room - - media_player.dinning_room - message: Jordyn - ten minutes left until it's time to put away screens and get a bedtime snack. - mode: single - -- id: '1743311106135' - alias: Jordyn-Bedtime-10-minute-warning-weekend-Notification - description: Triggers an Alexa notification at 8:20 PM if the Google Family Calendar - event is 'Girls at Home' - triggers: - - trigger: time - at: '20:20:00' - enabled: true - conditions: - - condition: time - weekday: - - fri - - sat - - condition: state - entity_id: calendar.family_events - state: 'on' - - condition: template - value_template: '{{ state_attr(''calendar.family_events'', ''message'') == ''Girls - at Home'' }}' - actions: - - action: notify.alexa_media - data: - target: - - media_player.living_room - - media_player.dinning_room - message: Jordyn - ten minutes left until it's time to put away screens and get a bedtime snack. - mode: single - -- id: '1743385356527' - alias: Jordyn’s Light on at 7PM - description: '' - triggers: - - trigger: time - at: '19:00:00' - conditions: - - condition: time - weekday: - - mon - - tue - actions: - - type: turn_on - device_id: ef731a5e6e666bf4fc20cc321f596029 - entity_id: 9629035816fddf7de8926e4e4c29aa34 - domain: switch - mode: single - -- id: '1743385432089' - alias: Jordyn’s light on weekend - description: '' - triggers: - - trigger: time - at: '19:00:00' - conditions: - - condition: and - conditions: - - condition: time - weekday: - - fri - - sat - - sun - - condition: template - value_template: '{{ now().strftime(''%U'') | int % 2 == 1 }}' - actions: - - type: turn_on - device_id: ef731a5e6e666bf4fc20cc321f596029 - entity_id: 9629035816fddf7de8926e4e4c29aa34 - domain: switch - mode: single - -- id: '1744560941050' - alias: Jordyn’s Lamp on at 730 - description: '' - triggers: - - trigger: time - at: '19:30:00' - conditions: [] - actions: - - type: turn_on - device_id: ef731a5e6e666bf4fc20cc321f596029 - entity_id: 9629035816fddf7de8926e4e4c29aa34 - domain: switch - mode: single - -- id: '1744503044129' - alias: Set Alexa Announcement Volume - description: Set Alexa announcement volume for structured daily routine - triggers: - - at: 08:15:00 - trigger: time - conditions: - - condition: time - weekday: - - mon - - tue - - wed - - thu - - fri - actions: - - data: - media: - media_content_id: Set kids speakers to 6 - media_content_type: routine - metadata: {} - action: media_player.play_media - target: - device_id: 7c55da01c1d0e4ee7900852bb7621b1e - mode: single - -- id: '1744503044809' - 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' - condition: - - condition: time - weekday: - - mon - - tue - - wed - - thu - - fri - action: - - service: calendar.get_events - target: - entity_id: calendar.family_events - data: - start_date_time: '{{ today_at(''00:00'') }}' - end_date_time: '{{ today_at(''00:00'') + timedelta(days=1) }}' - response_variable: agenda - - condition: template - value_template: "{{ (agenda['calendar.family_events']['events'] | default([]))\n - \ | selectattr('summary', 'defined')\n | map(attribute='summary')\n | map('lower')\n - \ | select('search', 'camp')\n | list | count == 0 }}\n" - - 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: - type: announce - method: all - mode: single - -- id: '1744503044813' - alias: Announce day camp preparation and pause TV - triggers: - - at: 08:25:00 - trigger: time - conditions: - - condition: time - weekday: - - mon - - tue - - wed - - thu - - fri - actions: - - service: calendar.get_events - target: - entity_id: calendar.family_events - data: - start_date_time: '{{ today_at(''00:00'') }}' - end_date_time: '{{ today_at(''00:00'') + timedelta(days=1) }}' - response_variable: agenda - - condition: template - value_template: "{{ (agenda['calendar.family_events']['events'] | default([]))\n - \ | selectattr('summary', 'defined')\n | map(attribute='summary')\n | map('lower')\n - \ | select('search', 'camp')\n | list | count > 0 }}\n" - - target: - entity_id: media_player.hisense_g204x_cd41 - action: media_player.media_pause - data: {} - - data: - target: - - 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 - triggers: - - at: 08:40:00 - trigger: time - conditions: - - condition: time - weekday: - - mon - - tue - - wed - - thu - - fri - actions: - - service: calendar.get_events - target: - entity_id: calendar.family_events - data: - start_date_time: '{{ today_at(''00:00'') }}' - end_date_time: '{{ today_at(''00:00'') + timedelta(days=1) }}' - response_variable: agenda - - condition: template - value_template: "{{ (agenda['calendar.family_events']['events'] | default([]))\n - \ | selectattr('summary', 'defined')\n | map(attribute='summary')\n | map('lower')\n - \ | select('search', 'camp')\n | list | count > 0 }}\n" - - 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: - - 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 - data: {} - 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 - condition: - - condition: time - weekday: - - mon - - tue - - wed - - thu - - fri - action: - - service: calendar.get_events - target: - entity_id: calendar.family_events - data: - start_date_time: '{{ today_at(''00:00'') }}' - end_date_time: '{{ today_at(''00:00'') + timedelta(days=1) }}' - response_variable: agenda - - condition: template - value_template: "{{ (agenda['calendar.family_events']['events'] | default([]))\n - \ | selectattr('summary', 'defined')\n | map(attribute='summary')\n | map('lower')\n - \ | select('search', 'camp')\n | list | count > 0 }}\n" - - 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' - condition: - - condition: time - weekday: - - mon - - tue - - wed - - thu - - fri - action: - - service: calendar.get_events - target: - entity_id: calendar.family_events - data: - start_date_time: '{{ today_at(''00:00'') }}' - end_date_time: '{{ today_at(''00:00'') + timedelta(days=1) }}' - response_variable: agenda - - condition: template - value_template: "{{ (agenda['calendar.family_events']['events'] | default([]))\n - \ | selectattr('summary', 'defined')\n | map(attribute='summary')\n | map('lower')\n - \ | select('search', 'camp')\n | list | count == 0 }}\n" - - 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: '1756211568290' - alias: Jordyn - School Prep Announcement - description: '' - triggers: - - at: 08:25:00 - trigger: time - conditions: - - condition: or - conditions: - - condition: time - weekday: - - wed - - condition: and - conditions: - - condition: time - weekday: - - mon - - condition: template - value_template: '{{ now().strftime(''%U'') | int % 2 == 1 }}' - actions: - - target: - entity_id: media_player.hisense_g204x_cd41 - action: media_player.media_pause - data: {} - - data: - target: - - media_player.living_room - - media_player.jordyn_s_room - - media_player.kitchen - - media_player.dinning_room - message: Jordyn this is your reminder to take your medicine if you haven't, pack your snack and fill your water bottle. Please make sure your - hair is brushed nicely. - action: notify.alexa_media - mode: single - -- id: '1788131534302' - alias: Jordyn - Time for School Announcement - description: '' - triggers: - - at: 08:38:00 - trigger: time - conditions: - - condition: or - conditions: - - condition: time - weekday: - - wed - - condition: and - conditions: - - condition: time - weekday: - - mon - - condition: template - value_template: '{{ now().strftime(''%U'') | int % 2 == 1 }}' - actions: - - target: - entity_id: media_player.hisense_g204x_cd41 - action: media_player.turn_off - data: {} - - data: - target: - - media_player.living_room - - media_player.jordyn_s_room - - media_player.kitchen - - media_player.dinning_room - - media_player.family_room - message: Time for school! Last call to get your water bottle, snack, and put on your shoes. Good luck, have fun, don't die!! - action: notify.alexa_media - mode: single - - -- id: '1788133654305' - alias: Jordyn - School and OT Prep Announcement - description: '' - triggers: - - at: 07:50:00 - trigger: time - conditions: - - condition: time - weekday: - - tue - actions: - - target: - entity_id: media_player.hisense_g204x_cd41 - action: media_player.media_pause - data: {} - - data: - target: - - media_player.living_room - - media_player.jordyn_s_room - - media_player.kitchen - - media_player.dinning_room - message: Jordyn, you have OT today. This is your reminder to take your medicine if you haven't, pack your snack and fill your water bottle. Please make sure your - hair is brushed nicely. - action: notify.alexa_media - mode: single - -- id: '1756211851043' - alias: Jordyn - Time for OT & School Announcement - description: '' - triggers: - - at: 08:13:00 - trigger: time - conditions: - - condition: time - weekday: - - tue - actions: - - target: - entity_id: media_player.hisense_g204x_cd41 - action: media_player.turn_off - data: {} - - data: - target: - - media_player.living_room - - media_player.jordyn_s_room - - media_player.kitchen - - media_player.dinning_room - message: Time to head out for OT and school! Last call to quickly get your water bottle, snack, and put on your shoes. Good luck, have fun, don't die!! - action: notify.alexa_media - mode: single - -- id: '1788133654301' - alias: Declan - School Prep Announcement - description: '' - triggers: - - at: 07:20:00 - trigger: time - conditions: - - condition: time - weekday: - - mon - - tue - - wed - - thu - - fri - actions: - - target: - entity_id: media_player.hisense_g204x_cd41 - action: media_player.media_pause - data: {} - - data: - target: - - media_player.living_room - - media_player.declan_s_room - - media_player.kitchen - - media_player.dinning_room - message: Declan this is your reminder to pack your snack and fill your water bottle. - action: notify.alexa_media - mode: single - -- id: '1788133654302' - alias: Declan - Time for School Announcement - description: '' - triggers: - - at: 07:38:00 - trigger: time - conditions: - - condition: time - weekday: - - mon - - tue - - wed - - thu - - fri - actions: - - target: - entity_id: media_player.hisense_g204x_cd41 - action: media_player.turn_off - data: {} - - data: - target: - - media_player.living_room - - media_player.declan_s_room - - media_player.kitchen - - media_player.dinning_room - message: Time for school! Last call to get your water bottle, snack, and put on your shoes. Good luck, have fun, don't die!! - action: notify.alexa_media - mode: single diff --git a/automations/04_kids_and_announcements/04a_camp_automations.yaml b/automations/04_kids_and_announcements/04a_camp_automations.yaml new file mode 100644 index 0000000..f872451 --- /dev/null +++ b/automations/04_kids_and_announcements/04a_camp_automations.yaml @@ -0,0 +1,73 @@ +#################################################################### +############ DAY CAMP ANNOUNCEMENTS AND AUTOMATIONS ################ +#################################################################### + +- id: '1744503044813' + alias: Announce day camp preparation and pause TV + triggers: + - at: 08:25:00 + trigger: time + conditions: + - condition: time + weekday: + - mon + - tue + - wed + - thu + - fri + actions: + - condition: state + entity_id: binary_sensor.day_camp_today + state: 'on' + - target: + entity_id: media_player.hisense_g204x_cd41 + action: media_player.media_pause + data: {} + continue_on_error: true + - data: + message: 'Time to prepare for day camp. Please do the following: Fill water bottles, put on deodorant, brush teeth, and Jordyn, brush your hair.' + targets: + - media_player.living_room + - media_player.declan_s_room + - media_player.jordyn_s_room + - media_player.kitchen + action: script.family_announcement + mode: single + + +- id: '1744503044814' + alias: Announce time to leave for day camp and turn off TV + triggers: + - at: 08:40:00 + trigger: time + conditions: + - condition: time + weekday: + - mon + - tue + - wed + - thu + - fri + actions: + - condition: state + entity_id: binary_sensor.day_camp_today + state: 'on' + - 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: + 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.' + targets: + - media_player.living_room + action: script.family_announcement + - target: + entity_id: media_player.hisense_g204x_cd41 + action: media_player.turn_off + data: {} + continue_on_error: true + mode: single + + diff --git a/automations/04_kids_and_announcements/04b_declan_automations.yaml b/automations/04_kids_and_announcements/04b_declan_automations.yaml new file mode 100644 index 0000000..006f4b0 --- /dev/null +++ b/automations/04_kids_and_announcements/04b_declan_automations.yaml @@ -0,0 +1,103 @@ +################################################################### +################ DECLAN'S ALARMS AND ANNOUNCEMENTS ################ +################################################################### + +- id: '1788133654306' + alias: Declan - Non-school day afternoon medication reminder + description: Remind Declan to take his medicine at 2 PM on non-school days. + triggers: + - trigger: time + at: '14:00:00' + conditions: + - condition: state + entity_id: binary_sensor.blackhawk_school_day + state: 'off' + actions: + - action: script.family_announcement + continue_on_error: true + data: + message: Declan, this is your reminder to take your afternoon medicine. + targets: + - media_player.living_room + - media_player.declan_s_room + - action: script.notify_events_alerts + data: + title: Declan medication reminder + message: Declan's afternoon medicine reminder. + mode: single + + +- id: '1788133654301' + alias: Declan - School Prep Announcement + description: '' + triggers: + - at: 07:20:00 + trigger: time + conditions: + - condition: time + weekday: + - mon + - tue + - wed + - thu + - fri + - condition: state + entity_id: binary_sensor.blackhawk_school_day + state: 'on' + - condition: state + entity_id: binary_sensor.day_camp_today + state: 'off' + actions: + - target: + entity_id: media_player.hisense_g204x_cd41 + action: media_player.media_pause + data: {} + continue_on_error: true + - data: + message: Declan this is your reminder to pack your snack and fill your water bottle. + targets: + - media_player.living_room + - media_player.declan_s_room + - media_player.kitchen + - media_player.dinning_room + action: script.family_announcement + mode: single + + +- id: '1788133654302' + alias: Declan - Time for School Announcement + description: '' + triggers: + - at: 07:38:00 + trigger: time + conditions: + - condition: time + weekday: + - mon + - tue + - wed + - thu + - fri + - condition: state + entity_id: binary_sensor.blackhawk_school_day + state: 'on' + - condition: state + entity_id: binary_sensor.day_camp_today + state: 'off' + actions: + - target: + entity_id: media_player.hisense_g204x_cd41 + action: media_player.turn_off + data: {} + continue_on_error: true + - data: + message: Time for school! Last call to get your water bottle, snack, and put on your shoes. Good luck, have fun, don't die!! + targets: + - media_player.living_room + - media_player.declan_s_room + - media_player.kitchen + - media_player.dinning_room + action: script.family_announcement + mode: single + + diff --git a/automations/04_kids_and_announcements/04c_jordyn_automations.yaml b/automations/04_kids_and_announcements/04c_jordyn_automations.yaml new file mode 100644 index 0000000..241cd68 --- /dev/null +++ b/automations/04_kids_and_announcements/04c_jordyn_automations.yaml @@ -0,0 +1,373 @@ +################################################################# +############## JORDYN'S ALARMS AND ANNOUNCEMENTS ################ +################################################################# + +- id: '1788133651043' + alias: Set Jordyns announcement speaker to volume 6 + description: Set Jordyn’s speaker to volume 6 before Tuesday OT reminders. + triggers: + - trigger: time + at: '07:35:00' + conditions: + - condition: time + weekday: + - tue + actions: + - action: media_player.volume_set + target: + entity_id: + - media_player.jordyn_s_room + data: + volume_level: 0.6 + mode: single + +################################################### +############### JORDYN'S OT ALARMS ################ +################################################### + +- id: '1743380000904' + alias: Jordyn - OT Wake Up Calls + description: Tuesday wake-up calls at 07:40, 07:43 and 07:46, each with its own message. + triggers: + - trigger: time + at: 07:40:00 + id: first + - trigger: time + at: 07:43:00 + id: second + - trigger: time + at: 07:46:00 + id: third + conditions: + - condition: time + weekday: + - tue + actions: + - variables: + messages: + first: Jordyn, time to wake up and get out of bed for OT! Get dressed, put on deodorant, brush your teeth, and brush your hair. You got this! + second: Jordyn, you need to wake up and get out of bed for OT! Get dressed, put on deodorant, brush your teeth, and brush your hair. You got this! + third: Jordyn, get out of bed! Move! Move! Move! Move! Get dressed, put on deodorant, brush your teeth, and brush your hair. You got this! + - condition: template + value_template: '{{ trigger is defined and trigger.id in messages }}' + - action: script.family_announcement + data: + targets: + - media_player.jordyn_s_room + message: '{{ messages[trigger.id] }}' + mode: queued + +- id: '1788133654305' + alias: Jordyn - School and OT Prep Announcement + description: '' + triggers: + - at: 07:50:00 + trigger: time + conditions: + - condition: time + weekday: + - tue + actions: + - target: + entity_id: media_player.hisense_g204x_cd41 + action: media_player.media_pause + data: {} + continue_on_error: true + - data: + message: Jordyn, you have OT today. This is your reminder to take your medicine if you haven't, pack your snack and fill your water bottle. Please make sure your hair is brushed nicely. + targets: + - media_player.living_room + - media_player.jordyn_s_room + - media_player.kitchen + - media_player.dinning_room + - media_player.family_room_show + action: script.family_announcement + mode: single + + +- id: '1756211851043' + alias: Jordyn - Time for OT & School Announcement + description: '' + triggers: + - at: 08:13:00 + trigger: time + conditions: + - condition: time + weekday: + - tue + actions: + - target: + entity_id: media_player.hisense_g204x_cd41 + action: media_player.turn_off + data: {} + continue_on_error: true + - data: + message: Time to head out for OT{{ ' and school' if is_state('binary_sensor.blackhawk_school_day', 'on') else '' }}! Last call to quickly get your water bottle, snack, and put on your shoes. Good luck, have fun, don't die!! + targets: + - media_player.living_room + - media_player.jordyn_s_room + - media_player.kitchen + - media_player.dinning_room + action: script.family_announcement + mode: single + + +################################################# +############### JORDYN'S SCHOOL ALARMS ########## +################################################# + +- id: '1756211568290' + alias: Jordyn - School Prep Announcement + description: '' + triggers: + - at: 08:25:00 + trigger: time + conditions: + - condition: or + conditions: + - condition: time + weekday: + - wed + - condition: and + conditions: + - condition: time + weekday: + - mon + - condition: template + value_template: '{{ is_state(''binary_sensor.girls_at_home'', ''on'') }}' + - condition: state + entity_id: binary_sensor.blackhawk_school_day + state: 'on' + - condition: state + entity_id: binary_sensor.day_camp_today + state: 'off' + actions: + - target: + entity_id: media_player.hisense_g204x_cd41 + action: media_player.media_pause + data: {} + continue_on_error: true + - data: + message: Jordyn this is your reminder to take your medicine if you haven't, pack your snack and fill your water bottle. Please make sure your hair is brushed nicely. + targets: + - media_player.living_room + - media_player.jordyn_s_room + - media_player.kitchen + - media_player.dinning_room + action: script.family_announcement + mode: single + + +- id: '1788131534302' + alias: Jordyn - Time for School Announcement + description: '' + triggers: + - at: 08:41:00 + trigger: time + conditions: + - condition: or + conditions: + - condition: time + weekday: + - wed + - condition: and + conditions: + - condition: time + weekday: + - mon + - condition: template + value_template: '{{ is_state(''binary_sensor.girls_at_home'', ''on'') }}' + - condition: state + entity_id: binary_sensor.blackhawk_school_day + state: 'on' + - condition: state + entity_id: binary_sensor.day_camp_today + state: 'off' + actions: + - target: + entity_id: media_player.hisense_g204x_cd41 + action: media_player.turn_off + data: {} + continue_on_error: true + - data: + message: Time for school! Last call to get your water bottle, snack, and put on your shoes. Good luck, have fun, don't die!! + targets: + - media_player.living_room + - media_player.jordyn_s_room + - media_player.kitchen + - media_player.dinning_room + - media_player.family_room_show + action: script.family_announcement + mode: single + + +################################################## +############### JORDYN'S BEDTIME ALARMS ########## +################################################## + +- id: '1788133654304' + alias: Jordyn-Bedtime-Snack-Notification-Weekend + description: Triggers an Alexa notification at 8:30 PM if the Google Calendar event + is 'Girls at Home' + triggers: + - at: '20:30:00' + trigger: time + enabled: true + conditions: + - condition: time + weekday: + - fri + - sat + - condition: state + entity_id: binary_sensor.girls_at_home + state: 'on' + actions: + - data: + message: Jordyn, time to put away screens and get a bedtime snack. + action: notify.alexa_media_living_room + mode: single + +- id: '1743381226135' + alias: Jordyn-Bedtime-Snack-Notification + description: Triggers an Alexa notification at 8 PM if the Google Family Calendar + event is 'Girls at Home' + triggers: + - trigger: time + at: '20:00:00' + enabled: true + conditions: + - condition: time + weekday: + - sun + - mon + - tue + - wed + - condition: state + entity_id: binary_sensor.girls_at_home + state: 'on' + actions: + - target: + entity_id: + - media_player.living_room + - media_player.jordyn_s_room + - media_player.dinning_room + data: + media: + media_content_id: Jordyn Weekday Bedtime Routine + media_content_type: routine + metadata: {} + action: media_player.play_media + mode: single + +- id: '1743311126135' + alias: Jordyn - Bedtime Ten Minute Warning + description: Warn at 19:50 on Sun-Wed or 20:20 on Fri-Sat while Girls at Home is active. + triggers: + - trigger: time + at: '19:50:00' + id: weekday + - trigger: time + at: '20:20:00' + id: weekend + conditions: + - condition: state + entity_id: binary_sensor.girls_at_home + state: 'on' + - condition: or + conditions: + - condition: and + conditions: + - condition: trigger + id: weekday + - condition: time + weekday: + - sun + - mon + - tue + - wed + - condition: and + conditions: + - condition: trigger + id: weekend + - condition: time + weekday: + - fri + - sat + actions: + - action: script.family_announcement + data: + message: Jordyn - ten minutes left until it's time to put away screens and get a bedtime snack. + targets: + - media_player.living_room + - media_player.dinning_room + mode: single + +- id: '1743385356527' + alias: Jordyn’s Light on at 7:30PM + description: '' + triggers: + - trigger: time + at: '19:30:00' + conditions: + - condition: time + weekday: + - mon + - tue + actions: + - type: turn_on + device_id: ef731a5e6e666bf4fc20cc321f596029 + entity_id: 9629035816fddf7de8926e4e4c29aa34 + domain: switch + mode: single + +- id: '1743385432089' + alias: Jordyn’s light on weekend + description: '' + triggers: + - trigger: time + at: '19:30:00' + conditions: + - condition: and + conditions: + - condition: time + weekday: + - fri + - sat + - sun + - condition: state + entity_id: binary_sensor.girls_at_home + state: 'on' + actions: + - type: turn_on + device_id: ef731a5e6e666bf4fc20cc321f596029 + entity_id: 9629035816fddf7de8926e4e4c29aa34 + domain: switch + mode: single + +- id: '1739970910638' + alias: 10PM Turn Jordyn's Lamp Off + description: '' + triggers: + - trigger: time + at: '22:00:00' + conditions: [] + actions: + - type: turn_off + device_id: ef731a5e6e666bf4fc20cc321f596029 + entity_id: 9629035816fddf7de8926e4e4c29aa34 + domain: switch + mode: single + +# - id: '1744560941050' +# alias: Jordyn’s Lamp on at 730 +# description: '' +# triggers: +# - trigger: time +# at: '19:30:00' +# conditions: [] +# actions: +# - type: turn_on +# device_id: ef731a5e6e666bf4fc20cc321f596029 +# entity_id: 9629035816fddf7de8926e4e4c29aa34 +# domain: switch +# mode: single \ No newline at end of file diff --git a/automations/04_kids_and_announcements/04d_kids_schedule_automations.yaml b/automations/04_kids_and_announcements/04d_kids_schedule_automations.yaml new file mode 100644 index 0000000..090894e --- /dev/null +++ b/automations/04_kids_and_announcements/04d_kids_schedule_automations.yaml @@ -0,0 +1,75 @@ +- id: '1744503044809' + alias: Daily Alexa Announcements for Kids + description: Weekday summer routine on days with no camp; messages use stable trigger IDs. + triggers: + - trigger: time + at: 08:00:00 + id: breakfast + - trigger: time + at: 09:00:00 + id: morning_play + - trigger: time + at: '10:00:00' + id: snack + - trigger: time + at: '10:15:00' + id: quiet_play + - trigger: time + at: '11:00:00' + id: creative + - trigger: time + at: '12:00:00' + id: lunch + - trigger: time + at: '12:30:00' + id: chores + - trigger: time + at: '13:00:00' + id: tv_break + - trigger: time + at: '13:30:00' + id: reading + - trigger: time + at: '14:00:00' + id: movement + - trigger: time + at: '14:30:00' + id: relax + conditions: + - condition: state + entity_id: binary_sensor.kids_summer_schedule_day + state: 'on' + - condition: state + entity_id: binary_sensor.day_camp_today + state: 'off' + actions: + - variables: + messages: + breakfast: Time for breakfast and a little TV! + morning_play: Outside play time! If it’s bad weather, do your learning activities inside. + snack: Snack time! + quiet_play: Time for quiet play or outside fun. + creative: Creative time! Draw, color, or write something cool! + lunch: Lunch time! Wash up and head to the table. + chores: Happy Helper Time! Do your chores like a champ! + tv_break: TV break — relax and enjoy. + reading: Time to read a book or listen to a story. + movement: Let’s move! Try a Minecraft brain break! + relax: Time to relax with mindfulness or yoga. + - condition: template + value_template: '{{ trigger is defined and trigger.id in messages }}' + - action: script.family_announcement + data: + message: '{{ messages[trigger.id] }}' + targets: + - media_player.living_room + - media_player.jordyn_s_room + - media_player.chloe_s_room + - media_player.declan_s_room + - media_player.kitchen + delivery: + type: announce + method: all + mode: queued + + diff --git a/automations/05_printers_and_workshop.yaml b/automations/05_printers_and_workshop.yaml index 2161d2b..bbbdd3f 100644 --- a/automations/05_printers_and_workshop.yaml +++ b/automations/05_printers_and_workshop.yaml @@ -19,16 +19,16 @@ notification_service: notify.mobile_app_joshuas_iphone_of_pain - id: '1767118574570' alias: Centauri Carbon Status Updates - description: '' + description: Centauri Carbon progress notifications; intentionally disabled at startup. initial_state: false use_blueprint: path: danielcherubini/elegoo_printer_progress.yaml input: - error_status_reason_entity: sensor.saturn_iv_error_status_reason + error_status_reason_entity: sensor.centauri_carbon_error_status_reason notify_device: eabafa43fa1148e4facc8e5a4151958d - current_status_entity: sensor.saturn_iv_current_status - print_status_entity: sensor.saturn_iv_print_status - percent_complete_entity: sensor.saturn_iv_percent_complete + current_status_entity: sensor.centauri_carbon_current_status + print_status_entity: sensor.centauri_carbon_print_status + percent_complete_entity: sensor.centauri_carbon_percent_complete - id: '1767118623336' alias: Saturn Status Notifications description: '' @@ -42,39 +42,51 @@ notify_device: eabafa43fa1148e4facc8e5a4151958d enable_status_notifications: false - id: '1767120051057' - alias: Turn off Heater and Exhaust Fan after Resin Print - description: '' + alias: Turn off Resin Heater after Print + description: >- + Turn off the heater five minutes after a terminal print status. Any status + change cancels the pending shutoff; busy or unavailable printers never pass + the shutdown check. Exhaust fan control is disabled pending replacement. triggers: - trigger: state entity_id: - sensor.saturn_iv_print_status - from: null - to: - - complete + - sensor.saturn_iv_current_status + to: null + - trigger: homeassistant + event: start + - trigger: event + event_type: automation_reloaded conditions: [] actions: + - condition: template + value_template: >- + {{ states('sensor.saturn_iv_print_status') + in ['complete', 'completed', 'finish', 'idle', 'failed', 'cancelled', 'canceled', 'stopped'] + and states('sensor.saturn_iv_current_status') + in ['idle', 'complete', 'completed', 'finish', 'stopped'] }} - delay: - hours: 0 minutes: 5 - seconds: 0 - milliseconds: 0 + - condition: template + value_template: >- + {{ states('sensor.saturn_iv_print_status') + in ['complete', 'completed', 'finish', 'idle', 'failed', 'cancelled', 'canceled', 'stopped'] + and states('sensor.saturn_iv_current_status') + in ['idle', 'complete', 'completed', 'finish', 'stopped'] }} - type: turn_off device_id: fc9f0c9a71eaa4bd6aa14417425f61cb entity_id: a91e4bedcc7c5d57563d88bd58d67c9c domain: switch - - delay: - hours: 0 - minutes: 5 - seconds: 0 - milliseconds: 0 - type: turn_off device_id: 1b1350195291ecd20cf7c69604c09699 entity_id: 74c861175e7d5036c2253583f59d1100 domain: switch - mode: single + enabled: false + mode: restart - id: '1767816737180' alias: Saturn 4 Complete Notification - description: '' + description: Disabled because the Saturn progress blueprint already sends completion notifications. + initial_state: false triggers: - trigger: state entity_id: @@ -118,6 +130,7 @@ data: color_temp_kelvin: 6500 brightness_pct: 100 + effect: None mode: single - id: '1770938581699' alias: D’s turd flinger Light on during print @@ -223,7 +236,7 @@ - 255 - 0 - 0 - effect: Flash + effect: Red Flash brightness_pct: 100 - type: turn_off device_id: d174bbc498cde1d02e455cb133c04675 @@ -271,12 +284,16 @@ mode: single - id: '1770944373316' alias: Constipation-Orion-Light-Off-Print-Finishes - description: '' + description: Turn the chamber light off after a completed or cancelled print. triggers: - device_id: 615a0b19447425670a6b61ec2343c791 domain: bambu_lab type: event_print_finished trigger: device + - device_id: 615a0b19447425670a6b61ec2343c791 + domain: bambu_lab + type: event_print_canceled + trigger: device conditions: [] actions: - action: light.turn_off @@ -302,7 +319,7 @@ conditions: - condition: template value_template: '{{ trigger.from_state is not none and trigger.from_state.state - in [''printing'',''running''] }}' + in [''printing'',''running'',''paused'',''pause'',''prepare'',''preparing''] }}' actions: - action: light.turn_off metadata: {} @@ -362,7 +379,8 @@ mode: single - id: '1772979000001' alias: Constipation-Orion 80mm Exhaust Fan On During Print - description: '' + description: Disabled pending replacement exhaust fan control. + initial_state: false triggers: - trigger: device device_id: 615a0b19447425670a6b61ec2343c791 @@ -376,7 +394,8 @@ mode: single - id: '1772979000002' alias: Turn Off 80mm Exhaust Fan 15 Minutes After Constipation-Orion Print Finishes - description: '' + description: Disabled pending replacement exhaust fan control. + initial_state: false triggers: - trigger: device device_id: 615a0b19447425670a6b61ec2343c791 @@ -404,8 +423,8 @@ mode: restart - id: '1772979000003' alias: Prints Charming Or Printney Spears 120mm Exhaust Fan On During Print - description: 'Repaired by agent: replaced deleted Bambu device trigger with P1S - print_status entity trigger.' + description: Disabled pending replacement control for the shared exhaust fan. + initial_state: false triggers: - trigger: state entity_id: sensor.p1s_01p09c470102673_print_status @@ -420,8 +439,8 @@ mode: single - id: '1772979000004' alias: Turn Off 120mm Exhaust Fan 15 Minutes After Print Completion - description: 'Repaired by agent: replaced deleted Bambu device triggers with P1S - print_status entity trigger.' + description: Disabled pending replacement control for the shared exhaust fan. + initial_state: false triggers: - trigger: state entity_id: sensor.p1s_01p09c470102673_print_status diff --git a/automations/07_climate_and_plugs.yaml b/automations/07_climate_and_plugs.yaml index ef4f8bc..68a5413 100644 --- a/automations/07_climate_and_plugs.yaml +++ b/automations/07_climate_and_plugs.yaml @@ -2,83 +2,74 @@ - id: ac_controls_matter_plugs alias: AC controls Matter plugs - description: Turn the four Tapo Matter plugs on while the Ecobee is actively cooling, and off when cooling stops. + description: Reconcile each plug with current cooling activity after HVAC changes, startup, reload and plug recovery. Keep existing plug states if climate status is unknown. mode: restart triggers: - trigger: state entity_id: climate.meat_heater attribute: hvac_action - to: cooling - id: ac_on + to: null - trigger: state entity_id: climate.meat_heater - attribute: hvac_action - from: cooling - id: ac_off + to: null + - trigger: state + entity_id: + - switch.smart_wi_fi_plug + - switch.smart_wi_fi_plug_2 + - switch.smart_wi_fi_plug_3 + - switch.smart_wi_fi_plug_4 + to: null + - trigger: homeassistant + event: start + - trigger: event + event_type: automation_reloaded conditions: [] actions: - - choose: - - conditions: - - condition: trigger - id: ac_on + - condition: template + value_template: >- + {{ has_value('climate.meat_heater') + and (is_state('climate.meat_heater', 'off') + or state_attr('climate.meat_heater', 'hvac_action') + not in [none, 'unknown', 'unavailable', '']) }} + - variables: + desired_state: "{{ 'on' if is_state_attr('climate.meat_heater', 'hvac_action', 'cooling') and not is_state('climate.meat_heater', 'off') else 'off' }}" + - repeat: + for_each: + - switch.smart_wi_fi_plug + - switch.smart_wi_fi_plug_2 + - switch.smart_wi_fi_plug_3 + - switch.smart_wi_fi_plug_4 sequence: - - action: switch.turn_on - continue_on_error: true - target: - entity_id: - - switch.smart_wi_fi_plug - - switch.smart_wi_fi_plug_2 - - switch.smart_wi_fi_plug_3 - - switch.smart_wi_fi_plug_4 - - conditions: - - condition: trigger - id: ac_off - sequence: - - action: switch.turn_off - continue_on_error: true - target: - entity_id: - - switch.smart_wi_fi_plug - - switch.smart_wi_fi_plug_2 - - switch.smart_wi_fi_plug_3 - - switch.smart_wi_fi_plug_4 + - if: + - condition: template + value_template: "{{ has_value(repeat.item) and not is_state(repeat.item, desired_state) }}" + then: + - action: "{{ 'switch.turn_on' if desired_state == 'on' else 'switch.turn_off' }}" + continue_on_error: true + target: + entity_id: "{{ repeat.item }}" - id: dehumidifier_tank_full_shutoff alias: Dehumidifier Tank Full - Shut Off Parents Window Fan - description: When the dehumidifier tank level sensor detects water, turn off the Parents Window Fan outlet and send an alerts-channel notification. - mode: single - triggers: - - trigger: state - entity_id: binary_sensor.water_leak_sensor_moisture - to: 'on' - conditions: [] - actions: - - action: switch.turn_off - target: - entity_id: switch.parents_window_fan - - action: notify.notify_events_alerts - data: - + description: Keep the outlet off while wet and report whether shutdown was confirmed. + use_blueprint: + path: local/tank_full_interlock.yaml + input: + moisture_sensor: binary_sensor.water_leak_sensor_moisture + outlet: switch.parents_window_fan title: Dehumidifier tank is full - message: Dehumidifier tank is full — Dehumidifer outlet has been turned off. + equipment_name: Dehumidifier - id: ac_tank_full_shutoff alias: AC Tank Full - Shut Off Office AC Power - description: When the AC Tank Sensor detects water, turn off the Office AC Power outlet and send an alerts-channel notification. - mode: single - triggers: - - trigger: state - entity_id: binary_sensor.ac_tank_sensor_moisture - to: 'on' - conditions: [] - actions: - - action: switch.turn_off - target: - entity_id: switch.studio_plug_2 - - action: notify.notify_events_alerts - data: + description: Keep the outlet off while wet and report whether shutdown was confirmed. + use_blueprint: + path: local/tank_full_interlock.yaml + input: + moisture_sensor: binary_sensor.ac_tank_sensor_moisture + outlet: switch.studio_plug_2 title: AC tank is full - message: AC Tank Sensor detected water — Office AC Power outlet has been turned off. + equipment_name: Office AC - id: dehumidifier_tank_sensor_low_battery alias: Dehumidifier Tank Sensor Low Battery @@ -90,7 +81,7 @@ below: 10.1 conditions: [] actions: - - action: notify.notify_events_alerts + - action: script.notify_events_alerts data: title: Dehumidifier tank sensor battery low message: Dehumidifier tank level sensor battery is at {{ states('sensor.water_leak_sensor_battery') }}%. Replace soon. @@ -105,7 +96,7 @@ below: 10.1 conditions: [] actions: - - action: notify.notify_events_alerts + - action: script.notify_events_alerts data: title: AC tank sensor battery low message: AC Tank Sensor battery is at {{ states('sensor.ac_tank_sensor_battery') }}%. Replace soon. diff --git a/automations/07_climate_and_plugs.yaml.bak.20260808120620 b/automations/07_climate_and_plugs.yaml.bak.20260808120620 deleted file mode 100644 index e227ef3..0000000 --- a/automations/07_climate_and_plugs.yaml.bak.20260808120620 +++ /dev/null @@ -1,62 +0,0 @@ -# Climate and plug automations. - -- id: hermes_ac_controls_matter_plugs - alias: AC controls Matter plugs - description: Turn the four Tapo Matter plugs on while the Ecobee is actively cooling, and off when cooling stops. - mode: restart - triggers: - - trigger: state - entity_id: climate.meat_heater - attribute: hvac_action - to: cooling - id: ac_on - - trigger: state - entity_id: climate.meat_heater - attribute: hvac_action - from: cooling - id: ac_off - conditions: [] - actions: - - choose: - - conditions: - - condition: trigger - id: ac_on - sequence: - - action: switch.turn_on - continue_on_error: true - target: - entity_id: - - switch.smart_wi_fi_plug - - switch.smart_wi_fi_plug_2 - - switch.smart_wi_fi_plug_3 - - switch.smart_wi_fi_plug_4 - - conditions: - - condition: trigger - id: ac_off - sequence: - - action: switch.turn_off - continue_on_error: true - target: - entity_id: - - switch.smart_wi_fi_plug - - switch.smart_wi_fi_plug_2 - - switch.smart_wi_fi_plug_3 - - switch.smart_wi_fi_plug_4 - -- id: dehumidifier_tank_full_shutoff - alias: Dehumidifier Tank Full - Shut Off Parents Window Fan - description: When the dehumidifier tank level sensor detects water, turn off the Parents Window Fan outlet and send an alerts-channel notification. - mode: single - triggers: - - trigger: state - entity_id: binary_sensor.water_leak_sensor_moisture - to: 'on' - conditions: [] - actions: - - action: switch.turn_off - target: - entity_id: switch.parents_window_fan - - action: script.notify_events_alerts - data: - title: Dehumidifier tank is full - message: Dehumidifier tank is full — Parents Window Fan outlet has been turned off. diff --git a/automations/07_climate_and_plugs.yaml.bak.20260808120900 b/automations/07_climate_and_plugs.yaml.bak.20260808120900 deleted file mode 100644 index 39622b7..0000000 --- a/automations/07_climate_and_plugs.yaml.bak.20260808120900 +++ /dev/null @@ -1,62 +0,0 @@ -# Climate and plug automations. - -- id: hermes_ac_controls_matter_plugs - alias: AC controls Matter plugs - description: Turn the four Tapo Matter plugs on while the Ecobee is actively cooling, and off when cooling stops. - mode: restart - triggers: - - trigger: state - entity_id: climate.meat_heater - attribute: hvac_action - to: cooling - id: ac_on - - trigger: state - entity_id: climate.meat_heater - attribute: hvac_action - from: cooling - id: ac_off - conditions: [] - actions: - - choose: - - conditions: - - condition: trigger - id: ac_on - sequence: - - action: switch.turn_on - continue_on_error: true - target: - entity_id: - - switch.smart_wi_fi_plug - - switch.smart_wi_fi_plug_2 - - switch.smart_wi_fi_plug_3 - - switch.smart_wi_fi_plug_4 - - conditions: - - condition: trigger - id: ac_off - sequence: - - action: switch.turn_off - continue_on_error: true - target: - entity_id: - - switch.smart_wi_fi_plug - - switch.smart_wi_fi_plug_2 - - switch.smart_wi_fi_plug_3 - - switch.smart_wi_fi_plug_4 - -- id: dehumidifier_tank_full_shutoff - alias: Dehumidifier Tank Full - Shut Off Parents Window Fan - description: When the dehumidifier tank level sensor detects water, turn off the Parents Window Fan outlet and send an alerts-channel notification. - mode: single - triggers: - - trigger: state - entity_id: binary_sensor.water_leak_sensor_moisture - to: 'on' - conditions: [] - actions: - - action: switch.turn_off - target: - entity_id: switch.parents_window_fan - - action: notify.notify_events_alerts - data: - title: Dehumidifier tank is full - message: Dehumidifier tank is full — Parents Window Fan outlet has been turned off. diff --git a/automations/08_alexa_automations.yaml b/automations/08_alexa_automations.yaml new file mode 100644 index 0000000..d958e7f --- /dev/null +++ b/automations/08_alexa_automations.yaml @@ -0,0 +1,109 @@ +- id: '1744503044129' + alias: Set Alexa Announcement Volume + description: Set Alexa announcement volume for structured daily routine + triggers: + - at: 08:15:00 + trigger: time + conditions: + - condition: time + weekday: + - mon + - tue + - wed + - thu + - fri + - condition: state + entity_id: binary_sensor.day_camp_today + state: 'on' + actions: + - data: + media: + media_content_id: Set kids speakers to 6 + media_content_type: routine + metadata: {} + action: media_player.play_media + target: + device_id: 7c55da01c1d0e4ee7900852bb7621b1e + mode: single + +- id: '1788133654303' + alias: Set weekday announcement speakers to volume 5 + description: Set the school-announcement speakers to volume level 5 each weekday. + triggers: + - trigger: time + at: '07:10:00' + conditions: + - condition: time + weekday: + - mon + - tue + - wed + - thu + - fri + - condition: state + entity_id: binary_sensor.blackhawk_school_day + state: 'on' + actions: + - action: media_player.volume_set + target: + entity_id: + - media_player.family_room_show + - media_player.living_room + - media_player.kitchen + - media_player.dinning_room + - media_player.declan_s_room + data: + volume_level: 0.5 + 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 + condition: + - condition: time + weekday: + - mon + - tue + - wed + - thu + - fri + action: + - condition: state + entity_id: binary_sensor.day_camp_today + state: 'on' + - 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' + condition: + - condition: time + weekday: + - mon + - tue + - wed + - thu + - fri + action: + - condition: state + entity_id: binary_sensor.day_camp_today + state: 'off' + - 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 \ No newline at end of file diff --git a/blueprints/automation/local/litter_binary_notification.yaml b/blueprints/automation/local/litter_binary_notification.yaml new file mode 100644 index 0000000..8dd1bb0 --- /dev/null +++ b/blueprints/automation/local/litter_binary_notification.yaml @@ -0,0 +1,29 @@ +blueprint: + name: Litter box - binary alert notification + description: Notify the cats channel when a litter-box waste-bin or error flag turns on. + domain: automation + input: + alert_sensor: + name: Alert sensor + selector: + entity: + domain: binary_sensor + title: + name: Notification title + selector: + text: {} + message: + name: Notification message + selector: + text: {} +triggers: +- trigger: state + entity_id: !input alert_sensor + to: 'on' +conditions: [] +actions: +- action: notify.notify_events_cats + data: + title: !input title + message: !input message +mode: queued diff --git a/blueprints/automation/local/litter_low_notification.yaml b/blueprints/automation/local/litter_low_notification.yaml new file mode 100644 index 0000000..b017002 --- /dev/null +++ b/blueprints/automation/local/litter_low_notification.yaml @@ -0,0 +1,41 @@ +blueprint: + name: Litter level - low notification + description: Notify once after a numeric litter level stays at or below its threshold for two minutes. Refilling above the threshold rearms the alert. + domain: automation + input: + litter_sensor: + name: Litter level sensor + selector: + entity: + domain: sensor + threshold: + name: Low level threshold (inclusive) + default: 65 + selector: + number: + min: 0 + max: 100 + title: + name: Notification title + selector: + text: {} + message: + name: Notification message + selector: + text: {} +trigger_variables: + litter_sensor: !input litter_sensor + threshold: !input threshold +triggers: +- trigger: template + value_template: >- + {{ is_number(states(litter_sensor)) + and states(litter_sensor) | float(101) <= threshold | float(65) }} + for: '00:02:00' +conditions: [] +actions: +- action: notify.notify_events_cats + data: + title: !input title + message: !input message +mode: single diff --git a/blueprints/automation/local/tank_full_interlock.yaml b/blueprints/automation/local/tank_full_interlock.yaml new file mode 100644 index 0000000..dbe02ba --- /dev/null +++ b/blueprints/automation/local/tank_full_interlock.yaml @@ -0,0 +1,73 @@ +blueprint: + name: Tank full - outlet interlock and verified notification + description: >- + Request outlet shutdown when a tank is wet, including attempts to turn it + back on, startup and recovery. Verify the outlet reports off before claiming + success. Retry unconfirmed shutdowns every five minutes while wet. + domain: automation + input: + moisture_sensor: + name: Tank moisture sensor + selector: + entity: + domain: binary_sensor + outlet: + name: Protected outlet + selector: + entity: + domain: switch + title: + name: Alert title + selector: + text: {} + equipment_name: + name: Equipment name for the notification + selector: + text: {} +variables: + outlet: !input outlet + equipment_name: !input equipment_name +triggers: +- trigger: state + entity_id: !input moisture_sensor + to: 'on' + id: wet +- trigger: state + entity_id: !input outlet + to: 'on' + id: outlet_on +- trigger: homeassistant + event: start + id: startup +- trigger: event + event_type: automation_reloaded + id: reload +- trigger: time_pattern + minutes: '/5' + id: retry +conditions: +- condition: state + entity_id: !input moisture_sensor + state: 'on' +- condition: template + value_template: "{{ trigger.id != 'retry' or not is_state(outlet, 'off') }}" +actions: +- action: switch.turn_off + continue_on_error: true + target: + entity_id: !input outlet +- wait_template: "{{ is_state(outlet, 'off') }}" + timeout: '00:00:10' + continue_on_timeout: true +- action: script.notify_events_alerts + data: + title: !input title + message: >- + {{ equipment_name }} tank sensor detected water. + {% if is_state(outlet, 'off') %} + The outlet reports off. + {% else %} + Shutoff could not be confirmed (outlet state: {{ states(outlet) }}). + Check the equipment and outlet. + {% endif %} +mode: restart diff --git a/configuration.yaml b/configuration.yaml index d456467..bbb209f 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -28,6 +28,7 @@ lovelace: dashboards: !include dashboards/dashboards.yaml automation: !include_dir_merge_list automations/ +script: !include scripts.yaml scene: !include scenes.yaml input_boolean: !include helpers/input_boolean.yaml input_number: !include helpers/input_number.yaml diff --git a/esphome/led-controller-jordyn-a1.yaml b/esphome/led-controller-jordyn-a1.yaml index 35ea128..959c3c8 100644 --- a/esphome/led-controller-jordyn-a1.yaml +++ b/esphome/led-controller-jordyn-a1.yaml @@ -76,6 +76,17 @@ light: # Effects - you can enable these for more features! effects: + - strobe: + name: "Red Flash" + colors: + - state: true + brightness: 100% + red: 100% + green: 0% + blue: 0% + duration: 500ms + - state: false + duration: 250ms # Basic effects - random: name: "Random" diff --git a/packages/family_schedule.yaml b/packages/family_schedule.yaml new file mode 100644 index 0000000..c4593d1 --- /dev/null +++ b/packages/family_schedule.yaml @@ -0,0 +1,161 @@ +# School dates transcribed from the supplied Blackhawk 2026-2027 calendar. +# Early-dismissal days are school days. May 4-6 are closed for kindergarten +# only and are not excluded from the older children's schedule. +template: + # Fetch overlapping events together; calendar.message exposes only one event. + - triggers: + - trigger: homeassistant + event: start + - trigger: event + event_type: event_template_reloaded + - trigger: time + at: '00:00:00' + - trigger: time_pattern + minutes: '/15' + - trigger: state + entity_id: calendar.family_events + actions: + - variables: + requested_day: "{{ now().date().isoformat() }}" + agenda: {} + - action: calendar.get_events + continue_on_error: true + target: + entity_id: calendar.family_events + data: + start_date_time: "{{ today_at('00:00') }}" + end_date_time: "{{ today_at('00:00') + timedelta(days=1) }}" + response_variable: agenda + - condition: template + value_template: >- + {{ agenda is defined and agenda is mapping + and 'calendar.family_events' in agenda + and 'events' in agenda['calendar.family_events'] }} + sensor: + - name: Family Day Events + unique_id: family_day_events + state: "{{ requested_day }}" + attributes: + refreshed_at: "{{ now().isoformat() }}" + events: "{{ agenda['calendar.family_events']['events'] }}" + + - binary_sensor: + - name: Family Schedule Ready + unique_id: family_schedule_ready + state: >- + {{ has_value('calendar.family_events') + and is_state('sensor.family_day_events', now().date().isoformat()) + and as_timestamp(now()) + - as_timestamp(state_attr('sensor.family_day_events', 'refreshed_at'), 0) < 1200 }} + + - name: Day Camp Today + unique_id: family_day_camp_today + availability: "{{ is_state('binary_sensor.family_schedule_ready', 'on') }}" + state: >- + {% set ns = namespace(camp=false) %} + {% for event in state_attr('sensor.family_day_events', 'events') or [] %} + {% set summary = event.summary | default('', true) | lower %} + {% if summary | regex_search('\\bcamp\\b') + and not summary | regex_search('\\b(no|cancelled|canceled)\\s+(day\\s+)?camp\\b|\\bcamp\\s+(is\\s+)?(cancelled|canceled)\\b') %} + {% set ns.camp = true %} + {% endif %} + {% endfor %} + {{ ns.camp }} + + - name: Family No School Today + unique_id: family_no_school_today + availability: "{{ is_state('binary_sensor.family_schedule_ready', 'on') }}" + state: >- + {% set ns = namespace(no_school=false) %} + {% for event in state_attr('sensor.family_day_events', 'events') or [] %} + {% set summary = event.summary | default('', true) | lower %} + {% if summary | regex_search('\\b(no school|school closed|snow day)\\b') %} + {% set ns.no_school = true %} + {% endif %} + {% endfor %} + {{ ns.no_school }} + + - name: Girls At Home + unique_id: family_girls_at_home + availability: "{{ is_state('binary_sensor.family_schedule_ready', 'on') }}" + state: >- + {% set ns = namespace(home=false) %} + {% for event in state_attr('sensor.family_day_events', 'events') or [] %} + {% if event.summary | default('', true) | trim | lower == 'girls at home' %} + {% set start = as_datetime(event.start | default(''), none) %} + {% set end = as_datetime(event.end | default(''), none) %} + {% if start is not none and end is not none %} + {# All-day dates have no timezone; interpret them as local dates. #} + {% if start.tzinfo is none %} + {% set start = start.replace(tzinfo=now().tzinfo) %} + {% endif %} + {% if end.tzinfo is none %} + {% set end = end.replace(tzinfo=now().tzinfo) %} + {% endif %} + {% if start <= now() < end %} + {% set ns.home = true %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {{ ns.home }} + + - name: Blackhawk Scheduled School Day + unique_id: blackhawk_scheduled_school_day + # Do not silently extend an old district calendar into a new school year. + availability: >- + {{ '2026-08-01' <= now().date().isoformat() <= '2027-07-31' }} + state: >- + {% set day = now().date().isoformat() %} + {% set closed = [ + '2026-09-07', '2026-10-12', '2026-11-11', + '2026-11-24', '2026-11-25', '2026-11-26', '2026-11-27', '2026-11-30', + '2026-12-23', '2026-12-24', '2026-12-25', + '2026-12-28', '2026-12-29', '2026-12-30', '2026-12-31', + '2027-01-01', '2027-01-18', '2027-02-15', + '2027-03-25', '2027-03-26', '2027-03-29', '2027-05-07' + ] %} + {{ '2026-08-19' <= day <= '2027-05-27' + and now().weekday() < 5 and day not in closed }} + attributes: + school_year: '2026-2027' + first_day: '2026-08-19' + last_day: '2027-05-27' + calendar_valid_until: '2027-07-31' + + - name: Blackhawk School Day + unique_id: blackhawk_school_day + # Scheduled closures remain known even if the family calendar is down. + # On regular school days, require fresh data for snow-day overrides. + availability: >- + {{ has_value('binary_sensor.blackhawk_scheduled_school_day') + and (is_state('binary_sensor.blackhawk_scheduled_school_day', 'off') + or has_value('binary_sensor.family_no_school_today')) }} + state: >- + {{ is_state('binary_sensor.blackhawk_scheduled_school_day', 'on') + and is_state('binary_sensor.family_no_school_today', 'off') }} + + - name: Kids Summer Schedule Day + unique_id: kids_summer_schedule_day + availability: "{{ has_value('binary_sensor.blackhawk_school_day') }}" + state: >- + {% set day = now().date().isoformat() %} + {{ now().weekday() < 5 + and ('2026-08-01' <= day < '2026-08-19' + or '2027-05-27' < day <= '2027-07-31') }} + +automation: + - id: family_schedule_sync_legacy_camp_helper + alias: Family Schedule - Sync Day Camp Helper + description: Keep the existing camp helper compatible with the shared calendar sensor. + triggers: + - trigger: state + entity_id: binary_sensor.day_camp_today + to: + - 'on' + - 'off' + actions: + - action: "{{ 'input_boolean.turn_on' if is_state('binary_sensor.day_camp_today', 'on') else 'input_boolean.turn_off' }}" + target: + entity_id: input_boolean.day_camp_today + mode: restart diff --git a/scripts.yaml b/scripts.yaml index c226a92..df76ad4 100644 --- a/scripts.yaml +++ b/scripts.yaml @@ -1,13 +1,13 @@ check_day_camp: alias: Check Day Camp sequence: + - condition: template + value_template: "{{ has_value('binary_sensor.day_camp_today') }}" - choose: - conditions: - - condition: template - value_template: >- - {{ states('calendar.family_events') == 'on' and - 'camp' in (state_attr('calendar.family_events', 'message') | lower) and - 'no' not in (state_attr('calendar.family_events', 'message') | lower) }} + - condition: state + entity_id: binary_sensor.day_camp_today + state: 'on' sequence: - service: input_boolean.turn_on target: @@ -17,16 +17,12 @@ check_day_camp: target: entity_id: input_boolean.day_camp_today - - service: system_log.write - data: - message: > - Calendar Check: State={{ states('calendar.family_events') }}, - Message={{ state_attr('calendar.family_events', 'message') - | default('') }} - level: debug + mode: restart notify_events_alerts: alias: Notify.Events Alerts + mode: queued + max: 20 fields: message: required: true @@ -42,3 +38,30 @@ notify_events_alerts: title: "{{ title | default('Home Assistant') }}" data: token: !secret notify_event_alerts_token + +family_announcement: + alias: Family Announcement + description: Deliver family announcements in order, with common Alexa settings. + mode: queued + max: 20 + fields: + targets: + required: true + selector: + entity: + domain: media_player + multiple: true + message: + required: true + selector: + text: {} + delivery: + description: Optional Alexa delivery options, such as type and method. + selector: + object: {} + sequence: + - action: notify.alexa_media + data: + target: "{{ targets }}" + message: "{{ message }}" + data: "{{ delivery | default({}) }}"