Major audible notification overhual. It was hard to maintain. This will be easier. Maybe

This commit is contained in:
Jeffrey Stone
2020-12-02 22:55:11 -05:00
parent 84a5e84fa5
commit d5191c9ab8
24 changed files with 1537 additions and 1564 deletions

View File

@@ -254,48 +254,14 @@
entity_id: binary_sensor.front_door
state: 'off'
action:
- service: script.ah_report
- service: script.jarvis_voice
data_template:
speech_message: '{{ [ "I have detected motion at the ", "Someone may be at the
", "There is movement at the ", "My sensors are picking up motion at the ",
"We appear to have a visitor at the " ] | random }} {{ trigger.to_state.attributes.friendly_name
}}.
'
call_snark_door_motion: 1
who: '{{ states.sensor.room_audio.state }}'
message: '{{ [ "I have detected motion at the ", "Someone may be at the
", "There is movement at the ", "My sensors are picking up motion at the ",
"We appear to have a visitor at the " ] | random }} {{ trigger.to_state.attributes.friendly_name
}}.'
- delay: 00:02:00
mode: single
initial_state: true
- id: improved_welcome_home
alias: Improved Welcome Home
mode: queued
max: 4
trigger:
- platform: state
entity_id:
- person.jeffrey
- person.katherine
- person.uncle_matt
- person.papa
from: not_home
to: home
condition:
- condition: state
entity_id: sensor.family_status
state: Home
action:
- service: script.family_is_home
- delay: 00:02:00
- service: script.ah_report
data_template:
call_interuption: 1
welcome_home: "{% set person = trigger.to_state.attributes.friendly_name %}\
\ {%- macro greeting_sentence(person) -%} {{ [\n person + \" has arrived.\"\
,\n person + \" is in the neighborhood.\",\n person + \" is arriving.\"\
,\n \"My sensors are picking up the presence of additional humans. \" ~ person\
\ +\" has been identified as home.\",\n \"Welcome back home \" ~ person,\n\
\ \"Guess who is home?\" ~ person +\" is!\",\n \"I am sensing a disturbance\
\ in the force. \" ~ person +\" must be home!\",\n person + \" is now in\
\ the house.\",\n person ~ \"! You are home!\",\n \"I know a secret! \"\
\ ~ person +\" is home!\",\n person + \" has finally made it home.\"\n \
\ ] | random }}\n{%- endmacro -%} {{greeting_sentence(person)}}\n"