diff --git a/automations/01_home_and_lighting.yaml b/automations/01_home_and_lighting.yaml deleted file mode 100644 index b63cd03..0000000 --- a/automations/01_home_and_lighting.yaml +++ /dev/null @@ -1 +0,0 @@ -# Home and lighting automations. diff --git a/automations/02_alerts_and_notifications.yaml b/automations/02_alerts_and_notifications/02a_litter_box_alerts.yaml similarity index 90% rename from automations/02_alerts_and_notifications.yaml rename to automations/02_alerts_and_notifications/02a_litter_box_alerts.yaml index 532fab8..b492044 100644 --- a/automations/02_alerts_and_notifications.yaml +++ b/automations/02_alerts_and_notifications/02a_litter_box_alerts.yaml @@ -1,59 +1,42 @@ -# 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: Alert at or below 65 after two minutes; refill above 65 rearms the alert. +- id: '1742842372471' + alias: The Poop Box has runneth over Notification + description: Notify when the litter-box alert flag turns on. use_blueprint: - path: local/litter_low_notification.yaml + path: local/litter_binary_notification.yaml input: - litter_sensor: sensor.the_deuce_litter_level - threshold: 65 - title: The Deuce's Litter is Low - message: The Deuce's Litter is Low + alert_sensor: binary_sensor.poop_box_wastebin_filled + title: The poop box is bursting!! + message: The Poop Box has runneth over (basement, left side) -- id: '1742841709247' - alias: Triple Threat Litter Level Notification - description: Alert at or below 65 after two minutes; refill above 65 rearms the alert. +- id: '1742842458817' + alias: Triple Threat Full Notification + description: Notify when the litter-box alert flag turns on. use_blueprint: - path: local/litter_low_notification.yaml + path: local/litter_binary_notification.yaml input: - litter_sensor: sensor.triple_threat_litter_level - threshold: 65 - title: Triple Threat's Litter is Low - message: Triple Threat's Litter is Low + alert_sensor: binary_sensor.triple_threat_wastebin_filled + title: Triple Threat can't take no more! + 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. + 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 + 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. + 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 + message: Luma Smart Litter Box has a door error - id: '1742841764585' alias: Cat Crapper 3000 Low Litter Level Notification @@ -97,42 +80,43 @@ title: Too many dueces have been dropped! message: The Deuce is full of deuces (laundry room) -- id: '1742842372471' - alias: The Poop Box has runneth over Notification - 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!! - message: The Poop Box has runneth over (basement, left side) +- 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: '1742842458817' - alias: Triple Threat Full Notification - description: Notify when the litter-box alert flag turns on. +- id: '1742841650033' + alias: The Deuce Litter Level + description: Alert at or below 65 after two minutes; refill above 65 rearms the alert. use_blueprint: - path: local/litter_binary_notification.yaml + path: local/litter_low_notification.yaml input: - alert_sensor: binary_sensor.triple_threat_wastebin_filled - title: Triple Threat can't take no more! - message: Triple Threat can't take no more! (Basement, right side) + litter_sensor: sensor.the_deuce_litter_level + threshold: 65 + title: The Deuce's Litter is Low + message: The Deuce's Litter is Low -- id: '1782932601001' - alias: Luma Smart Litter Box Waste Bin Full Notification - description: Notify when the Petlibro Luma Smart Litter Box waste bin is full. +- id: '1742841709247' + alias: Triple Threat Litter Level Notification + description: Alert at or below 65 after two minutes; refill above 65 rearms the alert. use_blueprint: - path: local/litter_binary_notification.yaml + path: local/litter_low_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 - message: Luma Smart Litter Box is full of crap + litter_sensor: sensor.triple_threat_litter_level + threshold: 65 + title: Triple Threat's Litter is Low + message: Triple Threat's Litter is Low -- id: '1782932601004' - alias: Luma Smart Litter Box Door Error Notification - description: Notify when the Petlibro Luma Smart Litter Box reports 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 - message: Luma Smart Litter Box has a door error diff --git a/automations/02_alerts_and_notifications/02b_battery_alerts.yaml b/automations/02_alerts_and_notifications/02b_battery_alerts.yaml new file mode 100644 index 0000000..95dec25 --- /dev/null +++ b/automations/02_alerts_and_notifications/02b_battery_alerts.yaml @@ -0,0 +1,15 @@ +- 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 \ No newline at end of file diff --git a/automations/03_presence_and_security.yaml b/automations/03_presence_and_security.yaml deleted file mode 100644 index 52e5a42..0000000 --- a/automations/03_presence_and_security.yaml +++ /dev/null @@ -1,88 +0,0 @@ -# One controller owns the Blink group and its cameras' motion detection. -- id: '1758196295864' - 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: 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: - - 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/03_presence_and_security/03a_presence_and_security.yaml b/automations/03_presence_and_security/03a_presence_and_security.yaml new file mode 100644 index 0000000..3058a76 --- /dev/null +++ b/automations/03_presence_and_security/03a_presence_and_security.yaml @@ -0,0 +1,88 @@ +# # One controller owns the Blink group and its cameras' motion detection. +# - id: '1758196295864' +# 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: 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: +# - 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/05_printers_and_workshop.yaml b/automations/05_printers_and_workshop/05a_fdm_printer_notifications.yaml similarity index 70% rename from automations/05_printers_and_workshop.yaml rename to automations/05_printers_and_workshop/05a_fdm_printer_notifications.yaml index 3138696..4c3cfaf 100644 --- a/automations/05_printers_and_workshop.yaml +++ b/automations/05_printers_and_workshop/05a_fdm_printer_notifications.yaml @@ -17,6 +17,9 @@ detection_frequency: /30 notification_settings: standard notification_service: notify.mobile_app_joshuas_iphone_of_pain + +### Status Notifications ### + - id: '1767118574570' alias: Centauri Carbon Status Updates description: Centauri Carbon progress notifications; intentionally disabled at startup. @@ -29,77 +32,9 @@ 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: '' - use_blueprint: - path: danielcherubini/elegoo_printer_progress.yaml - input: - percent_complete_entity: sensor.saturn_iv_percent_complete - print_status_entity: sensor.saturn_iv_print_status - current_status_entity: sensor.saturn_iv_current_status - error_status_reason_entity: sensor.saturn_iv_error_status_reason - notify_device: eabafa43fa1148e4facc8e5a4151958d - enable_status_notifications: false -- id: '1767120051057' - 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 - - 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: - minutes: 5 - - 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 - - type: turn_off - device_id: 1b1350195291ecd20cf7c69604c09699 - entity_id: 74c861175e7d5036c2253583f59d1100 - domain: switch - enabled: false - mode: restart -- id: '1767816737180' - alias: Saturn 4 Complete Notification - description: Disabled because the Saturn progress blueprint already sends completion notifications. - initial_state: false - triggers: - - trigger: state - entity_id: - - sensor.saturn_iv_print_status - to: - - complete - conditions: [] - actions: - - action: notify.mobile_app_joshuas_iphone_of_pain - metadata: {} - data: - message: Saturn 4 print complete. - mode: single + +### Printer Light Automations ### + - id: '1770938475431' alias: Jordyn-A1-lights-on-during-print description: '' @@ -123,14 +58,6 @@ device_id: d174bbc498cde1d02e455cb133c04675 entity_id: 0736793ae0d143db76ea7c64d86f4268 domain: switch - - action: light.turn_on - metadata: {} - target: - entity_id: light.jordyn_s_led_controller_jordyn_s_led_controller - data: - color_temp_kelvin: 6500 - brightness_pct: 100 - effect: None mode: single - id: '1770938581699' alias: D’s turd flinger Light on during print @@ -151,7 +78,6 @@ target: entity_id: - light.a1_03919d540806387_chamber_light - - light.led_controller_polly_pocket_declan_s_led_controller data: color_temp_kelvin: 6500 brightness_pct: 100 @@ -206,48 +132,12 @@ target: entity_id: - light.a1_03919d540806387_chamber_light - - light.led_controller_polly_pocket_declan_s_led_controller data: {} - type: turn_off device_id: c63f4513655bdd5b44b998f45b491136 entity_id: fe6d0eee24eb1b397d37b7389137b5b5 domain: switch mode: single -- id: '1770943760193' - alias: Jordyn-A1-Flash-Red-When-Print-Error - description: '' - triggers: - - device_id: 6d6eebb0e8ea6f46ac2ec3a3a5a5eae3 - domain: bambu_lab - type: event_print_error - trigger: device - - device_id: 6d6eebb0e8ea6f46ac2ec3a3a5a5eae3 - domain: bambu_lab - type: event_print_failed - trigger: device - conditions: [] - actions: - - action: light.turn_on - metadata: {} - target: - entity_id: light.jordyn_s_led_controller_jordyn_s_led_controller - data: - rgb_color: - - 255 - - 0 - - 0 - effect: Red Flash - brightness_pct: 100 - - type: turn_off - device_id: d174bbc498cde1d02e455cb133c04675 - entity_id: 0736793ae0d143db76ea7c64d86f4268 - domain: switch - - action: light.turn_off - metadata: {} - target: - entity_id: light.jordyns_layer_slayer_chamber_light - data: {} - mode: single - id: '1770944104889' alias: Prints-Charming-Lights-On-Print-Started description: 'Repaired by agent: replaced deleted Bambu device trigger with P1S @@ -266,6 +156,31 @@ entity_id: light.p1s_01p09c470102673_chamber_light data: {} mode: single +- id: '1770944453024' + alias: Prints-Charming-Light-Off-Print-Completes + description: 'Repaired by agent: replaced deleted Bambu device trigger with P1S + print_status entity trigger.' + triggers: + - trigger: state + entity_id: sensor.p1s_01p09c470102673_print_status + to: + - finish + - complete + - completed + - idle + - failed + - cancelled + conditions: + - condition: template + value_template: '{{ trigger.from_state is not none and trigger.from_state.state + in [''printing'',''running'',''paused'',''pause'',''prepare'',''preparing''] }}' + actions: + - action: light.turn_off + metadata: {} + data: {} + target: + entity_id: light.p1s_01p09c470102673_chamber_light + mode: single - id: '1770944259063' alias: Constipation-Orion-Light-On-When-Print-Starts description: '' @@ -302,31 +217,6 @@ entity_id: light.constipation_orion_chamber_light data: {} mode: single -- id: '1770944453024' - alias: Prints-Charming-Light-Off-Print-Completes - description: 'Repaired by agent: replaced deleted Bambu device trigger with P1S - print_status entity trigger.' - triggers: - - trigger: state - entity_id: sensor.p1s_01p09c470102673_print_status - to: - - finish - - complete - - completed - - idle - - failed - - cancelled - conditions: - - condition: template - value_template: '{{ trigger.from_state is not none and trigger.from_state.state - in [''printing'',''running'',''paused'',''pause'',''prepare'',''preparing''] }}' - actions: - - action: light.turn_off - metadata: {} - data: {} - target: - entity_id: light.p1s_01p09c470102673_chamber_light - mode: single - id: '1771272500745' alias: polly-pocket-a1-mini-lights-on-during-print description: '' @@ -342,7 +232,6 @@ target: entity_id: - light.a1mini_0309ca580403653_chamber_light - - light.polly_s_led_controller_polly_s_led_controller data: color_temp_kelvin: 6500 brightness_pct: 100 @@ -370,13 +259,15 @@ target: entity_id: - light.a1mini_0309ca580403653_chamber_light - - light.polly_s_led_controller_polly_s_led_controller data: {} - type: turn_off device_id: a78c9554b983d1e2459194cc0fee22d3 entity_id: d430d19aa2f118038cb01a3157865ed0 domain: switch mode: single + +### Printer Exhaust Fan Control ### + - id: fdm_printer_exhaust_fans alias: FDM Printer Exhaust Fans During Prints description: >- @@ -432,4 +323,4 @@ and expand(printers) | selectattr('state', 'in', ['unknown', 'unavailable']) | list | count == 0 }} - action: switch.turn_off target: - entity_id: switch.studio_plug_2 + entity_id: switch.studio_plug_2 \ No newline at end of file diff --git a/automations/05_printers_and_workshop/05b_resin_printer_notifications.yaml b/automations/05_printers_and_workshop/05b_resin_printer_notifications.yaml new file mode 100644 index 0000000..8a1df7d --- /dev/null +++ b/automations/05_printers_and_workshop/05b_resin_printer_notifications.yaml @@ -0,0 +1,71 @@ +- id: '1767118623336' + alias: Saturn Status Notifications + description: '' + use_blueprint: + path: danielcherubini/elegoo_printer_progress.yaml + input: + percent_complete_entity: sensor.saturn_iv_percent_complete + print_status_entity: sensor.saturn_iv_print_status + current_status_entity: sensor.saturn_iv_current_status + error_status_reason_entity: sensor.saturn_iv_error_status_reason + notify_device: eabafa43fa1148e4facc8e5a4151958d + enable_status_notifications: false +- id: '1767120051057' + 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 + - 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: + minutes: 5 + - 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 + - type: turn_off + device_id: 1b1350195291ecd20cf7c69604c09699 + entity_id: 74c861175e7d5036c2253583f59d1100 + domain: switch + enabled: false + mode: restart +- id: '1767816737180' + alias: Saturn 4 Complete Notification + description: Disabled because the Saturn progress blueprint already sends completion notifications. + initial_state: false + triggers: + - trigger: state + entity_id: + - sensor.saturn_iv_print_status + to: + - complete + conditions: [] + actions: + - action: notify.mobile_app_joshuas_iphone_of_pain + metadata: {} + data: + message: Saturn 4 print complete. + mode: single \ No newline at end of file diff --git a/automations/06_dashboards_and_maintenance.yaml b/automations/06_dashboards_and_maintenance/06a_kiosk_dashboards.yaml similarity index 55% rename from automations/06_dashboards_and_maintenance.yaml rename to automations/06_dashboards_and_maintenance/06a_kiosk_dashboards.yaml index 47c5765..a0f17e0 100644 --- a/automations/06_dashboards_and_maintenance.yaml +++ b/automations/06_dashboards_and_maintenance/06a_kiosk_dashboards.yaml @@ -47,6 +47,7 @@ # data: # cycle: true # mode: single + # - id: '1772978826069' # alias: Kiosk Navigate Display # description: '' @@ -60,52 +61,3 @@ # path: /{{ states('input_select.kiosk_view') }} # action: browser_mod.navigate # mode: restart -# - id: '1774407470375' -# alias: ESPHome Fleet Update -# description: '' -# triggers: -# - at: 03:00:00 -# trigger: time -# - event_type: esphome_fleet_update_trigger -# trigger: event -# conditions: -# - condition: template -# value_template: "{{ expand(integration_entities('esphome'))\n | selectattr('entity_id',\ -# \ 'contains', 'update')\n | selectattr('state', 'eq', 'on')\n | list | count\ -# \ > 0 }}\n" -# actions: -# - variables: -# pending_devices: "{{ expand(integration_entities('esphome'))\n | selectattr('entity_id',\ -# \ 'contains', 'update')\n | selectattr('state', 'eq', 'on')\n | map(attribute='entity_id')\ -# \ | list }}\n" -# pending_names: "{{ expand(integration_entities('esphome'))\n | selectattr('entity_id',\ -# \ 'contains', 'update')\n | selectattr('state', 'eq', 'on')\n | map(attribute='name')\ -# \ | join(', ') }}\n" -# - action: notify.persistent_notification -# data: -# title: ESPHome Fleet Update Starting -# message: 'Updating {{ pending_devices | count }} device(s): {{ pending_names -# }} - -# ' -# - repeat: -# for_each: '{{ pending_devices }}' -# sequence: -# - action: update.install -# target: -# entity_id: '{{ repeat.item }}' -# continue_on_error: true -# - wait_template: '{{ not is_state(repeat.item, ''on'') }} - -# ' -# timeout: 00:05:00 -# continue_on_timeout: true -# - delay: -# minutes: 2 -# - action: notify.persistent_notification -# data: -# title: ESPHome Fleet Update Complete -# message: 'Finished updating {{ pending_devices | count }} device(s): {{ pending_names -# }} - -# ' diff --git a/automations/06_dashboards_and_maintenance/06b_esphome_fleet_updates.yaml b/automations/06_dashboards_and_maintenance/06b_esphome_fleet_updates.yaml new file mode 100644 index 0000000..9fac31e --- /dev/null +++ b/automations/06_dashboards_and_maintenance/06b_esphome_fleet_updates.yaml @@ -0,0 +1,49 @@ +# - id: '1774407470375' +# alias: ESPHome Fleet Update +# description: '' +# triggers: +# - at: 03:00:00 +# trigger: time +# - event_type: esphome_fleet_update_trigger +# trigger: event +# conditions: +# - condition: template +# value_template: "{{ expand(integration_entities('esphome'))\n | selectattr('entity_id',\ +# \ 'contains', 'update')\n | selectattr('state', 'eq', 'on')\n | list | count\ +# \ > 0 }}\n" +# actions: +# - variables: +# pending_devices: "{{ expand(integration_entities('esphome'))\n | selectattr('entity_id',\ +# \ 'contains', 'update')\n | selectattr('state', 'eq', 'on')\n | map(attribute='entity_id')\ +# \ | list }}\n" +# pending_names: "{{ expand(integration_entities('esphome'))\n | selectattr('entity_id',\ +# \ 'contains', 'update')\n | selectattr('state', 'eq', 'on')\n | map(attribute='name')\ +# \ | join(', ') }}\n" +# - action: notify.persistent_notification +# data: +# title: ESPHome Fleet Update Starting +# message: 'Updating {{ pending_devices | count }} device(s): {{ pending_names +# }} + +# ' +# - repeat: +# for_each: '{{ pending_devices }}' +# sequence: +# - action: update.install +# target: +# entity_id: '{{ repeat.item }}' +# continue_on_error: true +# - wait_template: '{{ not is_state(repeat.item, ''on'') }} + +# ' +# timeout: 00:05:00 +# continue_on_timeout: true +# - delay: +# minutes: 2 +# - action: notify.persistent_notification +# data: +# title: ESPHome Fleet Update Complete +# message: 'Finished updating {{ pending_devices | count }} device(s): {{ pending_names +# }} + +# ' diff --git a/automations/07_climate_and_plugs.yaml b/automations/07_climate_and_plugs.yaml deleted file mode 100644 index fbb39c7..0000000 --- a/automations/07_climate_and_plugs.yaml +++ /dev/null @@ -1,106 +0,0 @@ -# Climate and plug automations. - -- id: ac_controls_matter_plugs - alias: AC controls Matter plugs - 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: null - - trigger: state - entity_id: climate.meat_heater - 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: - - 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: - - 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: 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 - equipment_name: Dehumidifier - -- id: ac_tank_full_shutoff - alias: AC Tank Full - description: Alert when the AC tank sensor is wet. This does not switch an outlet. - mode: single - triggers: - - trigger: state - entity_id: binary_sensor.ac_tank_sensor_moisture - to: "on" - conditions: [] - actions: - - action: script.notify_events_alerts - data: - title: AC tank is full - message: AC tank sensor detected water. - -- id: dehumidifier_tank_sensor_low_battery - alias: Dehumidifier Tank Sensor Low Battery - description: Alert when the dehumidifier tank level sensor battery is at 10% or lower. - mode: single - triggers: - - trigger: numeric_state - entity_id: sensor.water_leak_sensor_battery - below: 10.1 - conditions: [] - actions: - - 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. - -- id: ac_tank_sensor_low_battery - alias: AC Tank Sensor Low Battery - description: Alert when the AC tank sensor battery is at 10% or lower. - mode: single - triggers: - - trigger: numeric_state - entity_id: sensor.ac_tank_sensor_battery - below: 10.1 - conditions: [] - actions: - - 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/07a_ac_plug_controls.yaml b/automations/07_climate_and_plugs/07a_ac_plug_controls.yaml new file mode 100644 index 0000000..10e4711 --- /dev/null +++ b/automations/07_climate_and_plugs/07a_ac_plug_controls.yaml @@ -0,0 +1,48 @@ +- id: ac_controls_matter_plugs + alias: AC controls Matter plugs + 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: null + - trigger: state + entity_id: climate.meat_heater + 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: + - 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: + - 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 }}" diff --git a/automations/07_climate_and_plugs/07b_dehumidifier_tank_alerts.yaml b/automations/07_climate_and_plugs/07b_dehumidifier_tank_alerts.yaml new file mode 100644 index 0000000..a83c6f9 --- /dev/null +++ b/automations/07_climate_and_plugs/07b_dehumidifier_tank_alerts.yaml @@ -0,0 +1,25 @@ +- id: dehumidifier_tank_full_shutoff + alias: Dehumidifier Tank Full - Shut Off Parents Window Fan + 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 + equipment_name: Dehumidifier + +- id: dehumidifier_tank_sensor_low_battery + alias: Dehumidifier Tank Sensor Low Battery + description: Alert when the dehumidifier tank level sensor battery is at 10% or lower. + mode: single + triggers: + - trigger: numeric_state + entity_id: sensor.water_leak_sensor_battery + below: 10.1 + conditions: [] + actions: + - 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. diff --git a/automations/07_climate_and_plugs/07c_ac_tank_alerts.yaml b/automations/07_climate_and_plugs/07c_ac_tank_alerts.yaml new file mode 100644 index 0000000..1aca9bf --- /dev/null +++ b/automations/07_climate_and_plugs/07c_ac_tank_alerts.yaml @@ -0,0 +1,29 @@ +- id: ac_tank_full_shutoff + alias: AC Tank Full + description: Alert when the AC tank sensor is wet. This does not switch an outlet. + mode: single + triggers: + - trigger: state + entity_id: binary_sensor.ac_tank_sensor_moisture + to: "on" + conditions: [] + actions: + - action: script.notify_events_alerts + data: + title: AC tank is full + message: AC tank sensor detected water. + +- id: ac_tank_sensor_low_battery + alias: AC Tank Sensor Low Battery + description: Alert when the AC tank sensor battery is at 10% or lower. + mode: single + triggers: + - trigger: numeric_state + entity_id: sensor.ac_tank_sensor_battery + below: 10.1 + conditions: [] + actions: + - 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/08_alexa_automations.yaml b/automations/08_alexa_automations/08a_camp_announcement_volume.yaml similarity index 72% rename from automations/08_alexa_automations.yaml rename to automations/08_alexa_automations/08a_camp_announcement_volume.yaml index d958e7f..b8acd2a 100644 --- a/automations/08_alexa_automations.yaml +++ b/automations/08_alexa_automations/08a_camp_announcement_volume.yaml @@ -26,36 +26,6 @@ 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 @@ -106,4 +76,4 @@ media_content_type: routine target: entity_id: media_player.basement_show - mode: single \ No newline at end of file + mode: single diff --git a/automations/08_alexa_automations/08b_school_announcement_volume.yaml b/automations/08_alexa_automations/08b_school_announcement_volume.yaml new file mode 100644 index 0000000..812ef6a --- /dev/null +++ b/automations/08_alexa_automations/08b_school_announcement_volume.yaml @@ -0,0 +1,29 @@ +- 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