ok..fixing Polly Speech routines..
This commit is contained in:
parent
02f2d30228
commit
dd93c57914
|
@ -1 +1 @@
|
||||||
2022.6.6
|
2022.6.7
|
|
@ -156,6 +156,7 @@ nest:
|
||||||
# climate:
|
# climate:
|
||||||
# platform: nest
|
# platform: nest
|
||||||
|
|
||||||
|
media_source:
|
||||||
tts:
|
tts:
|
||||||
- platform: amazon_polly
|
- platform: amazon_polly
|
||||||
aws_access_key_id: !secret aws_access_key_ID
|
aws_access_key_id: !secret aws_access_key_ID
|
||||||
|
|
|
@ -29,20 +29,7 @@ speech_engine:
|
||||||
|
|
||||||
- service: script.speech_processing
|
- service: script.speech_processing
|
||||||
data:
|
data:
|
||||||
media_player: >-
|
media_player: media_player.livingroomcc
|
||||||
{% if media_player | length == 0 %}
|
|
||||||
{% set media_player = [
|
|
||||||
'media_player.livingroomcc',
|
|
||||||
'media_player.bedroom'
|
|
||||||
] %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if media_player is not string and media_player is sequence %}
|
|
||||||
{% set media_player = media_player|join(', ') %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{{ media_player }}
|
|
||||||
|
|
||||||
speech_message: !include ../templates/speech/briefing.yaml
|
speech_message: !include ../templates/speech/briefing.yaml
|
||||||
|
|
||||||
- service: input_boolean.turn_off
|
- service: input_boolean.turn_off
|
||||||
|
|
|
@ -14,7 +14,7 @@ speech_processing:
|
||||||
- service: mqtt.publish
|
- service: mqtt.publish
|
||||||
data:
|
data:
|
||||||
topic: 'polly/lastmsg'
|
topic: 'polly/lastmsg'
|
||||||
payload: "This message is from {{ now().strftime('%-I') }}:{{ now().strftime('%M') }} {{ now().strftime('%p') }}. {{ speech_message | truncate(220)}}"
|
payload: "This message is from {{ now().strftime('%-I') }}:{{ now().strftime('%M') }} {{ now().strftime('%p') }}. {{ speech_message | striptags | truncate(220)}}"
|
||||||
retain: true
|
retain: true
|
||||||
|
|
||||||
- condition: and
|
- condition: and
|
||||||
|
@ -49,8 +49,9 @@ speech_processing:
|
||||||
|
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
data:
|
data:
|
||||||
entity_id: >
|
# entity_id: >
|
||||||
{{ media_player }}
|
# {{ media_player }}
|
||||||
|
entity_id: media_player.livingroomCC
|
||||||
volume_level: >-
|
volume_level: >-
|
||||||
{% if now().strftime('%H')|int < 12 and now().strftime('%H')|int > 6 %}
|
{% if now().strftime('%H')|int < 12 and now().strftime('%H')|int > 6 %}
|
||||||
0.3
|
0.3
|
||||||
|
@ -60,18 +61,6 @@ speech_processing:
|
||||||
0.3
|
0.3
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
# - service: notify.alexa_media
|
|
||||||
# data:
|
|
||||||
# data:
|
|
||||||
# type: tts
|
|
||||||
# target: >
|
|
||||||
# {% if states.group.bed.state == 'off' %}
|
|
||||||
# media_player.office
|
|
||||||
# {% else %}
|
|
||||||
# media_player.master_bathroom
|
|
||||||
# {% endif %}
|
|
||||||
# message: >-
|
|
||||||
# {{ speech_message }}
|
|
||||||
|
|
||||||
- service: tts.amazon_polly_say
|
- service: tts.amazon_polly_say
|
||||||
data:
|
data:
|
||||||
|
|
Loading…
Reference in New Issue