diff --git a/node-red/projects/NerdFlows b/node-red/projects/NerdFlows index 363a0a0..221715c 160000 --- a/node-red/projects/NerdFlows +++ b/node-red/projects/NerdFlows @@ -1 +1 @@ -Subproject commit 363a0a033d40f9a93a7b68d35325ff253fa6295d +Subproject commit 221715c5487d9482db7f959c30794a9fe1b82d5b diff --git a/packages/announcements.yaml b/packages/announcements.yaml index 003a93f..b7b63a5 100644 --- a/packages/announcements.yaml +++ b/packages/announcements.yaml @@ -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: diff --git a/packages/notify.yaml b/packages/notify.yaml index 8ea2a9c..6dbac21 100644 --- a/packages/notify.yaml +++ b/packages/notify.yaml @@ -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 diff --git a/packages/security.yaml b/packages/security.yaml index 445b32e..d157241 100644 --- a/packages/security.yaml +++ b/packages/security.yaml @@ -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: