- id: '1640833273099' alias: NWS Announce Weather Alert for Tornado description: '' trigger: - platform: numeric_state entity_id: sensor.weatheralerts_active_alerts attribute: tornado_warning_count above: '0' condition: - condition: state entity_id: input_boolean.vacation_mode state: 'off' action: - service: input_boolean.turn_on data: {} target: entity_id: input_boolean.tornado_alarm - service: input_boolean.turn_off data: {} target: entity_id: - input_boolean.white_noise_kallen_bedroom - input_boolean.white_noise_basement - input_boolean.white_noise_emma_bedroom alias: Turn off white noise - service: script.turn_on target: entity_id: script.max_brightness - service: script.text_notify data: type: critical title: Tornado Warning - TAKE COVER! message: The National Weather Service has issued a Tornado Warning for our area. Take Cover NOW!!!! who: all tag: tornado-warning alias: CRITICAL PHONE ALERT - service: script.tv_notify data: who: all title: Tornado Warning - TAKE COVER! message: The National Weather Service has issued a Tornado Warning for our area. Take Cover NOW!!!! alias: TV Alert - service: script.speech_engine data: who: everywhere message: A tornado warning has been issued, please take cover immediately! A tornado warning has been issued, please take cover immediately! A tornado warning has been issued, please take cover immediately! type: alert alias: Elevated TTS alert - delay: hours: 0 minutes: 1 seconds: 0 milliseconds: 0 - service: script.speech_engine data: who: everywhere message: A tornado warning has been issued, please take cover immediately! A tornado warning has been issued, please take cover immediately! A tornado warning has been issued, please take cover immediately! type: critical alias: CRITICAL TTS ALERT - delay: hours: 0 minutes: 1 seconds: 0 milliseconds: 0 mode: single - id: '1640916845901' alias: Cast to Chromecast description: '' use_blueprint: path: kind3r/cast-and-re-cast-a-lovelace-view-to-a-google-hub.yaml input: dashboard: lovelace player: media_player.living_room_tv view: chromecast - id: '1640989510134' alias: New Years description: Flash lights for New Years trigger: - platform: time at: 00:00:00 condition: [] action: - alias: Prepare affected lighting areas service: switch.turn_off target: entity_id: - switch.adaptive_lighting_basement_studio - switch.adaptive_lighting_kallen_bedroom - switch.adaptive_lighting_living_room - switch.adaptive_lighting_master_bedroom - switch.adaptive_lighting_mud_room - switch.adaptive_lighting_upstairs_hallway - switch.adaptive_lighting_tina_lamp - switch.animated_scene_christmas - switch.adaptive_lighting_emma_bedroom - switch.adaptive_lighting_downstairs_bathroom - switch.adaptive_lighting_upstairs_bathroom - switch.adaptive_lighting_front_porch data: {} - delay: hours: 0 minutes: 0 seconds: 1 milliseconds: 0 alias: Delay to make sure all switches turn off - alias: Turn on lights, change to red for capable bulbs service: light.turn_on target: entity_id: - light.hallway_overhead - light.kallen_bedroom_lights - light.mud_room_overhead - light.front_porch_light - light.emma_bedroom_light - light.downstairs_bathroom_lights - light.upstairs_bathroom_lights - light.living_room_lights - light.master_bedroom_lights - light.basement_studio_lights - light.tina_lamp_top - light.tina_lamp_side - light.stairwell_led_strip data: color_name: red brightness_pct: 100 - delay: hours: 0 minutes: 0 seconds: 2 milliseconds: 0 alias: Delay to wait for lights to turn on - alias: Flash lights and send TTS notification parallel: - alias: Flash lights service: light.turn_on target: entity_id: - light.hallway_overhead - light.kallen_bedroom_lights - light.mud_room_overhead - light.front_porch_light - light.emma_bedroom_light - light.downstairs_bathroom_lights - light.upstairs_bathroom_lights - light.master_bedroom_lights - light.tina_lamp_top - light.tina_lamp_side data: flash: long - alias: Send TTS notification to the common areas service: script.speech_engine data: who: common_areas message: Happy new year! Heres to 2024! type: alert - alias: Basement Lights Alert service: script.basement_lights_alert data: type: police duration: 30 flash: true - alias: Living Room Lights Alert service: script.living_room_lights_alert data: type: police duration: 30 flash: true - alias: Restore previous functionality service: switch.turn_on target: entity_id: - switch.animated_scene_christmas data: {} - alias: Return to evening mode service: script.turn_on target: entity_id: - script.evening_on_first_floor - script.evening_on_second_floor data: {} - delay: hours: 0 minutes: 0 seconds: 1 milliseconds: 0 alias: Delay because adaptive lighting is stupid sometimes - service: input_select.select_option data: option: Reset target: entity_id: input_select.tina_desk_scenes alias: Reset Tina desk scene - service: light.turn_off target: entity_id: light.downstairs_bathroom_lights data: {} alias: Turn off downstairs bathroom lights mode: single - id: '1641101491581' alias: Family Has Arrived description: Runs when family arrives at home trigger: - platform: state entity_id: - binary_sensor.parents_home not_from: unavailable to: 'on' condition: - condition: not conditions: - condition: state entity_id: binary_sensor.internet state: 'off' action: - if: - condition: state entity_id: binary_sensor.early_night_mode state: 'on' then: - service: script.family_is_home_night data: {} else: - service: script.family_is_home_day data: {} alias: Check early night mode, choose which script to run mode: restart - id: '1641102018783' alias: Family Has Left description: Runs when the family has left home trigger: - platform: state entity_id: - binary_sensor.parents_home not_from: unavailable to: 'off' condition: - condition: state entity_id: input_boolean.guest_mode state: 'off' - condition: not conditions: - condition: state entity_id: binary_sensor.internet state: 'off' action: - service: script.family_is_away data: {} mode: single - id: '1643321652916' alias: Time-Based Presence Simulation description: '' trigger: - platform: state entity_id: binary_sensor.parents_home to: 'off' for: hours: 1 minutes: 0 seconds: 0 condition: [] action: - service: switch.turn_on target: entity_id: switch.presence_simulation mode: single - id: '1644510872801' alias: iCloud3 Restart description: For restarting iCloud3 when my phone goes off the rails trigger: - platform: state entity_id: sensor.tony_s_iphone_info to: ●● PAUSED ●● condition: [] action: - service: icloud3.restart data: {} mode: single - id: '1645738561470' alias: Cast to Basement TV description: '' use_blueprint: path: kind3r/cast-and-re-cast-a-lovelace-view-to-a-google-hub.yaml input: dashboard: lovelace player: media_player.basement_tv_chromecast view: chromecast - id: '1651785688186' alias: Watchman Audit on Startup description: Runs the Watchman Audit script after Home Assistant has successfully started up trigger: - platform: homeassistant event: start condition: [] action: - delay: hours: 0 minutes: 1 seconds: 0 milliseconds: 0 - service: watchman.report data: {} alias: Watchman Report mode: single - id: '1651787468337' alias: Reboot handling description: '' trigger: - platform: homeassistant event: start id: hass_start - platform: homeassistant event: shutdown id: hass_stop condition: [] action: - if: - condition: trigger id: hass_start alias: Startup then: - delay: hours: 0 minutes: 1 seconds: 0 milliseconds: 0 - service: automation.turn_on data: {} target: entity_id: - automation.family_has_arrived - automation.family_has_left - automation.scheduled_alarm_rearm - automation.scheduled_alarm_disarm - service: switch.turn_off target: entity_id: - switch.presence_simulation data: {} - if: - condition: and conditions: - condition: state entity_id: input_boolean.holiday_mode state: 'on' alias: Is holiday mode on? - condition: state entity_id: binary_sensor.early_night_mode state: 'on' alias: Is early night mode on? alias: Test conditions then: - service: switch.turn_on data: {} target: entity_id: switch.animated_scene_{{ states('input_select.holiday_animation') | lower }} alias: Turn on the appropriate animated holiday scene alias: Turn on animated holiday scene if night time and holiday mode is on - service: script.tony_desktop_refresh data: {} - service: script.tina_desktop_refresh data: {} - service: script.asus_laptop_refresh data: {} - service: script.kallen_desktop_refresh data: {} - service: script.win10vm_refresh data: {} - service: mqtt.publish data: topic: house/basement/server/glances payload: restart qos: 0 retain: false alias: Restart Glances via MQTT - service: script.volume_reset data: {} alias: Reset all speaker volumes - if: - condition: state entity_id: input_boolean.studio_quiet state: 'off' then: - service: script.status_annc data: who: basement call_ha_started: 1 else: - stop: Studio has requested quiet, and Jarvis respects this alias: Announce back online, unless studio has requested quiet - if: - condition: trigger id: hass_stop alias: Shutdown then: - service: automation.turn_off data: stop_actions: true target: entity_id: - automation.family_has_arrived - automation.family_has_left mode: queued - id: '1654547257475' alias: Battery Monitoring description: Monitor all battery-powered things for low battery states use_blueprint: path: sbyx/low-battery-level-detection-notification-for-all-battery-sensors.yaml input: time: '11:00:00' exclude: entity_id: - sensor.tinas_iphone_battery_level - sensor.kallen_iphone_battery_level - sensor.tinas_ipad_battery_level - sensor.tony_s_iphone_battery_level - sensor.tony_s_ipad_battery_level actions: - service: script.text_notify data: type: normal who: tony title: Low Batteries in House message: 'Low battery alert for: {{sensors}}' tag: battery-monitoring - id: '1655493590791' alias: NWS Announce Weather Alert for Tornado (CLEAR) description: '' trigger: - platform: numeric_state entity_id: sensor.weatheralerts_active_alerts attribute: tornado_warning_count below: '1' condition: - condition: state entity_id: input_boolean.vacation_mode state: 'off' - condition: state entity_id: input_boolean.tornado_alarm state: 'on' action: - service: script.text_notify data: type: alert who: all message: clear_notification tag: tornado-warning alias: Clear critical notification - service: input_boolean.turn_off data: {} target: entity_id: input_boolean.tornado_alarm - service: script.volume_reset data: {} - service: script.max_brightness_cleanup data: {} - service: script.text_notify data: title: Tornado Warning is cleared message: Check your surroundings and make sure it is safe to leave cover who: all type: alert tag: tornado-cleared - service: script.tv_notify data: title: Tornado Warning is cleared message: Check your surroundings and make sure it is safe to leave cover who: all - service: script.speech_engine data: who: everywhere message: Tornado warning has been cleared. Check your surroundings and make sure it is safe to leave cover. type: alert - wait_template: '{{ is_state(''input_boolean.tornado_alarm'',''on'') }}' continue_on_timeout: true timeout: 00:05:00 alias: Make sure no further warnings are issued - if: - condition: state entity_id: input_boolean.tornado_alarm state: 'off' then: - if: - condition: or conditions: - condition: time before: input_datetime.audible_notification_on alias: Before audible notifications on - condition: time after: input_datetime.audible_notification_off alias: After audible notifications off alias: Should audible notifications be off then: - service: input_boolean.turn_off data: {} target: entity_id: input_boolean.audible_notifications else: - service: input_boolean.turn_on data: {} target: entity_id: input_boolean.audible_notifications else: - stop: Tornado alert re-activated mode: single - id: '1667341156218' alias: White Noise description: '' trigger: - platform: state entity_id: - input_boolean.white_noise_emma_bedroom to: 'on' from: 'off' id: emma-on alias: Emma On - platform: state entity_id: - input_boolean.white_noise_basement to: 'on' from: 'off' id: basement-on alias: Basement On - platform: state entity_id: - input_boolean.white_noise_kallen_bedroom to: 'on' from: 'off' id: kallen-on alias: Kallen On - platform: state entity_id: - input_boolean.white_noise_emma_bedroom from: 'on' to: 'off' id: emma-off alias: Emma Off - platform: state entity_id: - input_boolean.white_noise_basement from: 'on' to: 'off' id: basement-off alias: Basement Off - platform: state entity_id: - input_boolean.white_noise_kallen_bedroom from: 'on' to: 'off' id: kallen-off alias: Kallen Off - alias: Emma Timeout platform: state id: emma-timeout entity_id: - media_player.emma_bedroom_google_speaker to: 'off' - alias: Basement Timeout platform: state id: basement-timeout entity_id: - media_player.basement_google_speaker to: 'off' - alias: Kallen Timeout platform: state id: kallen-timeout entity_id: - media_player.kallen_bedroom_google_speaker to: 'off' condition: [] action: - choose: - conditions: - condition: trigger id: emma-on sequence: - alias: Start river sounds service: google_assistant_sdk.send_text_command data: command: give me river noise on emma bedroom speaker - service: media_player.volume_set data: volume_level: '{{ states(''input_number.emma_bedroom_google_speaker_night_volume'') }}' target: entity_id: media_player.emma_bedroom_google_speaker alias: Set volume alias: Emma On - conditions: - condition: trigger id: basement-on sequence: - service: google_assistant_sdk.send_text_command data: command: give me thunderstorm sounds on basement studio speaker alias: Start thunderstorm sounds - service: media_player.volume_set data: volume_level: '{{ states(''input_number.basement_google_speaker_night_volume'') }}' target: entity_id: media_player.basement_google_speaker alias: Set volume alias: Basement On - conditions: - condition: trigger id: kallen-on sequence: - alias: Start river sounds service: google_assistant_sdk.send_text_command data: command: give me river noise on kallen bedroom speaker - service: media_player.volume_set data: volume_level: '{{ states(''input_number.kallen_bedroom_google_speaker_night_volume'') }}' target: entity_id: media_player.kallen_bedroom_google_speaker alias: Set volume alias: Kallen On - conditions: - condition: trigger id: emma-off sequence: - service: media_player.turn_off data: {} target: entity_id: media_player.emma_bedroom_google_speaker alias: Turn off speaker - alias: If Emma is awake, reset volume if: - condition: state entity_id: input_boolean.emma_sleeping state: 'off' then: - delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0 - service: media_player.volume_set data: volume_level: "{% if is_state('input_boolean.give_me_darkness','on') %}\n \ {{ states('input_number.emma_bedroom_google_speaker_night_volume') }}\n{% else %}\n {{ states('input_number.emma_bedroom_google_speaker_day_volume') }}\n{% endif %}\n" target: entity_id: media_player.emma_bedroom_google_speaker alias: Reset volume alias: Emma Off - conditions: - condition: trigger id: basement-off sequence: - service: media_player.turn_off data: {} target: entity_id: media_player.basement_google_speaker alias: Turn off speaker - delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0 - service: media_player.volume_set data: volume_level: "{% if is_state('input_boolean.give_me_darkness','on') %}\n {{ states('input_number.basement_google_speaker_night_volume') }}\n{% else %}\n {{ states('input_number.basement_google_speaker_day_volume') }}\n{% endif %}\n" target: entity_id: media_player.basement_google_speaker alias: Reset volume alias: Basement Off - conditions: - condition: trigger id: kallen-off sequence: - service: media_player.turn_off data: {} target: entity_id: media_player.kallen_bedroom_google_speaker alias: Turn off speaker - alias: If Kallen is awake, reset volume if: - condition: and conditions: - condition: state entity_id: input_boolean.kallen_sleeping state: 'off' - condition: state entity_id: input_boolean.kallen_morning_briefing state: 'off' then: - delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0 - service: media_player.volume_set data: volume_level: "{% if is_state('input_boolean.give_me_darkness','on') %}\n \ {{ states('input_number.kallen_bedroom_google_speaker_night_volume') }}\n{% else %}\n {{ states('input_number.kallen_bedroom_google_speaker_day_volume') }}\n{% endif %}\n" target: entity_id: media_player.kallen_bedroom_google_speaker alias: Reset volume alias: Kallen Off - conditions: - condition: trigger id: - emma-timeout sequence: - alias: Reset white noise if: - condition: state entity_id: input_boolean.white_noise_emma_bedroom state: 'on' alias: Check if white noise is still desired then: - delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0 - alias: Start river sounds service: google_assistant_sdk.send_text_command data: command: give me river noise on emma bedroom speaker - service: media_player.volume_set data: volume_level: '{{ states(''input_number.emma_bedroom_google_speaker_night_volume'') }}' target: entity_id: media_player.emma_bedroom_google_speaker alias: Set volume alias: Emma Timeout - conditions: - condition: trigger id: - basement-timeout sequence: - alias: Reset white noise if: - alias: Check if white noise is still desired condition: state entity_id: input_boolean.white_noise_basement state: 'on' then: - delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0 - alias: Start thunderstorm sounds service: google_assistant_sdk.send_text_command data: command: give me thunderstorm sounds on basement studio speaker - service: media_player.volume_set data: volume_level: '{{ states(''input_number.basement_google_speaker_night_volume'') }}' target: entity_id: media_player.basement_google_speaker alias: Set volume alias: Basement Timeout - conditions: - condition: trigger id: - kallen-timeout sequence: - alias: Reset white noise if: - alias: Check if white noise is still desired condition: state entity_id: input_boolean.white_noise_kallen_bedroom state: 'on' then: - delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0 - alias: Start river sounds service: google_assistant_sdk.send_text_command data: command: give me river noise on kallen bedroom speaker - service: media_player.volume_set data: volume_level: '{{ states(''input_number.kallen_bedroom_google_speaker_night_volume'') }}' target: entity_id: media_player.kallen_bedroom_google_speaker alias: Set volume alias: Kallen Timeout mode: parallel max: 20 - id: '1671584633378' alias: Delivery Mode Cleanup description: '' trigger: - platform: time at: 00:00:00 alias: At midnight condition: - condition: state entity_id: input_boolean.delivery_mode state: 'on' alias: If Delivery Mode is on for: hours: 1 minutes: 0 seconds: 0 action: - service: input_boolean.turn_off data: {} target: entity_id: input_boolean.delivery_mode alias: Turn off Delivery Mode mode: single - id: '1671946146837' alias: Christmas Day Show description: For that one special day a year, to make it just a little more magical trigger: - platform: state entity_id: - input_boolean.christmas_day_show from: 'off' to: 'on' alias: Start Show id: start-show - platform: state entity_id: - input_boolean.christmas_day_show from: 'on' to: 'off' alias: Stop Show id: stop-show condition: [] action: - alias: If starting show if: - condition: trigger id: start-show then: - service: switch.turn_off data: {} target: entity_id: - switch.adaptive_lighting_living_room - switch.adaptive_lighting_tina_lamp alias: Turn off adaptive lighting - alias: Start light show parallel: - alias: Run effect on Living Room LED Strip service: lifx.effect_move data: speed: 4 direction: right theme: christmas power_on: true target: entity_id: light.living_room_led_strip - service: switch.turn_on data: {} target: entity_id: switch.animated_scene_christmas_day alias: Turn on Christmas Day scene - alias: TTS Announcement service: script.speech_engine data: who: living_room message: Merry Christmas everyone. And now, let us enjoy some awesome Christmas music! type: alert - delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0 alias: Give TTS time to finish enabled: true - alias: Play music via built-in Chromecast on Living Room TV service: media_player.play_media data: media_content_type: cast media_content_id: ' { "app_name": "youtube", "media_id": "9yZEwvKdGTY", "playlist_id": "PLPggnb95lN4n2rQBKYK-qBn1PNqpDfq4y" }' target: entity_id: media_player.living_room_tv_chromecast - service: media_player.select_source data: source: Living Room TV target: entity_id: media_player.spotify_iron_nerd alias: Set source to Living Room TV enabled: false - delay: hours: 0 minutes: 0 seconds: 2 milliseconds: 0 alias: Make sure that took effect enabled: false - service: media_player.play_media data: media_content_id: https://open.spotify.com/track/7LPOnS3OvbF6DGrt9fQ7x9?si=3c7e28d623324a80 media_content_type: music target: entity_id: media_player.spotify_iron_nerd alias: Play my Christmas Music playlist enabled: false - service: media_player.media_play data: {} target: entity_id: media_player.spotify_iron_nerd alias: Actually play the music enabled: false - alias: If stopping show if: - condition: trigger id: stop-show then: - service: media_player.media_pause data: {} target: entity_id: media_player.spotify_iron_nerd alias: Stop the music enabled: false - service: media_player.media_pause target: entity_id: media_player.living_room_tv_chromecast data: {} alias: Pause music - service: switch.turn_off data: {} target: entity_id: switch.animated_scene_christmas_day alias: Turn off Christmas Day scene - alias: Reset lights parallel: - service: input_select.select_option data: option: Adaptive target: entity_id: input_select.living_room_scenes alias: Set living room back to adaptive - service: input_select.select_option data: option: Reset target: entity_id: input_select.tina_desk_scenes alias: Reset Tina desk scene - service: switch.turn_on data: {} target: entity_id: switch.animated_scene_christmas alias: Turn on Front Porch Christmas scene - alias: TTS Announcement service: script.speech_engine data: who: living_room message: Thats all folks, enjoy the rest of your Christmas Day! Eat lots of food and have lots of fun! And hey, maybe you could bring me some cake? I love cake! type: alert - alias: Give TTS time to finish delay: hours: 0 minutes: 0 seconds: 10 milliseconds: 0 enabled: true - service: media_player.media_play target: entity_id: media_player.living_room_tv_chromecast data: {} alias: Resume music mode: restart - id: '1678225060371' alias: Tornado Watch Handling description: Controls the input boolean for tornado watches, for use in briefings or automations trigger: - platform: numeric_state entity_id: sensor.weatheralerts_active_alerts attribute: tornado_watch_count above: 0 id: watch_issued alias: Watch Issued - platform: numeric_state entity_id: sensor.weatheralerts_active_alerts attribute: tornado_watch_count below: 1 id: watch_cleared alias: Watch Cleared condition: [] action: - choose: - conditions: - condition: trigger id: watch_issued sequence: - service: input_boolean.turn_on data: {} target: entity_id: input_boolean.tornado_watch - conditions: - condition: trigger id: watch_cleared sequence: - service: input_boolean.turn_off data: {} target: entity_id: input_boolean.tornado_watch alias: Control input boolean mode: restart - id: '1679104710155' alias: Living Room Switch Handler description: '' use_blueprint: path: codycodes/hue-remote-dimmer-december-2021.yaml input: dimmer_device: ccc672e3d924e72a952d801736ea59d3 on_short_action: - service: light.toggle data: {} target: entity_id: light.living_room_lights on_long_action: - service: input_select.select_option data: option: Adaptive target: entity_id: input_select.living_room_scenes brightness_up_short_action: - service: switch.turn_off data: {} target: entity_id: switch.adaptive_lighting_living_room alias: Adaptive Off - service: light.turn_on data: brightness_step_pct: 12 target: entity_id: light.living_room_lights alias: Brightness Up Small brightness_down_short_action: - service: switch.turn_off data: {} target: entity_id: switch.adaptive_lighting_living_room alias: Adaptive Off - service: light.turn_on data: brightness_step_pct: 22 target: entity_id: light.living_room_lights alias: Brightness Down Small off_short_action: - choose: - conditions: - condition: state entity_id: binary_sensor.early_night_mode state: 'on' sequence: - service: script.evening_on_first_floor data: {} - conditions: - condition: state entity_id: input_boolean.goodnight state: 'on' sequence: - service: script.goodnight_on_first_floor data: {} default: - service: light.turn_off data: {} target: entity_id: - light.living_room_lights - light.tina_desk_lights - light.mud_room_overhead brightness_up_long_action: - service: switch.turn_off data: {} target: entity_id: switch.adaptive_lighting_living_room alias: Adaptive Off - service: light.turn_on data: brightness_step_pct: -12 target: entity_id: light.living_room_lights alias: Brightness Up Large brightness_down_long_action: - service: switch.turn_off data: {} target: entity_id: switch.adaptive_lighting_living_room alias: Adaptive Off - service: light.turn_on data: brightness_step_pct: -22 target: entity_id: light.living_room_lights alias: Brightness Down Large off_long_action: - service: input_select.select_option data: option: Reset target: entity_id: input_select.tina_desk_scenes - service: input_select.select_option data: option: Adaptive target: entity_id: input_select.living_room_scenes - id: '1682550106529' alias: Master Bedroom Switch Handler description: '' use_blueprint: path: codycodes/hue-remote-dimmer-december-2021.yaml input: dimmer_device: 47cce1f5af5137fcb398dec76adbd23e on_long_action: - data: option: Adaptive target: entity_id: input_select.master_bedroom_scenes action: input_select.select_option brightness_up_short_action: - data: {} target: entity_id: switch.adaptive_lighting_master_bedroom action: switch.turn_off brightness_up_long_action: - data: {} target: entity_id: switch.adaptive_lighting_master_bedroom action: switch.turn_off brightness_down_short_action: - if: - condition: state entity_id: light.master_bedroom_lights state: 'off' then: - action: input_select.select_option metadata: {} data: option: Nightlight target: entity_id: input_select.master_bedroom_scenes else: - data: {} target: entity_id: switch.adaptive_lighting_master_bedroom action: switch.turn_off alias: Activate nightlight if lights are off, otherwise act normal brightness_down_long_action: - data: {} target: entity_id: switch.adaptive_lighting_master_bedroom action: switch.turn_off off_long_action: - data: option: Side Nightlight target: entity_id: input_select.master_bedroom_scenes action: input_select.select_option off_short_action: - action: light.toggle metadata: {} data: {} target: entity_id: light.master_bedroom_closet - id: '1682550357188' alias: Emma Bedroom Switch Handler description: '' use_blueprint: path: codycodes/hue-remote-dimmer-december-2021.yaml input: dimmer_device: 18dc2f03d3a1c0c5e8c93e365e94de21 on_long_action: - service: input_select.select_option data: option: Adaptive target: entity_id: input_select.emma_bedroom_scenes brightness_up_short_action: - service: switch.turn_off data: {} target: entity_id: switch.adaptive_lighting_emma_bedroom brightness_up_long_action: - service: switch.turn_off data: {} target: entity_id: switch.adaptive_lighting_emma_bedroom brightness_down_short_action: - service: switch.turn_off data: {} target: entity_id: switch.adaptive_lighting_emma_bedroom brightness_down_long_action: - service: switch.turn_off data: {} target: entity_id: switch.adaptive_lighting_emma_bedroom off_long_action: - service: input_boolean.toggle data: {} target: entity_id: input_boolean.emma_sleeping off_short_action: - choose: - conditions: - condition: state entity_id: binary_sensor.early_night_mode state: 'on' sequence: - service: script.evening_on_second_floor data: {} - conditions: - condition: state entity_id: input_boolean.goodnight state: 'on' sequence: - service: script.goodnight_on_second_floor data: {} default: - service: light.turn_off data: {} target: area_id: - emma_bedroom - kallen_bedroom - master_bedroom - master_bedroom_closet - upstairs_hallway - if: - condition: template value_template: '{{ is_state(''timer.upstairs_bathroom_motion_timer'',''idle'') and is_state(''binary_sensor.upstairs_bathroom_motion'',''off'') and is_state(''light.upstairs_bathroom_lights'',''on'') and is_state(''input_boolean.shower_mode'',''off'') }}' then: - service: light.turn_off data: {} target: entity_id: light.upstairs_bathroom_lights - id: '1682561310614' alias: Kallen Bedroom Switch Handler description: '' use_blueprint: path: codycodes/hue-remote-dimmer-december-2021.yaml input: dimmer_device: ca3ff98b83eff1b55a79955ba02df333 on_long_action: - service: input_select.select_option data: option: Adaptive target: entity_id: input_select.kallen_bedroom_scenes brightness_up_short_action: - service: switch.turn_off data: {} target: entity_id: switch.adaptive_lighting_kallen_bedroom brightness_up_long_action: - service: switch.turn_off data: {} target: entity_id: switch.adaptive_lighting_kallen_bedroom brightness_down_short_action: - service: switch.turn_off data: {} target: entity_id: switch.adaptive_lighting_kallen_bedroom brightness_down_long_action: - service: switch.turn_off data: {} target: entity_id: switch.adaptive_lighting_kallen_bedroom off_long_action: - service: input_boolean.toggle data: {} target: entity_id: input_boolean.kallen_sleeping off_short_action: - service: fan.toggle metadata: {} data: {} target: entity_id: fan.kallen_bedroom_fan - id: '1682793072646' alias: Tina Desk Switch Handler description: '' use_blueprint: path: codycodes/hue-remote-dimmer-december-2021.yaml input: dimmer_device: 40c14ccfe958d21d75888a968bbbf908 on_short_action: - data: {} target: entity_id: light.tina_desk_lights action: light.turn_on on_long_action: - data: option: Reset target: entity_id: input_select.tina_desk_scenes action: input_select.select_option off_short_action: [] off_long_action: [] - id: '1693174941627' alias: Presence Disconnect Protection description: When the internet drops, sometimes LIfe360 does too. This automation prevents the chaos that causes. trigger: - platform: state entity_id: - binary_sensor.internet from: 'on' to: 'off' id: disconnect - platform: state entity_id: - binary_sensor.internet from: 'off' to: 'on' for: hours: 0 minutes: 1 seconds: 0 id: reconnect condition: [] action: - choose: - conditions: - condition: trigger id: - disconnect sequence: - service: automation.turn_off data: stop_actions: true target: entity_id: - automation.family_has_arrived - automation.family_has_left - conditions: - condition: trigger id: - reconnect sequence: - service: automation.turn_on data: {} target: entity_id: - automation.family_has_arrived - automation.family_has_left mode: restart - id: '1696284855902' alias: Hot Day Activate description: If excessive heat is forecast after the scheduler has already run, turn on the hot day boolean trigger: - platform: state entity_id: - binary_sensor.heat_warning from: 'off' to: 'on' condition: [] action: - service: input_boolean.turn_on data: {} target: entity_id: input_boolean.hot_day mode: restart - id: '1696285290316' alias: Scheduled Alarm Disarm description: '' trigger: - platform: time at: input_datetime.morning_alarm_disarm id: morning - platform: time at: input_datetime.master_bedroom_wakeup id: wakeup condition: - condition: state entity_id: binary_sensor.parents_home state: 'on' - condition: state entity_id: input_boolean.vacation_mode state: 'off' - condition: state entity_id: input_boolean.guest_mode state: 'off' - condition: template value_template: '{{ states(''alarm_control_panel.stratton_ave_alarm'') not in [''disarmed'',''unavailable'',''unknown''] }}' action: - choose: - conditions: - condition: state entity_id: input_boolean.skip_disarm state: 'on' sequence: - service: input_boolean.turn_off target: entity_id: input_boolean.skip_disarm data: {} - service: persistent_notification.create data: title: Security Information message: Scheduled security disarm has been skipped notification_id: security_disarm_skipped - conditions: - condition: trigger id: morning sequence: - condition: or conditions: - condition: state entity_id: input_boolean.work_today state: 'on' - condition: state entity_id: input_boolean.kallen_school_today state: 'on' - service: alarm_control_panel.alarm_disarm target: entity_id: alarm_control_panel.nerdhome_alarm_panel data: {} - conditions: - condition: trigger id: wakeup sequence: - service: alarm_control_panel.alarm_disarm target: entity_id: alarm_control_panel.nerdhome_alarm_panel data: {} mode: single - id: '1696285375998' alias: Scheduled Alarm Rearm description: '' trigger: - platform: time at: input_datetime.morning_alarm_rearm condition: - condition: state entity_id: binary_sensor.parents_home state: 'on' - condition: state entity_id: input_boolean.vacation_mode state: 'off' - condition: state entity_id: input_boolean.guest_mode state: 'off' - condition: or conditions: - condition: state entity_id: input_boolean.work_today state: 'on' - condition: state entity_id: input_boolean.kallen_school_today state: 'on' - condition: template value_template: '{% set rearm = state_attr(''input_datetime.morning_alarm_rearm'',''timestamp'') %} {% set wake = state_attr(''input_datetime.master_bedroom_wakeup'',''timestamp'') %} {% set diff = wake - rearm %} {{ diff > 1800 }} ' action: - if: - condition: state entity_id: input_boolean.work_today state: 'on' then: - service: script.security_scheduling data: {} - if: - condition: state entity_id: input_boolean.skip_rearm state: 'on' then: - service: input_boolean.turn_off target: entity_id: input_boolean.skip_rearm data: {} - service: persistent_notification.create data: title: Security Information message: Scheduled security rearm has been skipped notification_id: security_rearm_skipped - stop: Skipped - if: - condition: and conditions: - condition: time before: '14:00:00' after: '12:00:00' weekday: - mon - tue - wed - thu - fri - condition: state entity_id: input_boolean.kallen_school_early_release state: 'on' then: - stop: School early release - if: - condition: and conditions: - condition: state entity_id: alarm_control_panel.stratton_ave_alarm state: disarmed - condition: time after: 04:15:00 before: '13:30:00' then: - service: alarm_control_panel.alarm_arm_home target: entity_id: alarm_control_panel.nerdhome_alarm_panel data: {} mode: single - id: '1696285629788' alias: Lockdown Issue description: '' trigger: - platform: state entity_id: input_boolean.lockdown_issue from: 'off' to: 'on' condition: [] action: - service: persistent_notification.create data: title: Lockdown Issue notification_id: lockdown_issue message: '{% set faults = state_attr(''sensor.total_faults'',''faulted'') | join('', '') %} A lockdown issue has been caused by the following sensors: {{ faults }}' - service: script.text_notify data: type: critical who: "{% if states('person.christina_stork') in ['Bob Evans','BobEvans','unavailable','unknown'] %}\n tony\n{% else %}\n parents\n{% endif %}" title: Security Not Armed! tag: lockdown-issue message: '{% set faults = state_attr(''sensor.total_faults'',''faulted'') | join('', '') %} A lockdown issue has been caused by the following sensors: {{ faults }}' - if: - condition: state entity_id: binary_sensor.basement_occupied state: 'on' then: - service: scene.create data: scene_id: light_state_before_lockdown_issue snapshot_entities: - light.living_room_color_1 - light.living_room_color_2 - light.living_room_color_3 - light.tina_lamp_side - light.tina_lamp_top - light.stairwell_led_strip - light.basement_stairwell - light.basement_tall_lamp - light.basement_short_lamp - light.basement_led_strip_1 else: - service: scene.create data: scene_id: light_state_before_lockdown_issue snapshot_entities: - light.living_room_color_1 - light.living_room_color_2 - light.living_room_color_3 - light.tina_lamp_side - light.tina_lamp_top - light.stairwell_led_strip - delay: seconds: 1 - service: switch.turn_off target: entity_id: - switch.adaptive_lighting_living_room - switch.adaptive_lighting_tina_lamp - switch.adaptive_lighting_basement_studio data: {} - if: - condition: state entity_id: binary_sensor.basement_occupied state: 'on' then: - service: light.turn_on target: entity_id: - light.living_room_lights - light.tina_lamp - light.stairwell_led_strip - light.basement_studio_lights data: color_name: red brightness_pct: 100 else: - service: light.turn_on target: entity_id: - light.living_room_lights - light.tina_lamp - light.stairwell_led_strip data: color_name: red brightness_pct: 100 - service: script.status_annc data: who: common call_interruption: 1 call_lockdown_issue: 1 - wait_template: '{{ is_state(''binary_sensor.security_faults'',''off'') or is_state(''input_boolean.lockdown_issue'',''off'') }}' timeout: minutes: 10 - service: input_boolean.turn_off target: entity_id: input_boolean.lockdown_issue data: {} - delay: seconds: 3 - if: - condition: state entity_id: binary_sensor.security_faults state: 'off' then: - service: script.text_notify data: type: alert who: all message: clear_notification tag: lockdown-issue - service: persistent_notification.dismiss data: notification_id: lockdown_issue - if: - condition: state entity_id: binary_sensor.parents_home state: 'off' then: - service: alarm_control_panel.alarm_arm_away target: entity_id: alarm_control_panel.nerdhome_alarm_panel data: {} else: - service: alarm_control_panel.alarm_arm_home target: entity_id: alarm_control_panel.nerdhome_alarm_panel data: {} else: - service: script.speech_engine data: who: common message: I am unable to resolve the security issue, so I am giving up. Please report the issue to Tony if applicable. - service: scene.turn_on target: entity_id: scene.light_state_before_lockdown_issue data: {} - delay: seconds: 3 - service: switch.turn_on target: entity_id: - switch.adaptive_lighting_living_room - switch.adaptive_lighting_tina_lamp - switch.adaptive_lighting_basement_studio data: {} mode: single - id: '1696286192013' alias: Tina Desk Lights Handler description: Handles turning on the desk lights with smart scene selection and also turning them off triggers: - entity_id: input_select.tina_desk_scenes to: Reset id: reset alias: Reset trigger: state - entity_id: binary_sensor.tina_desktop_on from: 'off' to: 'on' id: computer-on alias: Computer On trigger: state conditions: [] actions: - alias: Reset if: - alias: Triggered by Reset or Computer On condition: or conditions: - condition: trigger id: reset alias: Reset - condition: trigger id: computer-on alias: Computer On then: - target: entity_id: input_select.tina_desk_scenes data: option: '{{ states(''sensor.tina_desk_scene'') }}' alias: Reset to appropriate default scene action: input_select.select_option mode: single - id: '1696286403914' alias: Basement Lights Handling description: Handles the presence-related automation of lights in the basement trigger: - platform: state entity_id: binary_sensor.basement_studio_door from: 'off' to: 'on' id: door-open - platform: state entity_id: binary_sensor.basement_studio_door from: 'on' to: 'off' id: door-closed - platform: event event_type: timer.finished event_data: entity_id: timer.basement_studio_door_timer id: timer-finished - platform: state entity_id: binary_sensor.basement_occupied from: 'off' to: 'on' id: basement-occupied - platform: state entity_id: binary_sensor.basement_occupied from: 'on' to: 'off' id: basement-unoccupied - platform: state entity_id: - input_boolean.studio_quiet - input_boolean.recliner_mode from: 'off' to: 'on' id: studio-quiet - platform: state entity_id: sensor.twitch_ironnerd24 from: offline to: streaming id: stream-started condition: - condition: state entity_id: input_boolean.studio_quiet state: 'off' action: - choose: - conditions: - condition: trigger id: door-open sequence: - if: - condition: state entity_id: light.basement_studio_lights state: 'off' then: - service: light.turn_on target: entity_id: light.basement_studio_lights data: {} - service: timer.cancel target: entity_id: timer.basement_studio_door_timer data: {} - conditions: - condition: trigger id: door-closed sequence: - if: - condition: state entity_id: binary_sensor.basement_occupied state: 'off' then: - service: timer.start target: entity_id: timer.basement_studio_door_timer data: duration: '{% from ''time.jinja'' import timer_duration %} {{ timer_duration(''input_number.basement_studio_lights_off_delay'') }} ' - conditions: - condition: trigger id: - basement-occupied - studio-quiet - stream-started sequence: - service: timer.cancel target: entity_id: timer.basement_studio_door_timer data: {} - conditions: - condition: trigger id: basement-unoccupied sequence: - if: - condition: state entity_id: light.basement_studio_lights state: 'on' then: - if: - condition: state entity_id: timer.basement_studio_door_timer state: idle then: - service: timer.start target: entity_id: timer.basement_studio_door_timer data: duration: '{% from ''time.jinja'' import timer_duration %} {{ timer_duration(''input_number.basement_studio_lights_off_delay'') }} ' - conditions: - condition: trigger id: timer-finished sequence: - service: light.turn_off target: entity_id: light.basement_studio_lights data: {} mode: restart - id: '1696286481890' alias: Recliner Mode description: For naptime in the basement triggers: - entity_id: input_boolean.recliner_mode from: 'off' to: 'on' id: recliner-on trigger: state - entity_id: input_boolean.recliner_mode from: 'on' to: 'off' id: recliner-off trigger: state conditions: [] actions: - choose: - conditions: - condition: trigger id: recliner-on sequence: - target: entity_id: input_select.basement_studio_scenes data: option: Stairwell action: input_select.select_option - target: entity_id: - input_boolean.white_noise_basement - input_boolean.studio_quiet data: {} action: input_boolean.turn_on - if: - condition: template value_template: "{% if is_state('media_player.basement_tv','playing') %}\n \ false\n{% elif is_state('media_player.basement_tv','paused') or is_state('media_player.basement_tv','idle') %}\n {{ state_attr('media_player.basement_tv','app_name') in ['TV','Android TV Launcher'] }}\n{% else %}\n false\n{% endif %}\n" then: - target: entity_id: media_player.basement_tv data: {} action: media_player.turn_off - if: - condition: not conditions: - condition: state entity_id: media_player.tony_asus state: playing then: - target: entity_id: script.tony_desktop_displays_off data: {} action: script.turn_on - conditions: - condition: trigger id: recliner-off sequence: - data: {} target: entity_id: light.basement_studio_lights alias: Turn off the remaining lights action: light.turn_off - delay: hours: 0 minutes: 0 seconds: 0 milliseconds: 500 - data: {} target: entity_id: switch.adaptive_lighting_basement_studio alias: Turn on Adaptive Lighting to read the current values action: switch.turn_on - delay: hours: 0 minutes: 0 seconds: 0 milliseconds: 500 - variables: brightness: '{{ state_attr(''switch.adaptive_lighting_basement_studio'',''brightness_pct'') | int }}' fade_delay: "{% from 'time.jinja' import timer_duration %} {% if is_state('binary_sensor.early_night_mode','on') %}\n {{ timer_duration('input_number.wakeup_lights_fade_night') }}\n{% else %}\n {{ timer_duration('input_number.wakeup_lights_fade_day') }}\n{% endif %}" alias: Set intended brightness and fade delay - target: entity_id: - input_boolean.studio_quiet data: {} alias: Turn off the quiet switch action: input_boolean.turn_off - data: brightness_pct: '{{ brightness|default(70) }}' transition: '{{ fade_delay|default(300) }}' target: entity_id: light.basement_studio_lights alias: Fade the lights in gradually action: light.turn_on - alias: Wait for lights to fade in unless interrupted wait_for_trigger: - entity_id: - light.basement_studio_lights to: 'off' id: lights-off trigger: state - entity_id: - input_select.basement_studio_scenes to: Adaptive id: adaptive trigger: state - entity_id: - binary_sensor.tony_desktop_idle from: 'on' to: 'off' id: computer trigger: state timeout: minutes: "{% if is_state('binary_sensor.early_night_mode','on') %}\n {{ states('input_number.wakeup_lights_fade_night') }}\n{% else %}\n {{ states('input_number.wakeup_lights_fade_day') }}\n{% endif %}\n" continue_on_timeout: true - alias: Take action after timeout or interruption choose: - conditions: - alias: Adaptive condition: template value_template: '{{ wait.trigger.id == ''adaptive'' }}' sequence: - data: manual_control: false entity_id: switch.adaptive_lighting_basement_studio alias: Reset manual control action: adaptive_lighting.set_manual_control - conditions: - alias: Nothing condition: template value_template: '{{ wait.trigger == ''none'' or wait.trigger.idx is undefined }}' sequence: - data: option: Adaptive target: entity_id: input_select.basement_studio_scenes alias: Set scene back to adaptive action: input_select.select_option - data: manual_control: false entity_id: switch.adaptive_lighting_basement_studio alias: Reset manual control action: adaptive_lighting.set_manual_control - conditions: - condition: template value_template: '{{ wait.trigger.id == ''lights-off'' }}' alias: Lights off sequence: - data: value: Adaptive target: entity_id: input_text.basement_studio_selected_scene alias: Reset selected scene input text action: input_text.set_value - data: manual_control: false entity_id: switch.adaptive_lighting_basement_studio alias: Reset manual control action: adaptive_lighting.set_manual_control - target: entity_id: - input_boolean.white_noise_basement data: {} alias: Turn off white noise action: input_boolean.turn_off - alias: If my computer is on, turn the screens back on if: - condition: template value_template: '{{ is_state(''binary_sensor.tony_desktop_on'',''on'') or states(''sensor.tony_asus_current_username'') not in [''unavailable'',''unknown''] }}' then: - alias: Turn the screens back on target: entity_id: - script.tony_desktop_displays_on data: {} action: script.turn_on - target: entity_id: media_player.basement_tv data: {} action: media_player.turn_on mode: restart - id: '1696286540644' alias: Basement Lights Adaptive Resync description: Deals with situations where the basement lights should be adaptive but end up out of sync trigger: - platform: state entity_id: - binary_sensor.basement_studio_sync_issue from: 'off' to: 'on' condition: - condition: state entity_id: input_boolean.studio_quiet state: 'off' - condition: template value_template: '{{ is_state_attr(''light.basement_studio_lights'',''color_mode'',''color_temp'') }}' action: - service: adaptive_lighting.apply data: entity_id: switch.adaptive_lighting_basement_studio adapt_brightness: '{{ is_state(''switch.adaptive_lighting_adapt_brightness_basement_studio'',''on'') }}' adapt_color: '{{ is_state(''switch.adaptive_lighting_adapt_color_basement_studio'',''on'') }}' mode: restart - id: '1696286644401' alias: Basement LED Strip Reset description: Power cycle the LED strip when it goes unavailable trigger: - platform: state entity_id: light.basement_led_strip_1 to: unavailable for: minutes: 5 id: offline - platform: state entity_id: input_button.basement_led_strip_reset not_to: - unavailable - unknown id: button condition: - condition: template value_template: '{{ is_state(''input_boolean.studio_quiet'',''off'') and is_state(''sensor.twitch_ironnerd24'',''offline'') and states(''switch.basement_led_strip'') not in [''unknown'',''unavailable''] }}' action: - repeat: while: - condition: state entity_id: light.basement_led_strip_1 state: unavailable - condition: template value_template: '{{ repeat.index <= 10 }}' sequence: - service: counter.increment target: entity_id: counter.basement_led_strip_resets data: {} - service: switch.turn_off target: entity_id: switch.basement_led_strip data: {} - delay: seconds: 20 - service: switch.turn_on target: entity_id: switch.basement_led_strip data: {} - delay: seconds: 30 mode: single - id: '1696286732266' alias: Living Room Lights Adaptive Resync description: Deals with situations where the living room lights should be adaptive but end up out of sync trigger: - platform: state entity_id: binary_sensor.living_room_sync_issue from: 'off' to: 'on' condition: - condition: template value_template: '{{ is_state_attr(''light.living_room_lights'',''color_mode'',''color_temp'') }}' action: - service: adaptive_lighting.apply data: entity_id: switch.adaptive_lighting_living_room adapt_brightness: '{{ is_state(''switch.adaptive_lighting_adapt_brightness_living_room'',''on'') }}' adapt_color: '{{ is_state(''switch.adaptive_lighting_adapt_color_living_room'',''on'') }}' mode: restart - id: '1696286814384' alias: Vacation Lighting description: Turns on lights for helpers who come over (such as to take care of the cats) while we are gone trigger: - platform: state entity_id: binary_sensor.front_door to: 'on' id: door - platform: event event_type: timer.finished event_data: entity_id: timer.vacation_helper id: timer-finished condition: - condition: state entity_id: input_boolean.vacation_mode state: 'on' action: - choose: - conditions: - condition: trigger id: door sequence: - service: input_boolean.turn_on target: entity_id: input_boolean.audible_notifications data: {} - service: switch.turn_off metadata: {} data: {} target: entity_id: switch.stairwell_motion_lighting - service: light.turn_on target: entity_id: - light.basement_studio_lights - light.first_floor_lights - light.second_floor_lights data: {} - service: switch.turn_off target: entity_id: switch.presence_simulation data: {} - delay: seconds: 3 - service: input_select.select_option target: entity_id: - input_select.basement_studio_scenes - input_select.living_room_scenes - input_select.downstairs_bathroom_scenes - input_select.mud_room_scenes - input_select.upstairs_hallway_scenes - input_select.upstairs_bathroom_scenes - input_select.master_bedroom_scenes - input_select.kallen_bedroom_scenes - input_select.emma_bedroom_scenes data: option: Adaptive - service: input_select.select_option target: entity_id: input_select.tina_desk_scenes data: option: Evening Mode - service: timer.start target: entity_id: timer.vacation_helper data: duration: 01:00:00 - service: script.speech_engine data: who: living_room message: Welcome, vacation helper. I have turned on every light in the house for you. They will remain on for one hour. Thank you for your help. type: alert - conditions: - condition: trigger id: timer-finished sequence: - service: switch.turn_on metadata: {} data: {} target: entity_id: switch.stairwell_motion_lighting - service: light.turn_off target: entity_id: - light.basement_studio_lights - light.first_floor_lights - light.second_floor_lights data: {} - service: switch.turn_on target: entity_id: switch.presence_simulation data: {} - service: input_boolean.turn_off target: entity_id: input_boolean.audible_notifications data: {} mode: restart - id: '1696288846954' alias: Tony Meds Handler description: Handles the scheduling of medication reminders for Tony triggers: - minutes: /30 id: trigger30 alias: Every 30 minutes trigger: time_pattern - at: input_datetime.tony_morning_meds_notify id: morning-notify alias: Morning Notify trigger: time - at: input_datetime.tony_afternoon_meds_notify id: afternoon-notify alias: Afternoon Notify trigger: time - at: input_datetime.tony_night_meds_notify id: night-notify alias: Night Notify trigger: time - entity_id: - input_boolean.tony_morning_meds_taken to: 'on' id: boolean-morning alias: Morning Taken from: 'off' trigger: state - entity_id: - input_boolean.tony_afternoon_meds_taken id: boolean-afternoon from: 'off' to: 'on' alias: Afternoon Taken trigger: state - entity_id: - input_boolean.tony_night_meds_taken id: boolean-night alias: Night Taken from: 'off' to: 'on' trigger: state - event_type: wakeup_event event_data: who: tony type: wakeup context: user_id: - c3909d27048140729f002aaef0391775 alias: Wakeup id: wakeup trigger: event - event_type: ios.action_fired id: manual-wakeup event_data: actionName: Manual Wakeup context: user_id: - c3909d27048140729f002aaef0391775 alias: Manual Wakeup trigger: event - entity_id: - input_number.tony_afternoon_meds_interval - input_datetime.tony_morning_meds_taken alias: Afternoon Update id: afternoon-update trigger: state conditions: [] actions: - alias: Routing choose: - conditions: - condition: trigger id: - trigger30 sequence: - alias: Check morning reminder switch if: - condition: state entity_id: input_boolean.tony_morning_meds_reminder state: 'on' alias: Morning meds reminder needed then: - metadata: {} data: {} alias: Run morning meds notification script action: script.tony_morning_meds - alias: Check afternoon reminder switch if: - alias: Afternoon meds reminder needed condition: state entity_id: input_boolean.tony_afternoon_meds_reminder state: 'on' then: - alias: Run afternoon meds notification script data: {} action: script.tony_afternoon_meds - alias: Check night reminder switch if: - condition: state entity_id: input_boolean.tony_night_meds_reminder state: 'on' alias: Night meds reminder needed then: - metadata: {} data: {} alias: Run night meds notification script action: script.tony_night_meds alias: Every 30 minutes - conditions: - condition: and conditions: - condition: trigger id: morning-notify - condition: state entity_id: input_boolean.tony_morning_meds_taken state: 'off' alias: Morning Notify sequence: - metadata: {} data: {} target: entity_id: input_boolean.tony_morning_meds_reminder alias: Activate morning reminders action: input_boolean.turn_on - metadata: {} data: {} alias: Run morning meds notification script action: script.tony_morning_meds - conditions: - alias: Afternoon Notify condition: and conditions: - condition: trigger id: - afternoon-notify - condition: state entity_id: input_boolean.tony_afternoon_meds_taken state: 'off' sequence: - alias: Activate afternoon reminders metadata: {} data: {} target: entity_id: input_boolean.tony_afternoon_meds_reminder action: input_boolean.turn_on - alias: Run afternoon meds notification script data: {} action: script.tony_afternoon_meds - conditions: - condition: and conditions: - condition: trigger id: - night-notify - condition: state entity_id: input_boolean.tony_night_meds_taken state: 'off' alias: Night Notify sequence: - alias: Activate night reminders metadata: {} data: {} target: entity_id: input_boolean.tony_night_meds_reminder action: input_boolean.turn_on - metadata: {} data: {} alias: Run night meds notification script action: script.tony_night_meds - conditions: - condition: trigger id: boolean-morning alias: Morning Taken sequence: - target: entity_id: input_datetime.tony_morning_meds_taken data: datetime: '{% from ''time.jinja'' import set_datetime %} {{ set_datetime(0) }} ' alias: Set time morning meds were taken action: input_datetime.set_datetime - metadata: {} data: {} target: entity_id: input_boolean.tony_morning_meds_reminder alias: Deactivate morning reminders action: input_boolean.turn_off - metadata: {} data: type: alert who: tony message: clear_notification tag: tony-left-meds alias: Clear tony-left-meds notification tag action: script.text_notify - conditions: - condition: trigger id: - boolean-afternoon alias: Afternoon Taken sequence: - target: entity_id: input_datetime.tony_afternoon_meds_taken data: datetime: '{% from ''time.jinja'' import set_datetime %} {{ set_datetime(0) }} ' alias: Set time afternoon meds were taken action: input_datetime.set_datetime - alias: Deactivate afternoon reminders metadata: {} data: {} target: entity_id: input_boolean.tony_afternoon_meds_reminder action: input_boolean.turn_off - metadata: {} data: type: alert who: tony message: clear_notification tag: tony-left-meds alias: Clear tony-left-meds notification tag action: script.text_notify - conditions: - condition: trigger id: boolean-night alias: Night Taken sequence: - target: entity_id: input_datetime.tony_night_meds_taken data: datetime: '{% from ''time.jinja'' import set_datetime %} {{ set_datetime(0) }} ' alias: Set time night meds were taken action: input_datetime.set_datetime - alias: Deactivate night reminders metadata: {} data: {} target: entity_id: input_boolean.tony_night_meds_reminder action: input_boolean.turn_off - metadata: {} data: type: alert who: tony message: clear_notification tag: tony-left-meds alias: Clear tony-left-meds notification tag action: script.text_notify - conditions: - alias: Wakeup condition: trigger id: - wakeup - manual-wakeup sequence: - target: entity_id: input_datetime.tony_morning_meds_notify data: datetime: '{% from ''time.jinja'' import set_datetime %} {{ set_datetime(0,1) }} ' alias: Set time to start notifying for morning meds action: input_datetime.set_datetime - target: entity_id: input_datetime.tony_afternoon_meds_notify data: datetime: '{% from ''time.jinja'' import set_datetime %} {% set morning = state_attr(''input_datetime.tony_morning_meds_notify'',''timestamp'') | int %} {% set interval = states(''input_number.tony_afternoon_meds_interval'') | int %} {% set math = (interval * 60) * 60 %} {% set newtime = morning + math %} {{ newtime | timestamp_custom(''%Y-%m-%d %H:%M:%S'') }} ' alias: Set time to start notifying for afternoon meds action: input_datetime.set_datetime - target: entity_id: input_datetime.tony_night_meds_notify data: date: '{% from ''time.jinja'' import set_datetime %} {% set current = as_timestamp(now()) %} {% set math = (24 * 60) * 60 %} {% set newtime = current + math %} {{ newtime | timestamp_custom(''%Y-%m-%d'') }} ' time: 04:00:00 alias: Set time to start notifying for night meds action: input_datetime.set_datetime - alias: Turn off all meds booleans metadata: {} data: {} target: entity_id: - input_boolean.tony_morning_meds_taken - input_boolean.tony_afternoon_meds_taken - input_boolean.tony_night_meds_taken - input_boolean.tony_morning_meds_reminder - input_boolean.tony_afternoon_meds_reminder - input_boolean.tony_night_meds_reminder action: input_boolean.turn_off - conditions: - condition: trigger id: - afternoon-update alias: Afternoon Update sequence: - target: entity_id: input_datetime.tony_afternoon_meds_notify data: datetime: '{% from ''time.jinja'' import set_datetime %} {% set morning = state_attr(''input_datetime.tony_morning_meds_taken'',''timestamp'') | int %} {% set interval = states(''input_number.tony_afternoon_meds_interval'') | int %} {% set math = (interval * 60) * 60 %} {% set newtime = morning + math %} {{ newtime | timestamp_custom(''%Y-%m-%d %H:%M:%S'') }} ' alias: Update notification action: input_datetime.set_datetime mode: parallel max: 12 - id: '1696288939707' alias: Tony Stream Today description: '' trigger: - platform: time at: 08:00:00 condition: - condition: template value_template: '{% from ''time.jinja'' import calendar_event_today %} {{ calendar_event_today(''calendar.tony_s_twitch_schedule'') }} ' action: - service: script.tony_stream_today data: {} mode: single initial_state: true - id: '1696293127764' alias: Timer Handling description: This automation will handle when house timers (usually set by voice) are finished trigger: - platform: event event_type: timer.finished event_data: entity_id: timer.kitchen_timer id: kitchen-finished condition: [] action: - choose: - conditions: '{{ trigger.id == ''kitchen-finished'' }}' sequence: - service: script.speech_engine data: type: normal who: common message: The timer for the kitchen is finished mode: queued max: 10 - id: '1696356974829' alias: Scheduled Reset description: Reset all context entities for the next day at the appropriate times trigger: - platform: time at: 00:00:00 id: midnight - platform: time at: input_datetime.audible_notification_on id: audible-on - platform: time at: input_datetime.kallen_school_day_end id: school-end - platform: state entity_id: sensor.twitch_ironnerd24 from: streaming to: offline id: stream-offline - platform: time at: 04:00:00 id: 4am - platform: time at: '16:00:00' id: 4pm - platform: time at: 06:00:00 id: 6am condition: [] action: - choose: - conditions: - condition: trigger id: midnight sequence: - service: script.scheduling_reset data: {} - service: script.kallen_school_reset_late data: {} - service: automation.turn_on target: entity_id: - automation.scheduled_alarm_rearm - automation.scheduled_alarm_disarm data: {} - service: input_boolean.turn_off target: entity_id: - input_boolean.skip_disarm - input_boolean.skip_rearm data: {} - service: counter.reset target: entity_id: - counter.back_door_opened_today - counter.front_door_opened_today - counter.basement_studio_door_opened_today - counter.basement_led_strip_resets data: {} - conditions: - condition: trigger id: - audible-on sequence: - service: script.reset_annc_switches data: {} - conditions: - condition: trigger id: school-end sequence: - service: script.kallen_school_reset data: {} - conditions: - condition: trigger id: stream-offline sequence: - service: input_boolean.turn_off target: entity_id: input_boolean.tony_streaming_today data: {} - conditions: - condition: trigger id: 4am sequence: - service: input_boolean.turn_off target: entity_id: - input_boolean.kallen_morning_meds_taken - input_boolean.kallen_night_meds_taken - input_boolean.tina_morning_meds_taken - input_boolean.emma_scheduling_evening_ran data: {} - service: counter.reset target: entity_id: - counter.tony_morning_meds_reminder_count - counter.tony_afternoon_meds_reminder_count data: {} - conditions: - condition: trigger id: 6am sequence: - if: - condition: state entity_id: sensor.twitch_ironnerd24 state: offline then: - service: input_boolean.turn_off target: entity_id: input_boolean.tony_streaming_today data: {} - conditions: - condition: trigger id: 4pm sequence: - service: input_boolean.turn_off target: entity_id: - input_boolean.tina_night_meds_taken data: {} mode: restart - id: '1696361494561' alias: Turn On Audible Notifications description: '' trigger: - platform: time at: input_datetime.audible_notification_on condition: - condition: state entity_id: input_boolean.vacation_mode state: 'off' action: - service: input_boolean.turn_on target: entity_id: input_boolean.audible_notifications data: {} alias: Turn on audible notifications - service: switch.turn_off target: entity_id: - switch.living_room_echo_dot_do_not_disturb_switch data: {} alias: Turn off DND mode on Living Room Echo Dot - service: script.volume_reset data: {} alias: Reset volumes mode: single initial_state: true - id: '1696361569078' alias: Turn Off Audible Notifications description: '' trigger: - platform: time at: input_datetime.audible_notification_off condition: - condition: state entity_id: input_boolean.vacation_mode state: 'off' action: - service: input_boolean.turn_off target: entity_id: input_boolean.audible_notifications data: {} alias: Turn off audible notifications mode: single initial_state: true - id: '1696361739711' alias: Kallen Briefings description: '' trigger: - platform: time at: input_datetime.kallen_morning_briefing id: kallen-morning alias: Morning Briefing Time - platform: time at: input_datetime.kallen_nightly_briefing id: kallen-nightly alias: Nightly Briefing Time condition: - condition: state entity_id: input_boolean.kallen_overnight state: 'off' alias: Kallen is not staying overnight elsewhere - condition: state entity_id: input_boolean.vacation_mode state: 'off' alias: We are not on vacation action: - choose: - conditions: - condition: and conditions: - condition: trigger id: kallen-morning - condition: state entity_id: input_boolean.kallen_morning_briefing state: 'off' alias: Morning Briefing sequence: - service: script.kallen_morning_briefing data: {} alias: Run morning briefing script - conditions: - condition: and conditions: - condition: trigger id: kallen-nightly - condition: state entity_id: input_boolean.kallen_nightly_briefing state: 'off' alias: Nightly Briefing sequence: - service: script.kallen_nightly_briefing data: {} alias: Run nightly briefing script alias: Choose briefing mode: single - id: '1696362054868' alias: House Briefings description: '' triggers: - at: input_datetime.morning_briefing id: house-morning alias: Morning Briefing Time trigger: time - at: input_datetime.daily_briefing id: house-daily alias: Daily Briefing Time trigger: time - at: input_datetime.nightly_briefing id: house-nightly alias: Nightly Briefing Time trigger: time conditions: - condition: state entity_id: input_boolean.vacation_mode state: 'off' alias: We are not on vacation actions: - alias: Choose briefing choose: - conditions: - alias: Morning Briefing condition: and conditions: - condition: trigger id: house-morning - condition: state entity_id: input_boolean.morning_briefing_allowed state: 'on' - condition: state entity_id: input_boolean.good_morning state: 'off' sequence: - alias: Skip if Kallen has school but stayed overnight elsewhere if: - condition: template value_template: "{% if is_state('input_boolean.kallen_school_today','on') and is_state('input_boolean.kallen_overnight','on') %}\n false\n{% else %}\n true\n{% endif %}\n" alias: If Kallen was not elsewhere overnight on a school morning then: - data: who: '{{ ''alexa_everywhere'' if is_state(''binary_sensor.master_bedroom_occupied'',''on'') else ''common'' }} ' alias: Run morning briefing script action: script.morning_briefing - conditions: - alias: Daily Briefing condition: and conditions: - condition: trigger id: house-daily - condition: state entity_id: input_boolean.daily_briefing_allowed state: 'on' - condition: state entity_id: input_boolean.daily_briefing state: 'off' sequence: - data: who: '{{ ''alexa_everywhere'' if is_state(''binary_sensor.master_bedroom_occupied'',''on'') else ''common'' }} ' alias: Run daily briefing script action: script.daily_briefing - conditions: - alias: Nightly Briefing condition: and conditions: - condition: trigger id: house-nightly - condition: state entity_id: input_boolean.nightly_briefing_allowed state: 'on' - condition: state entity_id: input_boolean.nightly_briefing state: 'off' sequence: - data: who: '{{ ''alexa_everywhere'' if is_state(''binary_sensor.master_bedroom_occupied'',''on'') else ''common'' }} ' alias: Run nightly briefing script action: script.nightly_briefing mode: single - id: '1696362140540' alias: Kallen Briefing Location Change description: '' trigger: - platform: state entity_id: input_boolean.kallen_awake from: 'off' to: 'on' alias: When Kallen wakes up condition: - condition: state entity_id: input_boolean.kallen_school_today state: 'on' alias: Kallen has school today - condition: state entity_id: input_boolean.kallen_overnight state: 'off' alias: Kallen did not stay overnight elsewhere - condition: time before: input_datetime.kallen_wakeup_time alias: It is before Kallen's scheduled wakeup time action: - service: input_select.select_option data: option: Common Areas target: entity_id: input_select.kallen_morning_briefing_location alias: Move morning briefing to common areas mode: single - id: '1696539209438' alias: Tony Custom Meds Handler description: '' trigger: - platform: time at: input_datetime.tony_custom_meds_notify_p1 alias: Notify 1 id: p1-notify - platform: state entity_id: - input_boolean.tony_custom_meds_taken_p1 from: 'off' to: 'on' id: p1-taken alias: Taken 1 condition: [] action: - variables: trigger: '{{ trigger.id }}' num: '{{ trigger[:2] }}' reason: '{{ trigger.split(''-'')[1] }}' - if: - condition: template value_template: '{% set active = ''input_boolean.tony_custom_meds_tracker_'' + num %} {{ is_state(active,''on'') }}' alias: Check tracker then: - if: - condition: template value_template: '{{ reason == ''notify'' }}' alias: Is this a notification then: - service: input_boolean.turn_off data: {} target: entity_id: '{{ ''input_boolean.tony_custom_meds_taken_'' + num }}' alias: Turn off "taken" boolean alias: Turn off "taken" boolean if this is a notification - service: script.tony_custom_meds data: num: '{{ num }}' reason: '{{ reason }}' alias: Run custom meds script alias: Run custom meds script if tracker is active mode: parallel max: 10 - id: '1696556688808' alias: Rain Window Warning description: Warn when it starts raining and a window is open trigger: - platform: state entity_id: binary_sensor.raining from: 'off' to: 'on' alias: Rain starts condition: - condition: state entity_id: binary_sensor.windows state: 'on' alias: Windows are open action: - variables: porch: "{% set windows = states('sensor.windows_open') | int %} {% set front = states('sensor.front_windows_open') | int %} {% if windows == front %}\n \ true\n{% else %}\n false\n{% endif %}" message: "{% if porch == 'true' %}\n It is raining and a window by the porch is open. This is generally acceptable, but please close it if the wind is blowing in.\n{% else %}\n It is raining and there are windows open in the house. Please close them!\n{% endif %}\n" alias: Define variables - parallel: - service: script.text_notify data: type: alert who: all title: WINDOWS ARE OPEN! message: '{{ message }}' tag: rain-window-warning alias: Send text notification - service: script.speech_engine data: who: everywhere type: weather message: '{{ message }}' alias: TTS notification - service: script.living_room_lights_alert data: type: blue duration: 10 alias: Light alert in living room - if: - condition: state entity_id: binary_sensor.basement_occupied state: 'on' alias: Basement is occupied then: - service: script.basement_lights_alert data: type: blue duration: 10 alias: Light alert in basement alias: Light alert in basement, if occupied alias: Send the various alerts - wait_template: '{{ is_state(''binary_sensor.windows'',''off'') or is_state(''binary_sensor.raining'',''off'') }}' timeout: 00:15:00 continue_on_timeout: true alias: Wait until windows are shut, or it happens to stop raining - choose: - conditions: - condition: template value_template: '{{ is_state(''binary_sensor.windows'',''off'') and is_state(''binary_sensor.raining'',''on'') }}' alias: Windows closed and still raining sequence: - service: script.text_notify data: type: alert who: all message: clear_notification tag: rain-window-warning alias: Clear text notification - service: script.speech_engine data: who: common type: weather message: Windows are now closed. Thank you, and enjoy your dry house. alias: TTS notification - conditions: - condition: template value_template: '{{ is_state(''binary_sensor.raining'',''off'') }}' alias: Stopped raining sequence: - service: script.text_notify data: type: alert who: all message: clear_notification tag: rain-window-warning alias: Clear text notification - service: script.speech_engine data: who: common type: weather message: Nevermind, it has stopped raining. Feel free to do whatever you'd like with the windows. alias: TTS notification default: - service: script.speech_engine data: who: common type: weather message: Well, I guess no one cares if the house floods. Suit yourself, but do not say I didn't warn you. alias: TTS notification alias: After wait completed mode: single - id: '1696884613752' alias: Tony Sleep Handling description: Awareness of when Tony is asleep or wakes up trigger: - platform: event event_type: wakeup_event event_data: who: tony type: alarm context: user_id: - c3909d27048140729f002aaef0391775 alias: Any Alarm id: wake-alarm - platform: event event_type: wakeup_event event_data: who: tony type: wakeup context: user_id: - c3909d27048140729f002aaef0391775 alias: Wakeup id: wake-sched - platform: zone entity_id: person.tony_stork zone: zone.home event: leave alias: Leave Home id: wake-leave - platform: conversation command: Tony is awake id: wake-sentence alias: Sentence - platform: state entity_id: - binary_sensor.tony_s_iphone_focus from: 'on' to: 'off' for: hours: 0 minutes: 0 seconds: 30 alias: Focus off id: wake-focus - platform: state entity_id: - binary_sensor.tony_desktop_on from: 'off' to: 'on' alias: Computer id: wake-computer condition: [] action: - alias: Routing choose: - conditions: - condition: trigger id: - wake-alarm - wake-sched - wake-leave - wake-sentence - wake-focus - wake-computer alias: Wakeup sequence: - delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0 - alias: On specific triggers, reset basement briefing if: - condition: trigger id: - wake-alarm - wake-sched - wake-sentence alias: When triggered by alarm, schedule, or sentence then: - service: input_boolean.turn_off metadata: {} data: {} target: entity_id: input_boolean.basement_briefing alias: Reset basement briefing - service: input_boolean.turn_on data: {} target: entity_id: input_boolean.tony_awake alias: Set context that I am awake mode: restart - id: '1696985389177' alias: Master Bedroom Adaptive Resync description: Deals with situations where the master bedroom lights should be adaptive but end up out of sync trigger: - platform: state entity_id: - binary_sensor.master_bedroom_sync_issue from: 'off' to: 'on' condition: [] action: - service: adaptive_lighting.apply data: entity_id: switch.adaptive_lighting_master_bedroom adapt_brightness: '{{ is_state(''switch.adaptive_lighting_adapt_brightness_master_bedroom'',''on'') }}' mode: restart - id: '1697819133179' alias: Give Me Darkness description: Automatically trigger Give Me Darkness if it has not already happened trigger: - platform: template value_template: '{% from ''time.jinja'' import ct %} {% set ct = ct() | int %} {% set bedtime = states(''input_datetime.kallen_bedtime'') | int + 1800 %} {{ ct >= bedtime }}' alias: When it is half an hour past K's bedtime condition: - condition: state entity_id: input_boolean.give_me_darkness state: 'off' alias: Give Me Darkness isn't already on - condition: state entity_id: binary_sensor.parents_home state: 'on' alias: We are home action: - alias: Announce activation service: script.status_annc data: call_interruption: 1 call_give_me_darkness: 1 - delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0 - service: script.give_me_darkness data: auto: 1 alias: Run the original Give Me Darkness script mode: single - id: '1698169213378' alias: Speedtest Update description: Update the speedtest sensors, with exceptions for considerate network usage trigger: - platform: time_pattern hours: /1 condition: - condition: state entity_id: sensor.twitch_ironnerd24 state: offline - condition: state entity_id: input_boolean.studio_quiet state: 'off' - condition: state entity_id: input_boolean.gaming_mode state: 'off' action: - service: homeassistant.update_entity data: {} target: entity_id: sensor.speedtest_download alias: Speedtest Download - delay: hours: 0 minutes: 0 seconds: 15 milliseconds: 0 - service: homeassistant.update_entity data: {} target: entity_id: sensor.speedtest_upload alias: Speedtest Upload - delay: hours: 0 minutes: 0 seconds: 15 milliseconds: 0 - service: homeassistant.update_entity data: {} target: entity_id: sensor.speedtest_ping alias: Speedtest Ping mode: restart - id: '1700520648880' alias: Adaptive Lighting Adjustments - Living Room description: '' trigger: - platform: homeassistant event: start id: boot alias: On boot - platform: state not_from: - unavailable - unknown entity_id: - input_number.daytime_colortemp_living_room id: day-colortemp alias: Day Colortemp - platform: state not_from: - unavailable - unknown entity_id: - input_number.nighttime_colortemp_living_room id: night-colortemp alias: Night Colortemp - platform: state not_from: - unavailable - unknown entity_id: - input_number.nighttime_brightness_living_room id: night-brightness alias: Night Brightness condition: - condition: state entity_id: input_boolean.adaptive_lighting_adjustments state: 'on' action: - choose: - conditions: - condition: trigger id: - boot sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: configuration entity_id: switch.adaptive_lighting_living_room min_brightness: '{{ states(''input_number.nighttime_brightness_living_room'') }}' min_color_temp: '{{ states(''input_number.nighttime_colortemp_living_room'') }}' max_color_temp: '{{ states(''input_number.daytime_colortemp_living_room'') }}' alias: Boot - conditions: - condition: trigger id: - day-colortemp sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: current entity_id: switch.adaptive_lighting_living_room max_color_temp: '{{ states(''input_number.daytime_colortemp_living_room'') }}' alias: Day Colortemp - conditions: - condition: trigger id: - night-colortemp sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: current entity_id: switch.adaptive_lighting_living_room min_color_temp: '{{ states(''input_number.nighttime_colortemp_living_room'') }}' alias: Night Colortemp - conditions: - condition: trigger id: - night-brightness sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: current entity_id: switch.adaptive_lighting_living_room min_brightness: '{{ states(''input_number.nighttime_brightness_living_room'') }}' alias: Night Brightness mode: queued max: 10 - id: '1700520841783' alias: Adaptive Lighting Adjustments - Tina Lamp description: '' trigger: - platform: homeassistant event: start id: boot alias: On boot - platform: state not_from: - unavailable - unknown entity_id: - input_number.daytime_colortemp_tina_lamp id: day-colortemp alias: Day Colortemp - platform: state not_from: - unavailable - unknown entity_id: - input_number.nighttime_colortemp_tina_lamp id: night-colortemp alias: Night Colortemp - platform: state not_from: - unavailable - unknown entity_id: - input_number.nighttime_brightness_tina_lamp id: night-brightness alias: Night Brightness condition: - condition: state entity_id: input_boolean.adaptive_lighting_adjustments state: 'on' action: - choose: - conditions: - condition: trigger id: - boot sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: configuration entity_id: switch.adaptive_lighting_tina_lamp min_brightness: '{{ states(''input_number.nighttime_brightness_tina_lamp'') }}' min_color_temp: '{{ states(''input_number.nighttime_colortemp_tina_lamp'') }}' max_color_temp: '{{ states(''input_number.daytime_colortemp_tina_lamp'') }}' alias: Boot - conditions: - condition: trigger id: - day-colortemp sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: current entity_id: switch.adaptive_lighting_tina_lamp max_color_temp: '{{ states(''input_number.daytime_colortemp_tina_lamp'') }}' alias: Day Colortemp - conditions: - condition: trigger id: - night-colortemp sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: current entity_id: switch.adaptive_lighting_tina_lamp min_color_temp: '{{ states(''input_number.nighttime_colortemp_tina_lamp'') }}' alias: Night Colortemp - conditions: - condition: trigger id: - night-brightness sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: current entity_id: switch.adaptive_lighting_tina_lamp min_brightness: '{{ states(''input_number.nighttime_brightness_tina_lamp'') }}' alias: Night Brightness mode: queued max: 10 - id: '1700520887617' alias: Adaptive Lighting Adjustments - Front Porch description: '' trigger: - platform: homeassistant event: start id: boot alias: On boot - platform: state not_from: - unavailable - unknown entity_id: - input_number.daytime_colortemp_front_porch id: day-colortemp alias: Day Colortemp - platform: state not_from: - unavailable - unknown entity_id: - input_number.nighttime_colortemp_front_porch id: night-colortemp alias: Night Colortemp condition: - condition: state entity_id: input_boolean.adaptive_lighting_adjustments state: 'on' action: - choose: - conditions: - condition: trigger id: - boot sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: configuration entity_id: switch.adaptive_lighting_front_porch min_color_temp: '{{ states(''input_number.nighttime_colortemp_front_porch'') }}' max_color_temp: '{{ states(''input_number.daytime_colortemp_front_porch'') }}' alias: Boot - conditions: - condition: trigger id: - day-colortemp sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: current entity_id: switch.adaptive_lighting_front_porch max_color_temp: '{{ states(''input_number.daytime_colortemp_front_porch'') }}' alias: Day Colortemp - conditions: - condition: trigger id: - night-colortemp sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: current entity_id: switch.adaptive_lighting_front_porch min_color_temp: '{{ states(''input_number.nighttime_colortemp_front_porch'') }}' alias: Night Colortemp mode: queued max: 10 - id: '1700520948177' alias: Adaptive Lighting Adjustments - Basement Studio description: '' trigger: - platform: homeassistant event: start id: boot alias: On boot - platform: state not_from: - unavailable - unknown entity_id: - input_number.daytime_colortemp_basement_studio id: day-colortemp alias: Day Colortemp - platform: state not_from: - unavailable - unknown entity_id: - input_number.nighttime_colortemp_basement_studio id: night-colortemp alias: Night Colortemp - platform: state not_from: - unavailable - unknown entity_id: - input_number.nighttime_brightness_basement_studio id: night-brightness alias: Night Brightness condition: - condition: state entity_id: input_boolean.adaptive_lighting_adjustments state: 'on' action: - choose: - conditions: - condition: trigger id: - boot sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: configuration entity_id: switch.adaptive_lighting_basement_studio min_brightness: '{{ states(''input_number.nighttime_brightness_basement_studio'') }}' min_color_temp: '{{ states(''input_number.nighttime_colortemp_basement_studio'') }}' max_color_temp: '{{ states(''input_number.daytime_colortemp_basement_studio'') }}' alias: Boot - conditions: - condition: trigger id: - day-colortemp sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: current entity_id: switch.adaptive_lighting_basement_studio max_color_temp: '{{ states(''input_number.daytime_colortemp_basement_studio'') }}' alias: Day Colortemp - conditions: - condition: trigger id: - night-colortemp sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: current entity_id: switch.adaptive_lighting_basement_studio min_color_temp: '{{ states(''input_number.nighttime_colortemp_basement_studio'') }}' alias: Night Colortemp - conditions: - condition: trigger id: - night-brightness sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: current entity_id: switch.adaptive_lighting_basement_studio min_brightness: '{{ states(''input_number.nighttime_brightness_basement_studio'') }}' alias: Night Brightness mode: queued max: 10 - id: '1700521061505' alias: Adaptive Lighting Adjustments - Downstairs Bathroom description: '' trigger: - platform: homeassistant event: start id: boot alias: On boot - platform: state not_from: - unavailable - unknown entity_id: - input_number.nighttime_brightness_downstairs_bathroom id: night-brightness alias: Night Brightness condition: - condition: state entity_id: input_boolean.adaptive_lighting_adjustments state: 'on' action: - choose: - conditions: - condition: trigger id: - boot sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: configuration entity_id: switch.adaptive_lighting_downstairs_bathroom min_brightness: '{{ states(''input_number.nighttime_brightness_downstairs_bathroom'') }}' alias: Boot - conditions: - condition: trigger id: - night-brightness sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: current entity_id: switch.adaptive_lighting_downstairs_bathroom min_brightness: '{{ states(''input_number.nighttime_brightness_downstairs_bathroom'') }}' alias: Night Brightness mode: queued max: 10 - id: '1700521158381' alias: Adaptive Lighting Adjustments - Mud Room description: '' trigger: - platform: homeassistant event: start id: boot alias: On boot - platform: state not_from: - unavailable - unknown entity_id: - input_number.nighttime_brightness_mud_room id: night-brightness alias: Night Brightness condition: - condition: state entity_id: input_boolean.adaptive_lighting_adjustments state: 'on' action: - choose: - conditions: - condition: trigger id: - boot sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: configuration entity_id: switch.adaptive_lighting_mud_room min_brightness: '{{ states(''input_number.nighttime_brightness_mud_room'') }}' alias: Boot - conditions: - condition: trigger id: - night-brightness sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: current entity_id: switch.adaptive_lighting_mud_room min_brightness: '{{ states(''input_number.nighttime_brightness_mud_room'') }}' alias: Night Brightness mode: queued max: 10 - id: '1700521207350' alias: Adaptive Lighting Adjustments - Upstairs Hallway description: '' trigger: - platform: homeassistant event: start id: boot alias: On boot - platform: state not_from: - unavailable - unknown entity_id: - input_number.nighttime_brightness_upstairs_hallway id: night-brightness alias: Night Brightness condition: - condition: state entity_id: input_boolean.adaptive_lighting_adjustments state: 'on' action: - choose: - conditions: - condition: trigger id: - boot sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: configuration entity_id: switch.adaptive_lighting_upstairs_hallway min_brightness: '{{ states(''input_number.nighttime_brightness_upstairs_hallway'') }}' alias: Boot - conditions: - condition: trigger id: - night-brightness sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: current entity_id: switch.adaptive_lighting_upstairs_hallway min_brightness: '{{ states(''input_number.nighttime_brightness_upstairs_hallway'') }}' alias: Night Brightness mode: queued max: 10 - id: '1700521280914' alias: Adaptive Lighting Adjustments - Upstairs Bathroom description: '' trigger: - platform: homeassistant event: start id: boot alias: On boot - platform: state not_from: - unavailable - unknown entity_id: - input_number.nighttime_brightness_upstairs_bathroom id: night-brightness alias: Night Brightness condition: - condition: state entity_id: input_boolean.adaptive_lighting_adjustments state: 'on' action: - choose: - conditions: - condition: trigger id: - boot sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: configuration entity_id: switch.adaptive_lighting_upstairs_bathroom min_brightness: '{{ states(''input_number.nighttime_brightness_upstairs_bathroom'') }}' alias: Boot - conditions: - condition: trigger id: - night-brightness sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: current entity_id: switch.adaptive_lighting_upstairs_bathroom min_brightness: '{{ states(''input_number.nighttime_brightness_upstairs_bathroom'') }}' alias: Night Brightness mode: queued max: 10 - id: '1700521311592' alias: Adaptive Lighting Adjustments - Master Bedroom description: '' trigger: - platform: homeassistant event: start id: boot alias: On boot - platform: state not_from: - unavailable - unknown entity_id: - input_number.nighttime_brightness_master_bedroom id: night-brightness alias: Night Brightness condition: - condition: state entity_id: input_boolean.adaptive_lighting_adjustments state: 'on' action: - choose: - conditions: - condition: trigger id: - boot sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: configuration entity_id: switch.adaptive_lighting_master_bedroom min_brightness: '{{ states(''input_number.nighttime_brightness_master_bedroom'') }}' alias: Boot - conditions: - condition: trigger id: - night-brightness sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: current entity_id: switch.adaptive_lighting_master_bedroom min_brightness: '{{ states(''input_number.nighttime_brightness_master_bedroom'') }}' alias: Night Brightness mode: queued max: 10 - id: '1700521354163' alias: Adaptive Lighting Adjustments - Kallen Bedroom description: '' trigger: - platform: homeassistant event: start id: boot alias: On boot - platform: state not_from: - unavailable - unknown entity_id: - input_number.nighttime_brightness_kallen_bedroom id: night-brightness alias: Night Brightness condition: - condition: state entity_id: input_boolean.adaptive_lighting_adjustments state: 'on' action: - choose: - conditions: - condition: trigger id: - boot sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: configuration entity_id: switch.adaptive_lighting_kallen_bedroom min_brightness: '{{ states(''input_number.nighttime_brightness_kallen_bedroom'') }}' alias: Boot - conditions: - condition: trigger id: - night-brightness sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: current entity_id: switch.adaptive_lighting_kallen_bedroom min_brightness: '{{ states(''input_number.nighttime_brightness_kallen_bedroom'') }}' alias: Night Brightness mode: queued max: 10 - id: '1700521397256' alias: Adaptive Lighting Adjustments - Emma Bedroom description: '' trigger: - platform: homeassistant event: start id: boot alias: On boot - platform: state not_from: - unavailable - unknown entity_id: - input_number.nighttime_brightness_emma_bedroom id: night-brightness alias: Night Brightness condition: - condition: state entity_id: input_boolean.adaptive_lighting_adjustments state: 'on' action: - choose: - conditions: - condition: trigger id: - boot sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: configuration entity_id: switch.adaptive_lighting_emma_bedroom min_brightness: '{{ states(''input_number.nighttime_brightness_emma_bedroom'') }}' alias: Boot - conditions: - condition: trigger id: - night-brightness sequence: - service: adaptive_lighting.change_switch_settings data: use_defaults: current entity_id: switch.adaptive_lighting_emma_bedroom min_brightness: '{{ states(''input_number.nighttime_brightness_emma_bedroom'') }}' alias: Night Brightness mode: queued max: 10 - id: '1701460148772' alias: Kallen left School description: '' trigger: - entity_id: person.tony_stork event: leave platform: zone zone: zone.middle_school id: tony-leave - entity_id: person.christina_stork event: leave platform: zone zone: zone.middle_school id: tina-leave - entity_id: person.kallen_stork event: leave platform: zone zone: zone.middle_school id: kallen-leave - platform: time at: input_datetime.kallen_school_day_end id: school-end condition: - condition: time after: '11:30:00' weekday: - mon - tue - wed - thu - fri - condition: state entity_id: input_boolean.kallen_at_school state: 'on' action: - alias: When triggered by school end if: - condition: trigger id: - school-end then: - if: - condition: and conditions: - alias: If Kallen has his phone, or one of us is picking him up condition: or conditions: - condition: state entity_id: input_boolean.kallen_has_phone state: 'on' - condition: state entity_id: input_boolean.kallen_alternate_pickup state: 'off' alias: Conditions for pickup then: - stop: Will use location triggers instead. alias: If Kallen has his phone, or we are picking him up - service: input_boolean.turn_off entity_id: input_boolean.kallen_at_school alias: Turn off Kallen At School - service: script.text_notify data: type: alert who: parents message: Kallen has been picked up from school. title: Kallen Location Alert tag: kallen-pickup alias: Text notification - service: script.speech_engine data: who: alexa_everywhere message: Collin has been picked up from school. alias: TTS announcement - delay: hours: 0 minutes: 0 seconds: 30 milliseconds: 0 - if: - condition: state entity_id: alarm_control_panel.nerdhome_alarm_panel state: armed_home then: - service: alarm_control_panel.alarm_disarm data: {} target: entity_id: alarm_control_panel.nerdhome_alarm_panel alias: Disarm security if we are home mode: single initial_state: true - id: '1701460391339' alias: Kallen is at School description: '' trigger: - entity_id: person.tony_stork event: leave platform: zone zone: zone.middle_school - entity_id: person.christina_stork event: leave platform: zone zone: zone.middle_school - entity_id: person.kallen_stork event: enter platform: zone zone: zone.middle_school condition: - condition: time before: '11:30:00' weekday: - mon - tue - wed - thu - fri - condition: state entity_id: input_boolean.kallen_at_school state: 'off' - condition: state entity_id: input_boolean.kallen_school_today state: 'on' action: - service: input_boolean.turn_on target: entity_id: input_boolean.kallen_at_school data: {} - service: input_boolean.turn_on target: entity_id: input_boolean.kallen_awake data: {} - service: script.text_notify data: type: alert who: parents message: Kallen has been dropped off at school. title: Kallen Location Alert tag: kallen-dropoff - if: - condition: template value_template: '{{ is_state(''input_boolean.master_bedroom_sleeping'',''on'') and is_state(''input_boolean.kallen_overnight'',''off'') }}' then: - service: light.turn_off target: entity_id: - light.first_floor_lights data: {} mode: single - id: '1702451783588' alias: Christmas Tree description: '' trigger: - alias: Toggle on platform: event event_type: extraLights event_data: toggle: 'on' id: toggle-on - platform: event event_type: extraLights event_data: toggle: 'off' id: toggle-off alias: Toggle off condition: - condition: state entity_id: input_boolean.holiday_mode_hold state: 'off' - condition: state entity_id: input_boolean.holiday_mode state: 'on' action: - alias: Processing choose: - conditions: - alias: Toggle on condition: trigger id: - toggle-on sequence: - alias: Turn on Christmas lights service: light.turn_on target: entity_id: - light.christmas_tree - light.christmas_lights_front_window data: {} - conditions: - alias: Toggle off condition: trigger id: - toggle-off sequence: - alias: Turn off Christmas tree service: light.turn_off target: entity_id: - light.christmas_tree - light.christmas_lights_front_window data: {} mode: single - id: '1702697525835' alias: Kallen Late Bedtime description: For those nights we want to let Kallen stay up later for whatever reason trigger: - platform: state entity_id: input_boolean.kallen_late_bedtime from: 'off' to: 'on' id: late-on alias: Late Bedtime On - platform: state entity_id: input_boolean.kallen_late_bedtime from: 'on' to: 'off' id: late-off alias: Late Bedtime Off condition: - condition: time after: input_datetime.kallen_wakeup_time before: input_datetime.kallen_bedtime alias: Time is between wakeup and bedtime action: - if: - condition: state entity_id: input_boolean.kallen_scheduling_evening_ran state: 'on' then: - service: script.kallen_scheduling_evening data: {} - service: script.house_scheduling_evening data: {} alias: If scheduling has already run, set the new times mode: restart - id: '1703110817378' alias: Tony Pain Meds Handler description: '' trigger: - platform: time at: input_datetime.tony_ibuprofen_notify id: ibuprofen-notify alias: Ibuprofen Notify - alias: Tylenol Notify platform: time at: input_datetime.tony_tylenol_notify id: tylenol-notify - platform: state entity_id: - input_boolean.tony_ibuprofen_taken from: 'off' to: 'on' id: ibuprofen-taken alias: Ibuprofen Taken - alias: Tylenol Taken platform: state entity_id: - input_boolean.tony_tylenol_taken from: 'off' to: 'on' id: tylenol-taken condition: [] action: - choose: - conditions: - condition: and conditions: - condition: trigger id: - ibuprofen-notify - ibuprofen-taken - condition: state entity_id: input_boolean.tony_ibuprofen_active state: 'on' alias: Ibuprofen sequence: - service: script.tony_ibuprofen data: reason: '{{ trigger.id }}' alias: Call ibuprofen script - conditions: - condition: and conditions: - condition: trigger id: - tylenol-notify - tylenol-taken - condition: state entity_id: input_boolean.tony_tylenol_active state: 'on' alias: Tylenol sequence: - service: script.tony_tylenol data: reason: '{{ trigger.id }}' alias: Call tylenol script mode: parallel max: 10 - id: '1704233489587' alias: Door Open Alert description: '' trigger: - alias: Front door open platform: state entity_id: - binary_sensor.front_door from: 'off' to: 'on' for: hours: 0 minutes: 0 seconds: 0 id: front_door - alias: Back door open platform: state entity_id: - binary_sensor.back_door from: 'off' to: 'on' for: hours: 0 minutes: 0 seconds: 0 id: back_door condition: [] action: - variables: sensor: '{{ "binary_sensor." + trigger.id }}' alias: Set entity ID for the repeat loop - alias: Repeat loop until door is closed repeat: sequence: - alias: Wait for door to close, limit 1 minute wait_for_trigger: - platform: template value_template: '{{ is_state(sensor,''off'') }}' alias: Triggered door closed id: door_closed timeout: hours: 0 minutes: 1 seconds: 0 milliseconds: 0 - alias: Run the appropriate notification actions choose: - conditions: - alias: Triggered door is open condition: template value_template: '{{ is_state(sensor,''on'') or wait.trigger == ''none'' }}' sequence: - alias: Run door open announcement and, if applicable, light alerts parallel: - alias: Light alert starts at 2nd repeat if: - alias: If this is the 2nd or higher repeat condition: template value_template: '{{ repeat.index >= 2 }}' then: - alias: Light alerts parallel: - alias: Living Room Lights Alert service: script.living_room_lights_alert data: duration: 12 type: red flash: true - alias: Basement Lights Alert service: script.basement_lights_alert data: type: red duration: 12 flash: true - alias: Play announcement service: script.status_annc data: who: common call_interruption: 1 call_snark_door_open: 1 - alias: Check if door is closed, play announcement if it is if: - alias: Triggered door is closed condition: template value_template: '{{ is_state(sensor,''off'') }}' then: - alias: Play door closed announcement service: script.status_annc data: who: common call_snark_door_closed: 1 - conditions: - alias: Triggered door is closed condition: template value_template: '{{ wait.trigger.id == ''door_closed'' or is_state(sensor,''off'') }}' sequence: - alias: Play door closed announcement if alert was triggered previously if: - condition: template value_template: '{{ repeat.index > 1 }}' alias: If this is not the first repeat then: - alias: Play door closed announcement service: script.status_annc data: who: common call_snark_door_closed: 1 until: - alias: Triggered door is closed condition: template value_template: '{{ is_state(sensor,''off'') }}' mode: parallel max: 5 - id: '1705287598804' alias: Tony Napping description: '' trigger: - platform: event event_type: nap_event event_data: who: tony type: start id: start alias: Nap Start - alias: Nap End platform: event event_type: nap_event event_data: who: tony type: end id: end condition: [] action: - choose: - conditions: - condition: trigger id: - start sequence: - service: input_boolean.turn_off metadata: {} data: {} target: entity_id: input_boolean.tony_awake - conditions: - condition: trigger id: - end sequence: - service: input_boolean.turn_on target: entity_id: input_boolean.tony_awake data: {} mode: restart - id: '1705524332116' alias: Downstairs Bathroom Temperature Alert description: This room has no HVAC, so the door needs to be left open in extreme temperature conditions. This automation will alert us when the temperature exceeds limits. trigger: - platform: state entity_id: - binary_sensor.downstairs_bathroom_cold from: 'off' to: 'on' id: cold-on - platform: state entity_id: - binary_sensor.downstairs_bathroom_cold from: 'on' to: 'off' id: cold-off - platform: state entity_id: - binary_sensor.downstairs_bathroom_hot from: 'off' to: 'on' id: hot-on - platform: state entity_id: - binary_sensor.downstairs_bathroom_hot from: 'on' to: 'off' id: hot-off condition: [] action: - choose: - conditions: - condition: trigger id: - cold-on sequence: - service: script.text_notify metadata: {} data: type: normal who: all title: Downstairs Bathroom Cold message: The downstairs bathroom is very cold. Please make sure the door is NOT closed! tag: downstairs-bathroom-cold - conditions: - condition: trigger id: - cold-off sequence: - service: script.text_notify metadata: {} data: type: alert who: all message: clear_notification tag: downstairs-bathroom-cold - conditions: - condition: trigger id: - hot-on sequence: - service: script.text_notify metadata: {} data: type: normal who: all title: Downstairs Bathroom Hot message: The downstairs bathroom is very hot. Please make sure the door is NOT closed! tag: downstairs-bathroom-hot - conditions: - condition: trigger id: - hot-off sequence: - service: script.text_notify metadata: {} data: type: alert who: all message: clear_notification tag: downstairs-bathroom-hot mode: restart - id: '1707601912471' alias: Basement Studio Temperature Alert description: This room has no HVAC, and has a space heater for winter. This automation will alert us when the temperature exceeds limits. trigger: - platform: state entity_id: - binary_sensor.basement_studio_cold from: 'off' to: 'on' id: cold-on - platform: state entity_id: - binary_sensor.basement_studio_cold from: 'on' to: 'off' id: cold-off - platform: state entity_id: - binary_sensor.basement_studio_hot from: 'off' to: 'on' id: hot-on - platform: state entity_id: - binary_sensor.basement_studio_hot from: 'on' to: 'off' id: hot-off condition: [] action: - choose: - conditions: - condition: trigger id: - cold-on sequence: - service: script.text_notify metadata: {} data: type: normal who: all title: Basement Studio Cold message: The basement studio is very cold. You may want to consider turning on the space heater. tag: basement-studio-cold - conditions: - condition: trigger id: - cold-off sequence: - service: script.text_notify metadata: {} data: type: alert who: all message: clear_notification tag: basement-studio-cold - conditions: - condition: trigger id: - hot-on sequence: - service: script.text_notify metadata: {} data: type: normal who: all title: Basement Studio Hot message: The basement studio is very hot. Not much you can do about it, just be aware. tag: basement-studio-hot - conditions: - condition: trigger id: - hot-off sequence: - service: script.text_notify metadata: {} data: type: alert who: all message: clear_notification tag: basement-studio-hot mode: restart - id: '1710180629143' alias: Kallen Has Phone description: Make sure the system knows Kallen has his phone, if his phone leaves the house. trigger: - platform: state entity_id: - person.kallen_stork from: home to: not_home condition: [] action: - service: input_boolean.turn_on metadata: {} data: {} target: entity_id: input_boolean.kallen_has_phone mode: restart - id: '1710611198911' alias: Kallen Meds Handler description: Handles the scheduling of medication reminders for Kallen trigger: - platform: time_pattern minutes: /30 id: trigger30 alias: Every 30 minutes - platform: time at: input_datetime.kallen_morning_meds_notify id: morning-notify alias: Morning Notify - platform: time at: input_datetime.kallen_night_meds_notify id: night-notify alias: Night Notify - platform: state entity_id: - input_boolean.kallen_morning_meds_taken to: 'on' id: boolean-morning alias: Morning Taken from: 'off' - platform: state entity_id: - input_boolean.kallen_night_meds_taken id: boolean-night alias: Night Taken from: 'off' to: 'on' condition: - condition: state entity_id: input_boolean.kallen_overnight state: 'off' alias: Kallen is not staying the night elsewhere action: - alias: Routing choose: - conditions: - condition: trigger id: - trigger30 sequence: - alias: Check morning reminder switch if: - condition: state entity_id: input_boolean.kallen_morning_meds_reminder state: 'on' alias: Morning meds reminder needed then: - service: script.kallen_morning_meds metadata: {} data: {} alias: Run morning meds notification script - alias: Check night reminder switch if: - condition: state entity_id: input_boolean.kallen_night_meds_reminder state: 'on' alias: Night meds reminder needed then: - service: script.kallen_night_meds metadata: {} data: {} alias: Run night meds notification script alias: Every 30 minutes - conditions: - condition: and conditions: - condition: trigger id: morning-notify - condition: state entity_id: input_boolean.kallen_morning_meds_taken state: 'off' alias: Morning Notify sequence: - service: input_boolean.turn_on metadata: {} data: {} target: entity_id: input_boolean.kallen_morning_meds_reminder alias: Activate morning reminders - service: script.kallen_morning_meds metadata: {} data: {} alias: Run morning meds notification script - conditions: - condition: and conditions: - condition: trigger id: - night-notify - condition: state entity_id: input_boolean.kallen_night_meds_taken state: 'off' alias: Night Notify sequence: - alias: Activate night reminders service: input_boolean.turn_on metadata: {} data: {} target: entity_id: input_boolean.kallen_night_meds_reminder - service: script.kallen_night_meds metadata: {} data: {} alias: Run night meds notification script - conditions: - condition: trigger id: boolean-morning alias: Morning Taken sequence: - service: input_datetime.set_datetime target: entity_id: input_datetime.kallen_morning_meds_taken data: datetime: '{% from ''time.jinja'' import set_datetime %} {{ set_datetime(0) }} ' alias: Set time morning meds were taken - service: input_boolean.turn_off metadata: {} data: {} target: entity_id: input_boolean.kallen_morning_meds_reminder alias: Deactivate morning reminders - service: script.text_notify metadata: {} data: type: alert who: kallen message: clear_notification tag: kallen-left-meds alias: Clear kallen-left-meds notification tag - conditions: - condition: trigger id: boolean-night alias: Night Taken sequence: - service: input_datetime.set_datetime target: entity_id: input_datetime.kallen_night_meds_taken data: datetime: '{% from ''time.jinja'' import set_datetime %} {{ set_datetime(0) }} ' alias: Set time night meds were taken - alias: Deactivate night reminders service: input_boolean.turn_off metadata: {} data: {} target: entity_id: input_boolean.kallen_night_meds_reminder - service: script.text_notify metadata: {} data: type: alert who: kallen message: clear_notification tag: kallen-left-meds alias: Clear kallen-left-meds notification tag mode: parallel max: 12 - id: '1711657679853' alias: Basement Briefing description: '' trigger: - platform: state entity_id: - binary_sensor.basement_studio_motion from: 'off' to: 'on' id: motion-on alias: Motion is detected in the basement condition: - condition: state entity_id: input_boolean.basement_briefing state: 'off' alias: Basement briefing has not already run for the day - condition: state entity_id: input_boolean.guest_mode state: 'off' alias: There are no guests action: - service: script.basement_briefing metadata: {} data: {} alias: Run basement briefing script mode: single - id: '1713119318762' alias: Master Bedroom Auto Cooling Threshold description: If the master bedroom reaches the threshold temperature, automatically activate hot day mode and turn on the AC trigger: - platform: numeric_state entity_id: - sensor.master_bedroom_temperature above: input_number.master_bedroom_auto_cooling_threshold alias: Master Bedroom Temp above auto cooling threshold condition: - condition: state entity_id: input_boolean.hot_day state: 'off' alias: Hot day is not already on - condition: state entity_id: input_boolean.master_bedroom_cooling_on state: 'off' alias: Master bedroom cooling is not already running action: - service: input_boolean.turn_on metadata: {} data: {} target: entity_id: input_boolean.hot_day alias: Activate hot day mode - service: button.press metadata: {} data: {} target: entity_id: button.master_bedroom_day_mode alias: Activate master bedroom daytime climate mode mode: single - id: '1714075850756' alias: Rabbit Tracker description: Automation for tracking various aspects of caring for our pet rabbit trigger: - platform: time at: input_datetime.rabbit_feeding_notify alias: Feeding Notify id: feeding-notify - platform: time at: input_datetime.rabbit_hutch_cleaning_notify alias: Cleaning Notify id: cleaning-notify - platform: state entity_id: - input_boolean.rabbit_fed from: 'off' to: 'on' alias: Rabbit Fed id: rabbit-fed - platform: state entity_id: - input_boolean.rabbit_hutch_cleaned from: 'off' to: 'on' alias: Hutch Cleaned id: hutch-cleaned - alias: Feeding Interval Update platform: state entity_id: - input_number.rabbit_feeding_interval - input_datetime.rabbit_fed id: feeding-interval-update - alias: Cleaning Interval Update platform: state entity_id: - input_number.rabbit_hutch_cleaning_interval - input_datetime.rabbit_hutch_cleaned id: cleaning-interval-update condition: - condition: state entity_id: input_boolean.vacation_mode state: 'off' alias: Vacation Mode is off action: - alias: Routing choose: - conditions: - condition: trigger id: - feeding-notify alias: Feeding Notify sequence: - alias: Turn off boolean on first reminder if: - alias: If this is the first reminder condition: numeric_state entity_id: counter.rabbit_feeding_reminder_count below: 1 then: - alias: Turn off feeding boolean service: input_boolean.turn_off metadata: {} data: {} target: entity_id: input_boolean.rabbit_fed - service: counter.increment metadata: {} data: {} target: entity_id: counter.rabbit_feeding_reminder_count alias: Increment counter - service: script.rabbit_feeding metadata: {} data: {} alias: Run rabbit feeding script - conditions: - condition: trigger id: - cleaning-notify alias: Cleaning Notify sequence: - alias: Turn off boolean on first reminder if: - condition: numeric_state entity_id: counter.rabbit_hutch_cleaning_reminder_count below: 1 alias: If this is the first reminder then: - service: input_boolean.turn_off metadata: {} data: {} target: entity_id: input_boolean.rabbit_hutch_cleaned alias: Turn off cleaning boolean - service: counter.increment metadata: {} data: {} target: entity_id: counter.rabbit_hutch_cleaning_reminder_count alias: Increment counter - service: script.rabbit_hutch_cleaning metadata: {} data: {} alias: Run rabbit hutch cleaning script - conditions: - condition: trigger id: - rabbit-fed alias: Rabbit Fed sequence: - service: input_datetime.set_datetime alias: Set time rabbit was fed data: datetime: '{% from ''time.jinja'' import set_datetime %} {{ set_datetime(0) }} ' target: entity_id: input_datetime.rabbit_fed - service: counter.reset metadata: {} data: {} target: entity_id: counter.rabbit_feeding_reminder_count alias: Reset feeding reminder counter - conditions: - condition: trigger id: - hutch-cleaned alias: Hutch Cleaned sequence: - service: input_datetime.set_datetime alias: Set time rabbit hutch was cleaned data: datetime: '{% from ''time.jinja'' import set_datetime %} {{ set_datetime(0) }} ' target: entity_id: input_datetime.rabbit_hutch_cleaned - service: counter.reset metadata: {} data: {} target: entity_id: counter.rabbit_hutch_cleaning_reminder_count alias: Reset cleaning reminder counter - conditions: - alias: Feeding Interval Update condition: trigger id: - feeding-interval-update sequence: - service: input_datetime.set_datetime target: entity_id: input_datetime.rabbit_feeding_notify data: time: '{% set fed = state_attr(''input_datetime.rabbit_fed'',''timestamp'') | int %} {% set interval = states(''input_number.rabbit_feeding_interval'') | int %} {% set math = (interval * 60) * 60 %} {% set newtime = fed + math %} {{ newtime | timestamp_custom(''%H:%M'') }} ' alias: Update Notification - conditions: - alias: Cleaning Interval Update condition: trigger id: - cleaning-interval-update sequence: - service: input_datetime.set_datetime target: entity_id: input_datetime.rabbit_hutch_cleaning_notify data: datetime: '{% set cleaned = state_attr(''input_datetime.rabbit_hutch_cleaned'',''timestamp'') | int %} {% set interval = states(''input_number.rabbit_hutch_cleaning_interval'') | int %} {% set math = ((interval * 24) * 60) * 60 %} {% set newtime = cleaned + math %} {{ newtime | timestamp_custom(''%Y-%m-%d %H:%M:%S'') }} ' alias: Update Notification mode: parallel max: 10 - id: '1716497196985' alias: Emma Bedtime Rescheduler description: Keeps Emma's bedtime up-to-date with reality trigger: - platform: state entity_id: - input_datetime.emma_awake_at id: first-wake alias: First Wake - platform: state entity_id: - input_number.emma_bedtime_hours id: hours-update alias: Hours Update condition: - condition: state entity_id: input_boolean.emma_sleeping state: 'off' - condition: state entity_id: input_boolean.emma_scheduling_evening_ran state: 'on' action: - service: script.emma_bedroom_scheduling_evening metadata: {} data: {} alias: Run evening scheduling mode: restart - id: '1721699562332' alias: Shower Mode Window Alert description: Reminder to close the upstairs bathroom window after a shower trigger: - platform: state entity_id: - input_boolean.shower_mode from: 'on' to: 'off' id: shower-off alias: Shower Mode Off - platform: state entity_id: - input_boolean.shower_mode from: 'off' to: 'on' id: shower-on alias: Shower Mode On condition: - condition: state entity_id: binary_sensor.upstairs_bathroom_window state: 'on' alias: Upstairs bathroom window is open action: - alias: If shower mode is turned back on if: - condition: trigger id: - shower-on then: - alias: Clear existing text notifications service: script.text_notify metadata: {} data: type: alert who: all message: clear_notification tag: shower-mode-window-alert - stop: Shower mode turned back on - alias: Repeat notifications repeat: sequence: - alias: Wait for window to close, limit 5 minutes wait_for_trigger: - platform: state entity_id: - binary_sensor.upstairs_bathroom_window from: 'on' to: 'off' id: window_closed alias: Window is closed timeout: hours: 0 minutes: 5 seconds: 0 milliseconds: 0 - alias: Clear existing text notifications service: script.text_notify metadata: {} data: type: alert who: all message: clear_notification tag: shower-mode-window-alert - alias: Run the appropriate notification actions choose: - conditions: - condition: template value_template: '{{ is_state(''binary_sensor.upstairs_bathroom_window'',''on'') or wait.trigger == ''none'' }}' alias: Window is still open sequence: - alias: Send notifications parallel: - service: script.status_annc metadata: {} data: who: common call_interruption: 1 call_snark_shower_mode_window: 1 alias: TTS Announcement - service: script.text_notify metadata: {} data: type: normal who: all title: Shower Mode Window Alert message: If you are done showering, close the upstairs bathroom window! tag: shower-mode-window-alert alias: Text Notify - conditions: - condition: template value_template: '{{ wait.trigger.id == ''window_closed'' or is_state(''binary_sensor.upstairs_bathroom_window'',''off'') }}' alias: Window is closed sequence: - alias: Clear existing text notifications service: script.text_notify metadata: {} data: type: alert who: all message: clear_notification tag: shower-mode-window-alert - stop: Window was closed until: - alias: Window is closed condition: state entity_id: binary_sensor.upstairs_bathroom_window state: 'off' mode: restart - id: '1721782673415' alias: Tina Meds Handler description: Handles the scheduling of medication reminders for Tina trigger: - platform: time_pattern minutes: /30 id: trigger30 alias: Every 30 minutes - platform: time at: input_datetime.tina_morning_meds_notify id: morning-notify alias: Morning Notify - platform: time at: input_datetime.tina_night_meds_notify id: night-notify alias: Night Notify - platform: state entity_id: - input_boolean.tina_morning_meds_taken to: 'on' id: boolean-morning alias: Morning Taken from: 'off' - platform: state entity_id: - input_boolean.tina_night_meds_taken id: boolean-night alias: Night Taken from: 'off' to: 'on' condition: [] action: - alias: Routing choose: - conditions: - condition: trigger id: - trigger30 sequence: - alias: Check morning reminder switch if: - condition: state entity_id: input_boolean.tina_morning_meds_reminder state: 'on' alias: Morning meds reminder needed then: - service: script.tina_morning_meds metadata: {} data: {} alias: Run morning meds notification script - alias: Check night reminder switch if: - condition: state entity_id: input_boolean.tina_night_meds_reminder state: 'on' alias: Night meds reminder needed then: - service: script.tina_night_meds metadata: {} data: {} alias: Run night meds notification script alias: Every 30 minutes - conditions: - condition: and conditions: - condition: trigger id: morning-notify - condition: state entity_id: input_boolean.tina_morning_meds_taken state: 'off' alias: Morning Notify sequence: - service: input_boolean.turn_on metadata: {} data: {} target: entity_id: input_boolean.tina_morning_meds_reminder alias: Activate morning reminders - service: script.tina_morning_meds metadata: {} data: {} alias: Run morning meds notification script - conditions: - condition: and conditions: - condition: trigger id: - night-notify - condition: state entity_id: input_boolean.tina_night_meds_taken state: 'off' alias: Night Notify sequence: - alias: Activate night reminders service: input_boolean.turn_on metadata: {} data: {} target: entity_id: input_boolean.tina_night_meds_reminder - service: script.tina_night_meds metadata: {} data: {} alias: Run night meds notification script - conditions: - condition: trigger id: boolean-morning alias: Morning Taken sequence: - service: input_datetime.set_datetime target: entity_id: input_datetime.tina_morning_meds_taken data: datetime: '{% from ''time.jinja'' import set_datetime %} {{ set_datetime(0) }} ' alias: Set time morning meds were taken - service: input_boolean.turn_off metadata: {} data: {} target: entity_id: input_boolean.tina_morning_meds_reminder alias: Deactivate morning reminders - service: script.text_notify metadata: {} data: type: alert who: tina message: clear_notification tag: tina-left-meds alias: Clear tina-left-meds notification tag - conditions: - condition: trigger id: boolean-night alias: Night Taken sequence: - service: input_datetime.set_datetime target: entity_id: input_datetime.tina_night_meds_taken data: datetime: '{% from ''time.jinja'' import set_datetime %} {{ set_datetime(0) }} ' alias: Set time night meds were taken - alias: Deactivate night reminders service: input_boolean.turn_off metadata: {} data: {} target: entity_id: input_boolean.tina_night_meds_reminder - service: script.text_notify metadata: {} data: type: alert who: tina message: clear_notification tag: tina-left-meds alias: Clear tina-left-meds notification tag mode: parallel max: 12 - id: '1722378602352' alias: Tony Meds Cleanup description: Handles the setting/clearing of medication configs for Tony trigger: - platform: state entity_id: - input_boolean.tony_morning_meds_reminder from: 'on' to: 'off' id: morning-reminders-off alias: Morning reminders off - alias: Afternoon reminders off platform: state entity_id: - input_boolean.tony_afternoon_meds_reminder from: 'on' to: 'off' id: afternoon-reminders-off - alias: Night reminders off platform: state entity_id: - input_boolean.tony_night_meds_reminder from: 'on' to: 'off' id: night-reminders-off - platform: event event_type: ios.notification_action_fired event_data: actionName: TONY_MORNING_MEDS_TAKEN id: morning-taken alias: Morning taken - alias: Afternoon taken platform: event event_type: ios.notification_action_fired event_data: actionName: TONY_AFTERNOON_MEDS_TAKEN id: afternoon-taken - alias: Night taken platform: event event_type: ios.notification_action_fired event_data: actionName: TONY_NIGHT_MEDS_TAKEN id: night-taken - alias: Morning skipped platform: event event_type: ios.notification_action_fired event_data: actionName: TONY_MORNING_MEDS_SKIPPED id: morning-skipped - alias: Afternoon skipped platform: event event_type: ios.notification_action_fired event_data: actionName: TONY_AFTERNOON_MEDS_SKIPPED id: afternoon-skipped - alias: Night skipped platform: event event_type: ios.notification_action_fired event_data: actionName: TONY_NIGHT_MEDS_SKIPPED id: night-skipped - platform: state entity_id: - person.tony_stork from: home id: left alias: Left condition: [] action: - alias: Routing choose: - conditions: - condition: trigger id: - morning-reminders-off alias: Morning Reminders Off sequence: - service: counter.reset metadata: {} data: {} target: entity_id: counter.tony_morning_meds_reminder_count alias: Reset morning reminder count - service: script.text_notify data: type: alert who: tony message: clear_notification tag: tony-morning-meds alias: Clear morning notification - conditions: - condition: trigger id: - afternoon-reminders-off alias: Afternoon reminders off sequence: - alias: Reset afternoon reminder count service: counter.reset metadata: {} data: {} target: entity_id: counter.tony_afternoon_meds_reminder_count - service: script.text_notify data: type: alert who: tony message: clear_notification tag: tony-afternoon-meds alias: Clear afternoon notification - conditions: - condition: trigger id: - night-reminders-off alias: Night reminders off sequence: - alias: Reset night reminder count service: counter.reset metadata: {} data: {} target: entity_id: counter.tony_night_meds_reminder_count - service: script.text_notify data: type: alert who: tony message: clear_notification tag: tony-night-meds alias: Clear night notification - conditions: - condition: trigger id: - morning-taken alias: Morning taken sequence: - service: input_boolean.turn_on metadata: {} data: {} target: entity_id: input_boolean.tony_morning_meds_taken alias: Turn on morning meds taken - conditions: - condition: trigger id: - afternoon-taken alias: Afternoon taken sequence: - service: input_boolean.turn_on metadata: {} data: {} target: entity_id: input_boolean.tony_afternoon_meds_taken alias: Turn on afternoon meds taken - conditions: - condition: trigger id: - night-taken alias: Night taken sequence: - service: input_boolean.turn_on metadata: {} data: {} target: entity_id: input_boolean.tony_night_meds_taken alias: Turn on night meds taken - conditions: - condition: trigger id: - morning-skipped alias: Morning skipped sequence: - service: input_boolean.turn_off metadata: {} data: {} target: entity_id: input_boolean.tony_morning_meds_reminder alias: Deactivate morning reminders - conditions: - condition: trigger id: - afternoon-skipped alias: Afternoon skipped sequence: - service: input_boolean.turn_off metadata: {} data: {} target: entity_id: input_boolean.tony_afternoon_meds_reminder alias: Deactivate afternoon reminders - conditions: - condition: trigger id: - night-skipped alias: Night skipped sequence: - service: input_boolean.turn_off metadata: {} data: {} target: entity_id: input_boolean.tony_night_meds_reminder alias: Deactivate night reminders - conditions: - condition: trigger id: - left alias: Left sequence: - alias: Send critical TTS notification if any meds aren't taken if: - alias: Check if any reminders are active condition: or conditions: - condition: state entity_id: input_boolean.tony_morning_meds_reminder state: 'on' alias: Morning meds reminder active - condition: state entity_id: input_boolean.tony_afternoon_meds_reminder state: 'on' alias: Afternoon meds reminder active - condition: state entity_id: input_boolean.tony_night_meds_reminder state: 'on' alias: Night meds reminder active then: - alias: Send critical TTS notification service: script.text_notify metadata: {} data: type: critical who: tony title: HEY DUMBASS message: YOU FORGOT TO TAKE YOUR MEDS!!!!! tag: tony-left-meds mode: queued max: 10 - id: '1722386174249' alias: Tina Meds Cleanup description: Handles the setting/clearing of medication configs for Tina trigger: - platform: state entity_id: - input_boolean.tina_morning_meds_reminder from: 'on' to: 'off' id: morning-reminders-off alias: Morning reminders off - alias: Night reminders off platform: state entity_id: - input_boolean.tina_night_meds_reminder from: 'on' to: 'off' id: night-reminders-off - platform: event event_type: ios.notification_action_fired event_data: actionName: TINA_MORNING_MEDS_TAKEN id: morning-taken alias: Morning taken - alias: Night taken platform: event event_type: ios.notification_action_fired event_data: actionName: TINA_NIGHT_MEDS_TAKEN id: night-taken - alias: Morning skipped platform: event event_type: ios.notification_action_fired event_data: actionName: TINA_MORNING_MEDS_SKIPPED id: morning-skipped - alias: Night skipped platform: event event_type: ios.notification_action_fired event_data: actionName: TINA_NIGHT_MEDS_SKIPPED id: night-skipped - platform: state entity_id: - person.christina_stork from: home id: left alias: Left condition: [] action: - alias: Routing choose: - conditions: - condition: trigger id: - morning-reminders-off alias: Morning Reminders Off sequence: - service: counter.reset metadata: {} data: {} target: entity_id: counter.tina_morning_meds_reminder_count alias: Reset morning reminder count - service: script.text_notify data: type: alert who: tina message: clear_notification tag: tina-morning-meds alias: Clear morning notification - conditions: - condition: trigger id: - night-reminders-off alias: Night reminders off sequence: - alias: Reset night reminder count service: counter.reset metadata: {} data: {} target: entity_id: counter.tina_night_meds_reminder_count - service: script.text_notify data: type: alert who: tina message: clear_notification tag: tina-night-meds alias: Clear night notification - conditions: - condition: trigger id: - morning-taken alias: Morning taken sequence: - service: input_boolean.turn_on metadata: {} data: {} target: entity_id: input_boolean.tina_morning_meds_taken alias: Turn on morning meds taken - conditions: - condition: trigger id: - night-taken alias: Night taken sequence: - service: input_boolean.turn_on metadata: {} data: {} target: entity_id: input_boolean.tina_night_meds_taken alias: Turn on night meds taken - conditions: - condition: trigger id: - morning-skipped alias: Morning skipped sequence: - service: input_boolean.turn_off metadata: {} data: {} target: entity_id: input_boolean.tina_morning_meds_reminder alias: Deactivate morning reminders - conditions: - condition: trigger id: - night-skipped alias: Night skipped sequence: - service: input_boolean.turn_off metadata: {} data: {} target: entity_id: input_boolean.tina_night_meds_reminder alias: Deactivate night reminders - conditions: - condition: trigger id: - left alias: Left sequence: - alias: Send critical TTS notification if any meds aren't taken if: - alias: Check if any reminders are active condition: or conditions: - condition: state entity_id: input_boolean.tina_morning_meds_reminder state: 'on' alias: Morning meds reminder active - condition: state entity_id: input_boolean.tina_night_meds_reminder state: 'on' alias: Night meds reminder active then: - alias: Send critical TTS notification service: script.text_notify metadata: {} data: type: critical who: tina title: HEY DUMBASS message: YOU FORGOT TO TAKE YOUR MEDS!!!!! tag: tina-left-meds mode: queued max: 10 - id: '1722387020007' alias: Kallen Meds Cleanup description: Handles the setting/clearing of medication configs for Kallen trigger: - platform: state entity_id: - input_boolean.kallen_morning_meds_reminder from: 'on' to: 'off' id: morning-reminders-off alias: Morning reminders off - alias: Night reminders off platform: state entity_id: - input_boolean.kallen_night_meds_reminder from: 'on' to: 'off' id: night-reminders-off - platform: event event_type: ios.notification_action_fired event_data: actionName: KALLEN_MORNING_MEDS_TAKEN id: morning-taken alias: Morning taken - alias: Night taken platform: event event_type: ios.notification_action_fired event_data: actionName: KALLEN_NIGHT_MEDS_TAKEN id: night-taken - alias: Morning skipped platform: event event_type: ios.notification_action_fired event_data: actionName: KALLEN_MORNING_MEDS_SKIPPED id: morning-skipped - alias: Night skipped platform: event event_type: ios.notification_action_fired event_data: actionName: KALLEN_NIGHT_MEDS_SKIPPED id: night-skipped - platform: state entity_id: - person.kallen_stork from: home id: left alias: Left condition: [] action: - alias: Routing choose: - conditions: - condition: trigger id: - morning-reminders-off alias: Morning Reminders Off sequence: - service: counter.reset metadata: {} data: {} target: entity_id: counter.kallen_morning_meds_reminder_count alias: Reset morning reminder count - service: script.text_notify data: type: alert who: kallen message: clear_notification tag: kallen-morning-meds alias: Clear morning notification - conditions: - condition: trigger id: - night-reminders-off alias: Night reminders off sequence: - alias: Reset night reminder count service: counter.reset metadata: {} data: {} target: entity_id: counter.kallen_night_meds_reminder_count - service: script.text_notify data: type: alert who: kallen message: clear_notification tag: kallen-night-meds alias: Clear night notification - conditions: - condition: trigger id: - morning-taken alias: Morning taken sequence: - service: input_boolean.turn_on metadata: {} data: {} target: entity_id: input_boolean.kallen_morning_meds_taken alias: Turn on morning meds taken - conditions: - condition: trigger id: - night-taken alias: Night taken sequence: - service: input_boolean.turn_on metadata: {} data: {} target: entity_id: input_boolean.kallen_night_meds_taken alias: Turn on night meds taken - conditions: - condition: trigger id: - morning-skipped alias: Morning skipped sequence: - service: input_boolean.turn_off metadata: {} data: {} target: entity_id: input_boolean.kallen_morning_meds_reminder alias: Deactivate morning reminders - conditions: - condition: trigger id: - night-skipped alias: Night skipped sequence: - service: input_boolean.turn_off metadata: {} data: {} target: entity_id: input_boolean.kallen_night_meds_reminder alias: Deactivate night reminders - conditions: - condition: trigger id: - left alias: Left sequence: - alias: Send critical TTS notification if any meds aren't taken if: - alias: Check if any reminders are active condition: or conditions: - condition: state entity_id: input_boolean.kallen_morning_meds_reminder state: 'on' alias: Morning meds reminder active - condition: state entity_id: input_boolean.kallen_night_meds_reminder state: '' alias: Night meds reminder active then: - alias: Send critical TTS notification service: script.text_notify metadata: {} data: type: critical who: kallen title: EYYO message: YOU FORGOT TO TAKE YOUR MEDS!!!!! tag: kallen-left-meds mode: queued max: 10 - id: '1722887275366' alias: Sports Scheduling description: Handle the start times for various sports events, for the purpose of notifications and such trigger: - platform: time at: '11:55:00' condition: [] action: - service: input_datetime.set_datetime metadata: {} data: datetime: '{% from ''sports.jinja'' import sports_datetime %} {{ sports_datetime(''sensor.michigan_wolverines'') }} ' target: entity_id: input_datetime.michigan_wolverines_start alias: Michigan Wolverines Start - service: input_datetime.set_datetime metadata: {} data: datetime: '{% from ''sports.jinja'' import sports_datetime %} {{ sports_datetime(''sensor.ohio_state_buckeyes'') }} ' target: entity_id: input_datetime.ohio_state_buckeyes_start alias: Ohio State Buckeyes Start - service: input_datetime.set_datetime metadata: {} data: datetime: '{% from ''sports.jinja'' import sports_datetime %} {{ sports_datetime(''sensor.toledo_rockets'') }} ' target: entity_id: input_datetime.toledo_rockets_start alias: Toledo Rockets Start - service: input_datetime.set_datetime metadata: {} data: datetime: '{% from ''sports.jinja'' import sports_datetime %} {{ sports_datetime(''sensor.minnesota_vikings'') }} ' target: entity_id: input_datetime.minnesota_vikings_start alias: Minnesota Vikings Start - service: input_datetime.set_datetime metadata: {} data: datetime: '{% from ''sports.jinja'' import sports_datetime %} {{ sports_datetime(''sensor.san_francisco_49ers'') }} ' target: entity_id: input_datetime.san_francisco_49ers_start alias: San Francisco 49ers Start - service: input_datetime.set_datetime metadata: {} data: datetime: '{% from ''sports.jinja'' import sports_datetime %} {{ sports_datetime(''sensor.minnesota_twins'') }} ' target: entity_id: input_datetime.minnesota_twins_start alias: Minnesota Twins Start - service: input_datetime.set_datetime metadata: {} data: datetime: '{% from ''sports.jinja'' import sports_datetime %} {{ sports_datetime(''sensor.cleveland_guardians'') }} ' target: entity_id: input_datetime.cleveland_guardians_start alias: Cleveland Guardians Start - service: input_datetime.set_datetime metadata: {} data: datetime: '{% from ''sports.jinja'' import sports_datetime %} {{ sports_datetime(''sensor.los_angeles_dodgers'') }} ' target: entity_id: input_datetime.los_angeles_dodgers_start alias: Los Angeles Dodgers Start - service: input_datetime.set_datetime metadata: {} data: datetime: '{% from ''sports.jinja'' import sports_datetime %} {{ sports_datetime(''sensor.minnesota_wild'') }} ' target: entity_id: input_datetime.minnesota_wild_start alias: Minnesota Wild Start mode: restart - id: '1740098474888' alias: Tina Pain Meds Handler description: '' triggers: - at: input_datetime.tina_ibuprofen_notify id: ibuprofen-notify alias: Ibuprofen Notify trigger: time - alias: Tylenol Notify at: input_datetime.tina_tylenol_notify id: tylenol-notify trigger: time - entity_id: - input_boolean.tina_ibuprofen_taken from: 'off' to: 'on' id: ibuprofen-taken alias: Ibuprofen Taken trigger: state - alias: Tylenol Taken entity_id: - input_boolean.tina_tylenol_taken from: 'off' to: 'on' id: tylenol-taken trigger: state conditions: [] actions: - choose: - conditions: - condition: and conditions: - condition: trigger id: - ibuprofen-notify - ibuprofen-taken - condition: state entity_id: input_boolean.tina_ibuprofen_active state: 'on' alias: Ibuprofen sequence: - data: reason: '{{ trigger.id }}' alias: Call ibuprofen script action: script.tina_ibuprofen - conditions: - condition: and conditions: - condition: trigger id: - tylenol-notify - tylenol-taken - condition: state entity_id: input_boolean.tina_tylenol_active state: 'on' alias: Tylenol sequence: - data: reason: '{{ trigger.id }}' alias: Call tylenol script action: script.tina_tylenol mode: parallel max: 10 - id: '1742799079017' alias: Emma Sleep Handling description: Awareness of when Emma is asleep or wakes up triggers: - trigger: state entity_id: - input_boolean.emma_sleeping from: 'on' to: 'off' id: sleep-off alias: Sleep Off - trigger: state entity_id: - binary_sensor.family_home from: 'on' to: 'off' id: family-left alias: Family Left conditions: [] actions: - action: input_boolean.turn_on metadata: {} data: {} target: entity_id: input_boolean.emma_awake alias: Turn on Emma Awake mode: restart