mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-17 19:06:53 +00:00
Adding in Repeat Function for TTS via MQTT.
This commit is contained in:
16
automation/tts_repeat.yaml
Executable file
16
automation/tts_repeat.yaml
Executable 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('_', ' ') }}."
|
@@ -61,7 +61,7 @@ voice_notify:
|
|||||||
|
|
||||||
- service: mqtt.publish
|
- service: mqtt.publish
|
||||||
data_template:
|
data_template:
|
||||||
payload: '{{ value1 }}"'
|
payload: '{{ value1 }}'
|
||||||
topic: 'polly/lastmsg'
|
topic: 'polly/lastmsg'
|
||||||
retain: true
|
retain: true
|
||||||
|
|
||||||
|
7
sensor/MQTT.yaml
Executable file
7
sensor/MQTT.yaml
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
###################################################
|
||||||
|
## Various MQTT sensors
|
||||||
|
###################################################
|
||||||
|
|
||||||
|
- platform: mqtt
|
||||||
|
name: "Latest Arrival"
|
||||||
|
state_topic: "polly/lastmsg"
|
Reference in New Issue
Block a user