Adding in Repeat Function for TTS via MQTT.

This commit is contained in:
CCOSTAN
2017-02-10 01:59:17 +00:00
parent 9f49b5d646
commit ab7e64abd6
3 changed files with 24 additions and 1 deletions

16
automation/tts_repeat.yaml Executable file
View File

@@ -0,0 +1,16 @@
######################################################################
## Announce when people come or go.
## Announce over all Chromecast Audios
######################################################################
- alias: 'State Announcements'
trigger:
- platform: state
entity_id: input_boolean.repeat_message
state: 'on'
from: 'off'
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('_', ' ') }}."

View File

@@ -61,7 +61,7 @@ voice_notify:
- service: mqtt.publish
data_template:
payload: '{{ value1 }}"'
payload: '{{ value1 }}'
topic: 'polly/lastmsg'
retain: true

7
sensor/MQTT.yaml Executable file
View File

@@ -0,0 +1,7 @@
###################################################
## Various MQTT sensors
###################################################
- platform: mqtt
name: "Latest Arrival"
state_topic: "polly/lastmsg"