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:
|
||||
# platform: nest
|
||||
|
||||
media_source:
|
||||
tts:
|
||||
- platform: amazon_polly
|
||||
aws_access_key_id: !secret aws_access_key_ID
|
||||
|
|
|
@ -29,20 +29,7 @@ speech_engine:
|
|||
|
||||
- service: script.speech_processing
|
||||
data:
|
||||
media_player: >-
|
||||
{% 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 }}
|
||||
|
||||
media_player: media_player.livingroomcc
|
||||
speech_message: !include ../templates/speech/briefing.yaml
|
||||
|
||||
- service: input_boolean.turn_off
|
||||
|
|
|
@ -14,7 +14,7 @@ speech_processing:
|
|||
- service: mqtt.publish
|
||||
data:
|
||||
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
|
||||
|
||||
- condition: and
|
||||
|
@ -49,8 +49,9 @@ speech_processing:
|
|||
|
||||
- service: media_player.volume_set
|
||||
data:
|
||||
entity_id: >
|
||||
{{ media_player }}
|
||||
# entity_id: >
|
||||
# {{ media_player }}
|
||||
entity_id: media_player.livingroomCC
|
||||
volume_level: >-
|
||||
{% if now().strftime('%H')|int < 12 and now().strftime('%H')|int > 6 %}
|
||||
0.3
|
||||
|
@ -60,18 +61,6 @@ speech_processing:
|
|||
0.3
|
||||
{% 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
|
||||
data:
|
||||
|
|
Loading…
Reference in New Issue