Change TTS behavior for more versatility in briefings and readouts

This commit is contained in:
2023-03-09 13:46:13 -05:00
parent fba4ea3baa
commit 6c884d6966
4 changed files with 47 additions and 16 deletions

Submodule node-red/projects/NerdFlows updated: 363a0a033d...221715c548

View File

@ -274,7 +274,7 @@ script:
sequence:
- service: script.speech_engine
data:
who: common
who: "{{ who if who is defined else 'common' }}"
message: !include ../templates/speech/daily_briefing.yaml
- service: input_boolean.turn_on
target:
@ -285,7 +285,7 @@ script:
sequence:
- service: script.speech_engine
data:
who: common
who: "{{ who if who is defined else 'common' }}"
message: !include ../templates/speech/nightly_briefing.yaml
- service: input_boolean.turn_on
target:
@ -296,7 +296,7 @@ script:
sequence:
- service: script.speech_engine
data:
who: common
who: "{{ who if who is defined else 'common' }}"
message: !include ../templates/speech/morning_briefing.yaml
- service: input_boolean.turn_on
target:
@ -307,7 +307,7 @@ script:
sequence:
- service: script.status_annc
data:
who: 'everywhere'
who: "{{ who if who is defined else 'everywhere' }}"
call_dinner_is_ready: 1
we_are_leaving:
@ -315,7 +315,7 @@ script:
sequence:
- service: script.status_annc
data:
who: 'everywhere'
who: "{{ who if who is defined else 'everywhere' }}"
call_we_are_leaving: 1
welcome_home:
@ -402,7 +402,7 @@ script:
- alias: "Read the announcement"
service: script.speech_engine
data:
who: everywhere
who: "{{ who if who is defined else 'everywhere' }}"
message: !include ../templates/speech/birthdays.yaml
- alias: "Give time for the announcement to complete"
delay:

View File

@ -1016,7 +1016,7 @@ script:
name: 'Who'
description: 'This determines which speaker, or group of speakers, the message is sent to'
required: true
example: 'living_room, basement, basement_google, common_areas, master_bedroom, kallen_bedroom, emma_bedroom, kids_bedrooms, all_bedrooms, everywhere'
example: 'living_room, basement, basement_google, common_areas, master_bedroom, kallen_bedroom, emma_bedroom, kids_bedrooms, all_bedrooms, alexa_everywhere, everywhere'
selector:
select:
options:
@ -1029,6 +1029,7 @@ script:
- emma_bedroom
- kids_bedrooms
- all_bedrooms
- alexa_everywhere
- everywhere
message:
name: 'Message'
@ -1146,6 +1147,8 @@ script:
{% endif %}
{% elif who in ['Common Areas','common','common_areas'] %}
script.alexa_voice
{% elif who in ['alexa_everywhere','Alexa Everywhere'] %}
script.alexa_voice
{% elif who in ['Everywhere','everywhere'] %}
script.alexa_voice
{% else %}
@ -1191,6 +1194,16 @@ script:
{% else %}
common
{% endif %}
{% elif who in ['alexa_everywhere','Alexa Everywhere'] %}
{% if is_state('input_boolean.master_bedroom_sleeping','on') and is_state('input_boolean.studio_quiet','on') %}
living_room
{% elif is_state('input_boolean.master_bedroom_sleeping','on') %}
common
{% elif is_state('input_boolean.studio_quiet','on') %}
alexa_no_basement
{% else %}
alexa_everywhere
{% endif %}
{% elif who in ['Everywhere','everywhere'] %}
{% if is_state('input_boolean.studio_quiet','on') %}
alexa_no_basement
@ -1331,7 +1344,7 @@ script:
media_player.basement_echo_dot
{% elif who in ['common','common_areas'] %}
group.common_areas
{% elif who in ['Everywhere','everywhere'] %}
{% elif who in ['Everywhere','everywhere','alexa_everywhere','Alexa Everywhere'] %}
group.alexa_everywhere
{% elif who in ['alexa_no_basement'] %}
group.alexa_no_basement

View File

@ -420,10 +420,19 @@ script:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.security_armed_home
- service: script.status_annc
data:
who: living_room
call_security_armed: 1
- if:
- condition: template
value_template: >
{% if silent == 1 %}
false
{% else %}
true
{% endif %}
then:
- service: script.status_annc
data:
who: living_room
call_security_armed: 1
else:
- service: input_boolean.turn_on
target:
@ -473,9 +482,18 @@ script:
target:
entity_id: input_boolean.lockdown_issue
- if:
- condition: state
entity_id: input_boolean.security_armed_home
state: 'on'
- condition: and
conditions:
- condition: state
entity_id: input_boolean.security_armed_home
state: 'on'
- condition: template
value_template: >
{% if silent == 1 %}
false
{% else %}
true
{% endif %}
then:
- service: script.status_annc
data: