############################### # input_datetime - So the time report automation fires can be set in the UI ############################### input_datetime: morning_briefing: name: Morning Briefing has_date: false has_time: true icon: mdi:home-analytics nightly_briefing: name: Nightly Briefing has_date: false has_time: true icon: mdi:home-analytics daily_briefing: name: Daily Briefing has_date: false has_time: true icon: mdi:home-analytics kallen_morning_briefing: name: Kallen Morning Briefing has_date: false has_time: true icon: mdi:weather-sunset-up kallen_nightly_briefing: name: Kallen Nightly Briefing has_date: false has_time: true icon: mdi:weather-night audible_notification_on: name: Audible Notifications On has_date: false has_time: true icon: mdi:volume-high audible_notification_off: name: Audible Notifications Off has_date: false has_time: true icon: mdi:volume-off announcement_delay: name: Announcement Delay has_date: false has_time: true icon: mdi:clock-edit input_select: kallen_morning_briefing_location: name: Kallen Morning Briefing Location options: - Kallen Bedroom - Common Areas icon: mdi:map-marker input_text: briefing_extras: name: Briefing Extras icon: mdi:plus kallen_briefing_extras: name: Kallen Briefing Extras icon: mdi:plus input_boolean: briefing_extras: name: Briefing Extras icon: mdi:plus kallen_briefing_extras: name: Kallen Briefing Extras icon: mdi:plus good_morning: name: Good Morning Ran icon: mdi:home-analytics daily_briefing: name: Daily Briefing Ran icon: mdi:home-analytics nightly_briefing: name: Nightly Briefing Ran icon: mdi:home-analytics kallen_morning_briefing: name: Kallen Morning Briefing Ran icon: mdi:home-analytics kallen_nightly_briefing: name: Kallen Nightly Briefing Ran icon: mdi:home-analytics ################################ # Announcment Automation - fires at the time of the above input_datetimes ################################ automation: - id: 81bee5ee-6820-4626-aebf-3deb8de69e4d alias: Turn On Audible Notifications initial_state: true trigger: platform: time at: input_datetime.audible_notification_on action: - service: input_boolean.turn_on entity_id: input_boolean.audible_notifications - service: switch.turn_off target: entity_id: - switch.basement_echo_dot_do_not_disturb_switch - switch.living_room_echo_dot_do_not_disturb_switch # Turn off audible notifications if they have't been turned off yet. - id: e0e9c774-6abe-42aa-bdab-32108bebb0e9 alias: Turn Off Audible Notifications initial_state: true trigger: - platform: time at: input_datetime.audible_notification_off action: - service: input_boolean.turn_off entity_id: input_boolean.audible_notifications - service: script.reset_annc_switches - id: 842a1b9a-de3b-4f0a-9ecc-6cfacd92bf5d alias: Kallen Briefings trigger: - platform: time at: input_datetime.kallen_morning_briefing id: kallen-morning - platform: time at: input_datetime.kallen_nightly_briefing id: kallen-nightly condition: - condition: state entity_id: input_boolean.kallen_overnight state: 'off' action: - choose: - conditions: - condition: trigger id: kallen-morning sequence: - service: script.kallen_morning_briefing - conditions: - condition: trigger id: kallen-nightly sequence: - service: script.kallen_nightly_briefing - id: fa2b59f8-1ad6-4380-9347-cb7d53590e41 alias: House Briefings trigger: - platform: time at: input_datetime.morning_briefing id: house-morning - platform: time at: input_datetime.daily_briefing id: house-daily - platform: time at: input_datetime.nightly_briefing id: house-nightly action: - choose: - conditions: - condition: and conditions: - condition: trigger id: house-morning - condition: state entity_id: input_boolean.good_morning state: 'off' sequence: - service: script.morning_briefing - conditions: - condition: and conditions: - condition: trigger id: house-daily - condition: state entity_id: input_boolean.daily_briefing state: 'off' sequence: - service: script.daily_briefing - if: - condition: state entity_id: sensor.garbage_collection_large_pickup state: '1' then: - service: script.text_alert data: who: "all" title: "Garbage Collection - Unlimited" message: "Tomorrow is large trash pickup day. Please take out all large items, and don't forget the trash can!" else: - if: - condition: state entity_id: sensor.garbage_collection state: '1' then: - service: script.text_alert data: who: "all" title: "Garbage Collection - Regular" message: "Tomorrow is regular trash pickup day. Make sure the trash can is taken to the curb!" - conditions: - condition: and conditions: - condition: trigger id: house-nightly - condition: state entity_id: input_boolean.nightly_briefing state: 'off' sequence: - service: script.nightly_briefing - if: - condition: state entity_id: sensor.garbage_collection attribute: days state: '7' then: - service: script.text_alert data: who: "all" title: "Retrieve Garbage Can" message: "Garbage has been collected. Don't forget to move the trash can back to the house!" - id: d7641b5e-3cbb-4fb3-b6ed-5edf3157b88d alias: Kallen Briefing Location Change trigger: - platform: state entity_id: input_boolean.kallen_awake from: 'off' to: 'on' condition: - condition: state entity_id: input_boolean.kallen_school_today state: 'on' - condition: state entity_id: input_boolean.kallen_overnight state: 'off' action: - service: input_select.select_option data: option: Common Areas target: entity_id: input_select.kallen_morning_briefing_location script: reset_annc_switches: sequence: - service: input_boolean.turn_off entity_id: - input_boolean.good_morning - input_boolean.daily_briefing - input_boolean.nightly_briefing - input_boolean.kallen_morning_briefing - input_boolean.kallen_nightly_briefing kallen_nightly_briefing: alias: 'Kallen Nightly Briefing' sequence: - service: script.text_notify data: who: "kallen" message: "Heads up, here comes your nightly briefing!" - delay: seconds: 3 - service: script.speech_engine data: who: common message: !include ../templates/speech/kallen_nightly_briefing.yaml voice: Joanna - service: input_boolean.turn_on target: entity_id: input_boolean.kallen_nightly_briefing kallen_morning_briefing: alias: 'Kallen Morning Briefing' sequence: - service: script.speech_engine data: who: > {% if is_state('input_select.kallen_morning_briefing_location','Kallen Bedroom') %} kallen_bedroom {% elif is_state('input_select.kallen_morning_briefing_location','Common Areas') %} common {% else %} common {% endif %} message: !include ../templates/speech/kallen_morning_briefing.yaml voice: Joanna - service: input_boolean.turn_on target: entity_id: input_boolean.kallen_morning_briefing kallen_school_status: alias: 'Kallen School Status' sequence: - service: script.speech_engine data: who: "{{ who }}" message: !include ../templates/speech/kallen_school_status.yaml voice: Joanna daily_briefing: alias: 'Daily Briefing' sequence: - service: script.speech_engine data: who: common message: !include ../templates/speech/daily_briefing.yaml - service: input_boolean.turn_on target: entity_id: input_boolean.daily_briefing nightly_briefing: alias: 'Nightly Briefing' sequence: - service: script.speech_engine data: who: common message: !include ../templates/speech/nightly_briefing.yaml - service: input_boolean.turn_on target: entity_id: input_boolean.nightly_briefing morning_briefing: alias: 'Morning Briefing' sequence: - service: script.speech_engine data: who: common message: !include ../templates/speech/morning_briefing.yaml - service: input_boolean.turn_on target: entity_id: input_boolean.morning_briefing dinner_is_ready: alias: 'Dinner Is Ready' sequence: - service: script.status_annc data_template: who: 'everywhere' call_dinner_is_ready: 1 we_are_leaving: alias: 'We Are Leaving' sequence: - service: script.status_annc data_template: who: 'everywhere' call_we_are_leaving: 1 welcome_home: alias: 'Welcome Home' sequence: - condition: state entity_id: input_boolean.welcome_home state: 'on' - wait_template: "{{ is_state('binary_sensor.front_door','on') }}" timeout: minutes: 10 continue_on_timeout: false - delay: seconds: 5 - service: script.speech_engine data_template: who: living_room message: !include ../templates/speech/welcome_home.yaml mode: restart birthday_announcement: alias: 'Birthday Announcement' sequence: - alias: "Save current light states" service: scene.create data: scene_id: before_birthday_announcement snapshot_entities: - light.living_room_color_1 - light.living_room_color_2 - light.living_room_color_3 - light.tina_desk_strip - light.tina_lamp_side - light.tina_lamp_top - light.dining_room_lamp - light.mud_room_overhead - light.basement_led_strip_1 - light.basement_tall_lamp - light.basement_short_lamp - light.basement_stairwell - alias: "Save current adaptive states" service: scene.create data: scene_id: before_birthday_announcement_adaptive snapshot_entities: - switch.adaptive_lighting_living_room - switch.adaptive_lighting_tina_lamp - switch.adaptive_lighting_basement_studio - alias: "Give it time to make sure it saves" delay: seconds: 2 - alias: "Turn off adaptive lighting" service: switch.turn_off target: entity_id: - switch.adaptive_lighting_living_room - switch.adaptive_lighting_tina_lamp - switch.adaptive_lighting_basement_studio - alias: "Turn off non-color lights" service: light.turn_off target: entity_id: - light.dining_room_lamp - light.mud_room_overhead - alias: "Set color lights to purple" service: light.turn_on target: entity_id: - light.living_room_lights - light.tina_lamp - light.tina_desk_strip - light.basement_studio_lights data: color_name: > {% if is_state('sensor.anniversary_tony_s_birthday','0') %} purple {% elif is_state('sensor.anniversary_tina_s_birthday','0') %} purple {% elif is_state('sensor.anniversary_kallen_s_birthday','0') %} red {% elif is_state('sensor.anniversary_emmalynn_s_birthday','0') %} pink {% endif %} - alias: "Read the announcement" service: script.speech_engine data: who: everywhere message: !include ../templates/speech/birthdays.yaml - alias: "Give time for the announcement to complete" delay: seconds: 20 - alias: "Restore previous light states" service: scene.turn_on target: entity_id: scene.before_birthday_announcement - alias: "Let the lights come up" delay: seconds: 3 - alias: "Restore previous adaptive states" service: scene.turn_on target: entity_id: scene.before_birthday_announcement_adaptive