Updates for JARVIS video

This commit is contained in:
Jeffrey Stone 2021-10-17 11:19:07 -04:00
parent fb5bc0583a
commit 9577804571
5 changed files with 175 additions and 18 deletions

View File

@ -195,6 +195,19 @@ automation:
who: "all_ios"
message: It's almost time to head for school.
- alias: Lightning Detected Demo
trigger:
- platform: state
entity_id: sensor.lightning_warning
to: 'Unsafe'
action:
- service: script.status_annc
data:
who: '{{ states.sensor.room_presence.state }}'
call_greeting: 1
call_time_is: 1
call_lighting_warning: 1
script:
reset_annc_switches:
sequence:
@ -276,3 +289,18 @@ script:
who: master_bedroom
message: !include ../templates/speech/morning_wakeup_report.yaml
haiku_day:
sequence:
- service: script.speech_engine_simplified
data:
who: media_player.ha_speaker
message: >
I know a Haiku. This one is called,
{{ [
'Good Morning From the Cat. <break time="1s"/>In the morning light, You sleep despite my meow, I stand on your face.',
'Tee Rex Hug. <break time="1s"/> The Tee Rex likes you, But he cant give you a hug, His arms are too short.',
'It Fits. <break time="1s"/> It Fits perfectly, because every box is the, Right size for a cat.',
'Minecraft Creepers. <break time="1s"/> Creepers are so cruel, I hear a hiss from behind, Bam! There goes my stuff.'
]|random }}

View File

@ -44,6 +44,77 @@ automation:
script:
# To Use:
# service: script.amp_voice
# Data
# who: media_player_ha_speaker
# #who: “{{ states(sensor.room_presence) }}”
# message: something to say
#
amp_voice:
sequence:
- service: media_player.turn_on
data_template:
entity_id: >
{{ who }}
- service: script.dim_main_volume
- service: media_player.volume_set
data_template:
entity_id: >
{{ who }}
volume_level: >
{% if is_state('input_boolean.audible_notifications.state','on') %}
.6
{% else %}
.4
{% endif %}
- service: >
{{ who }}
data:
message: >
{{ message }}
data:
type: tts
- delay: 00:00:20
- service: script.raise_main_volume
# To Use:
# service: script.polly_voice
# Data
# who: media_player_ha_speaker
# #who: “{{ states(sensor.room_presence) }}”
# message: something to say
#
polly_voice:
sequence:
- service: media_player.turn_on
data_template:
entity_id: >
{{ who }}
- service: media_player.volume_set
data_template:
entity_id: >
{{ who }}
volume_level: >
{% if states.input_boolean.audible_notifications.state == 'on' %}
.7
{% else %}
.4
{% endif %}
- service: tts.amazon_polly_say
data_template:
entity_id: >
{{ who }}
message: >-
<speak>
<break time="1s"/>
{{ message }}
</speak>
cache: true
alexa_interjection:
sequence:
- service: script.status_annc

View File

@ -497,6 +497,19 @@ script:
message: >
{{ message }}
# Use this Simplfied Script by calling in automaint or script like:
# service: script.speech_engine_simplified
# data:
# who: media_player.ha_speaker
# #who: “{{ states(sensor.room_presence) }}”
# #who: notify.kitchen_echo
# message: something to say
#
#
speech_engine_simplified:
sequence:
- condition: state
@ -510,28 +523,32 @@ script:
state: 'off'
- service: tts.amazon_polly_say
data_template:
entity_id: media_player.ha_speaker
entity_id: >-
{{ who }}
message: >-
<speak>
<break time="1s"/>
{{ message }}
</speak>
cache: true
# - service: notify.alexa_media_living_room_echo
# data:
# message: >
# {{ message }}
# data:
# type: tts
# - service: tts.cloud_say
# data_template:
# entity_id: media_player.ha_speaker
# message: >-
# {{ message }}
# cache: true
# language: en-GB
# options:
# gender: male
- service: >-
{{ who }}
data:
message: >
{{ message }}
data:
type: tts
- service: tts.cloud_say
data_template:
entity_id: >-
{{ who }}
message: >-
{{ message }}
cache: true
language: en-GB
options:
gender: male
# Called wheh notification needs to play on echos
@ -587,6 +604,10 @@ script:
- delay: 00:00:20
- service: script.raise_main_volume
# Default audible notifications. Notifcations play on the google devices.
jarvis_voice:
sequence:

View File

@ -74,6 +74,9 @@ sensor:
utility_meter:
# Use the 7 day history of motion at front door
# to get daily motion.
hourly_frontdoor_motion:
source: sensor.front_door_motion
cycle: hourly
daily_frontdoor_motion:
source: sensor.front_door_motion
cycle: daily

View File

@ -86,6 +86,9 @@ randomize_vacation_lights:
- condition: sun
after: sunrise
sequence:
- service: notify.mobile_app_jeffrey_ha_app
data:
message: Running Vacation Lights
- service: input_text.set_value
target:
entity_id: input_text.current_random_light
@ -96,7 +99,7 @@ randomize_vacation_lights:
data:
entity_id: '{{ states(''input_text.current_random_light'') }}'
- delay:
minutes: '{{ range(5,59) | random | int }}'
minutes: '{{ range(1,3) | random | int }}'
- service: homeassistant.turn_off
data:
entity_id: '{{ states(''input_text.current_random_light'') }}'
@ -128,3 +131,34 @@ randomize_vacation_lights_demo:
entity_id: input_text.current_random_light
value: None
mode: single
activate_arches_lamp:
alias: Activate Arches Lamp
sequence:
- service: media_player.play_media
data:
media_content_id: activate arches lamp
media_content_type: routine
entity_id: media_player.living_room_echo
mode: single
deactivate_arches_lamp:
alias: Deactivate Arches Lamp
sequence:
- service: media_player.play_media
data:
media_content_id: deactivate arches
media_content_type: routine
entity_id: media_player.living_room_echo
mode: single
dog_mode_lighting_on:
alias: Dog Mode Lighting On
sequence:
- condition: state
entity_id: sun.sun
state: below_horizon
- condition: state
entity_id: input_boolean.sentry_mode
state: 'on'
- service: scene.turn_on
entity_id: scene.diminished_kitchen_lighting
- service: scene.turn_on
entity_id: scene.security_kitchen_lighting