diff --git a/automation/tts_repeat.yaml b/automation/tts_repeat.yaml index e81a17ad..8517b8c9 100755 --- a/automation/tts_repeat.yaml +++ b/automation/tts_repeat.yaml @@ -1,8 +1,7 @@ ###################################################################### -## Announce when people come or go. -## Announce over all Chromecast Audios +## What did she say? REPEAT THE LAST MESSAGE. ###################################################################### -- alias: 'State Announcements' +- alias: 'tts_repeat' trigger: - platform: state @@ -13,4 +12,4 @@ action: - service: script.Voice_notify data_template: - value1: "{{ trigger.entity_id.split('.')[1]|replace('_', ' ')|replace('garadget large', 'The large garage ')|replace('garadget small', 'The small garage ') }} is {{ (trigger.to_state.state)|replace('_', ' ') }}." \ No newline at end of file + value1: "{{states.sensor.polly_lastmsg.state}}" \ No newline at end of file diff --git a/input_boolean/home_modes.yaml b/input_boolean/home_modes.yaml index 98eaca51..3f6b7722 100755 --- a/input_boolean/home_modes.yaml +++ b/input_boolean/home_modes.yaml @@ -17,4 +17,8 @@ speech_notifications: name: Speech Notifications icon: mdi:speaker-wireless initial: on - \ No newline at end of file + +repeat_message: + name: Repeat Last Notification + icon: mdi:repeat-once + initial: off \ No newline at end of file diff --git a/script/voice_notify.yaml b/script/voice_notify.yaml index ad76b944..79716830 100755 --- a/script/voice_notify.yaml +++ b/script/voice_notify.yaml @@ -79,5 +79,6 @@ voice_notify: {{ value1 }}" cache: true + - service: input_boolean.turn_off + entity_id: input_boolean.repeat_message - diff --git a/sensor/MQTT.yaml b/sensor/MQTT.yaml index 78bd1db0..8eb60409 100755 --- a/sensor/MQTT.yaml +++ b/sensor/MQTT.yaml @@ -3,5 +3,5 @@ ################################################### - platform: mqtt - name: "Latest Arrival" + name: "polly_lastmsg" state_topic: "polly/lastmsg" \ No newline at end of file