############################### # input_datetime - So the time report automation fires can be set in the UI ############################### input_datetime: morning_report: name: Morning Report has_date: false has_time: true nightly_report: name: Nightly Report has_date: false has_time: true daily_report: name: Daily Report has_date: false has_time: true kallen_morning_report: name: Kallen Dressed Announcement has_date: false has_time: true kallen_nightly_report: name: Kallen Bedtime Announcement has_date: false has_time: true audible_notification_on: name: Audible Notifications On has_date: false has_time: true audible_notification_off: name: Audible Notifications Off has_date: false has_time: true ################################ # 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: template value_template: "{{ states('sensor.time') == (state_attr('input_datetime.audible_notification_on', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" action: - service: input_boolean.turn_on entity_id: input_boolean.audible_notifications # 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: template value_template: "{{ states('sensor.time') == (state_attr('input_datetime.audible_notification_off', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" condition: - condition: state entity_id: input_boolean.audible_notifications state: 'on' action: - service: input_boolean.turn_off entity_id: input_boolean.audible_notifications - id: 754da2e2-af95-43b0-bb4e-9df553c305fd alias: Kallen Nightly Briefing trigger: platform: time at: input_datetime.kallen_nightly_report action: - service: script.turn_on entity_id: script.kallen_nightly_briefing script: reset_annc_switches: sequence: - service: input_boolean.turn_off entity_id: input_boolean.good_morning_report morning_briefing: sequence: - service: button.press target: entity_id: button.good_morning kallen_nightly_briefing: sequence: - service: script.text_notify data_template: who: "all_ios" message: "Time for Kallen to get ready for bed." - service: notify.alexa_media_basement_echo_dot data: message: !include ../templates/speech/kallen_nightly_briefing.yaml