group: google_players: name: Google entities: - media_player.googlehome1144 script: googlehome_tts: alias: "Google Home TTS" sequence: - service: media_player.play_media data: entity_id: media_player.googlehome1144 media_content_id: https://hass.phoenixinquis.is-a-geek.org/local/chime.ogg media_content_type: music - delay: '00:00:03' - service: tts.amazon_polly_say data_template: entity_id: media_player.googlehome1144 message: "{{ message }}" affirmations: alias: "Daily affirmations" sequence: - service: script.googlehome_tts data_template: message: >- {% set affirmations = [ "You've got this!", "You're getting better every day!", "You're gonna take good care of yourself today!", "You are appreciated at work!", "People look up to you!", "You are loved!", "You're going to make good progress today!", ] %} {% set one = affirmations|random %} {% set two = affirmations|reject("in", [one])|list|random %} {% set three = affirmations|reject("in", [one, two])|list|random %} Hey there, good morning! Let's get the day started. You're gonna be okay, {{ one }} I know you've got it in you, {{ two }} Now get on up and get out there, {{ three }} automation: - alias: Daily Affirmations action: - service: script.affirmations data: {} trigger: platform: time at: "07:30:00" condition: - condition: state entity_id: binary_sensor.occupied state: 'on' - condition: or conditions: - condition: state entity_id: input_select.sunrise_days state: Every Day - condition: and conditions: - condition: state entity_id: input_select.sunrise_days state: Weekdays - condition: time weekday: - mon - tue - wed - thu - fri