mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-16 18:44:58 +00:00
What did she say? Adding in a repeat function.
This commit is contained in:
@@ -1,8 +1,7 @@
|
|||||||
######################################################################
|
######################################################################
|
||||||
## Announce when people come or go.
|
## What did she say? REPEAT THE LAST MESSAGE.
|
||||||
## Announce over all Chromecast Audios
|
|
||||||
######################################################################
|
######################################################################
|
||||||
- alias: 'State Announcements'
|
- alias: 'tts_repeat'
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
@@ -13,4 +12,4 @@
|
|||||||
action:
|
action:
|
||||||
- service: script.Voice_notify
|
- service: script.Voice_notify
|
||||||
data_template:
|
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('_', ' ') }}."
|
value1: "{{states.sensor.polly_lastmsg.state}}"
|
@@ -17,4 +17,8 @@ speech_notifications:
|
|||||||
name: Speech Notifications
|
name: Speech Notifications
|
||||||
icon: mdi:speaker-wireless
|
icon: mdi:speaker-wireless
|
||||||
initial: on
|
initial: on
|
||||||
|
|
||||||
|
repeat_message:
|
||||||
|
name: Repeat Last Notification
|
||||||
|
icon: mdi:repeat-once
|
||||||
|
initial: off
|
@@ -79,5 +79,6 @@ voice_notify:
|
|||||||
{{ value1 }}"
|
{{ value1 }}"
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
entity_id: input_boolean.repeat_message
|
||||||
|
|
||||||
|
|
||||||
|
@@ -3,5 +3,5 @@
|
|||||||
###################################################
|
###################################################
|
||||||
|
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "Latest Arrival"
|
name: "polly_lastmsg"
|
||||||
state_topic: "polly/lastmsg"
|
state_topic: "polly/lastmsg"
|
Reference in New Issue
Block a user