mirror of
https://github.com/thejeffreystone/home-assistant-configuration.git
synced 2025-09-13 23:35:40 +00:00
Major audible notification overhual. It was hard to maintain. This will be easier. Maybe
This commit is contained in:
@@ -18,6 +18,10 @@ input_datetime:
|
||||
name: Nightly Report
|
||||
has_date: false
|
||||
has_time: true
|
||||
daily_report:
|
||||
name: Daily Report
|
||||
has_date: false
|
||||
has_time: true
|
||||
skylar_morning_report:
|
||||
name: Skylar Dressed Announcement
|
||||
has_date: false
|
||||
@@ -60,32 +64,6 @@ automation:
|
||||
action:
|
||||
- service: script.turn_on_ha_speaker
|
||||
|
||||
- id: turn_on_ha_receiver
|
||||
alias: Turn on HA Receiver
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '06:45:00'
|
||||
action:
|
||||
- service: media_player.turn_on
|
||||
data:
|
||||
entity_id: media_player.tsr_6750_a3ed2f
|
||||
- service: media_player.volume_set
|
||||
data_template:
|
||||
entity_id: media_player.tsr_6750_a3ed2f
|
||||
volume_level: .80
|
||||
|
||||
- id: turn_off_ha_receiver
|
||||
alias: Turn off HA Receiver
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '23:30:00'
|
||||
action:
|
||||
- service: media_player.turn_off
|
||||
data:
|
||||
entity_id: media_player.tsr_6750_a3ed2f
|
||||
|
||||
|
||||
- id: set_audible_time_off_guest
|
||||
alias: set audible time off guest
|
||||
@@ -104,25 +82,6 @@ automation:
|
||||
20:30
|
||||
{% endif %}
|
||||
|
||||
- id: set_audible_time_off_normal
|
||||
alias: set audible time off normal
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
to: 'off'
|
||||
- platform: state
|
||||
entity_id: binary_sensor.school_tomorrow
|
||||
action:
|
||||
- service: input_datetime.set_datetime
|
||||
entity_id: input_datetime.audible_notification_off
|
||||
data_template:
|
||||
time: >
|
||||
{% if states.binary_sensor.school_tomorrow.state == 'on' %}
|
||||
19:30
|
||||
{% else %}
|
||||
20:45
|
||||
{% endif %}
|
||||
|
||||
|
||||
- id: prebed_routine
|
||||
initial_state: true
|
||||
@@ -131,9 +90,7 @@ automation:
|
||||
platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.skylar_nightly_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
action:
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_prebed_routine: 1
|
||||
- service: script.skylar_nightly_briefing
|
||||
|
||||
- id: nightly_report
|
||||
initial_state: true
|
||||
@@ -142,45 +99,26 @@ automation:
|
||||
platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.nightly_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
action:
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_greeting: 1
|
||||
call_evening_greeting: 1
|
||||
call_weather_alerts: 1
|
||||
call_overnight_forecast: 1
|
||||
call_freeze_warning: 1
|
||||
call_future_forecast: 1
|
||||
call_upcoming_holidays: 1
|
||||
call_upcoming_events: 1
|
||||
call_reminders: 1
|
||||
call_chores: 1
|
||||
call_full_moon: 1
|
||||
- service: script.nightly_briefing_report
|
||||
|
||||
- id: good_morning_report
|
||||
alias: Good Morning Report
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.morning_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
# platform: template
|
||||
# value_template: "{{ states('sensor.time') == (state_attr('input_datetime.morning_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
- platform: state
|
||||
entity_id: binary_sensor.kitchen_occupancy
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: time
|
||||
after: '07:00:00'
|
||||
before: '08:30:00'
|
||||
- condition: state
|
||||
entity_id: input_boolean.good_morning_report
|
||||
state: 'on'
|
||||
action:
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_greeting: 1
|
||||
call_morning_greeting: 1
|
||||
call_time_annc: 1
|
||||
call_weather_alerts: 1
|
||||
call_skylar_dressed: 1
|
||||
call_school_today: 1
|
||||
call_skylar_events: 1
|
||||
call_todays_events: 1
|
||||
call_current_conditions_outside: 1
|
||||
call_clothes_suggestion: 1
|
||||
call_current_conditions_inside: 1
|
||||
call_daily_forecast: 1
|
||||
call_upcoming_birthdays: 1
|
||||
call_upcoming_events: 1
|
||||
call_reminders: 1
|
||||
call_chores: 1
|
||||
- service: script.morning_briefing
|
||||
- service: script.twitter_notify
|
||||
data:
|
||||
message: >-
|
||||
@@ -193,34 +131,27 @@ automation:
|
||||
"#Homeassistant gives me the ability to make daily announcements like the one I just did using #Amazon Polly.",
|
||||
"Each day at this time I provide the residents of this house an update that includes everything they need to know about the upcoming day. But with more snark."
|
||||
] | random }}
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.0xf0d1b80000052281_switch
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.good_morning_report
|
||||
|
||||
# - id: skylar_morning_greeting
|
||||
# alias: Skylar Morning Greeting
|
||||
# initial_state: true
|
||||
# trigger:
|
||||
# platform: template
|
||||
# value_template: "{{ states('sensor.time') == (state_attr('input_datetime.skylar_morning_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
# # condition:
|
||||
# # - condition: time
|
||||
# # weekday:
|
||||
# # - mon
|
||||
# # - tue
|
||||
# # - wed
|
||||
# # - thu
|
||||
# # - fri
|
||||
# action:
|
||||
# - service: script.ah_report
|
||||
# data:
|
||||
# call_interuption: 1
|
||||
# call_skylar_dressed: 1
|
||||
# call_school_today: 1
|
||||
# call_skylar_events: 1
|
||||
# call_clothes_suggestion: 1
|
||||
# - service: switch.turn_off
|
||||
# entity_id: switch.0xf0d1b80000052281_switch
|
||||
|
||||
- id: master_bedroom_report
|
||||
alias: Master Bedroom Report
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.daily_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
condition:
|
||||
- condition: time
|
||||
weekday:
|
||||
- mon
|
||||
- tue
|
||||
- wed
|
||||
- thu
|
||||
- fri
|
||||
action:
|
||||
- service: script.morning_wakeup_report
|
||||
|
||||
- id: skylar_morning_alarm_announcement
|
||||
alias: skylar morning alarm announcement
|
||||
trigger:
|
||||
@@ -232,18 +163,20 @@ automation:
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.skylar_room_morning
|
||||
- service: notify.alexa_media_skylar_s_bedroom
|
||||
data:
|
||||
message: Good Morning Skylar. Time to Rise and Shine.
|
||||
data:
|
||||
type: tts
|
||||
- delay:
|
||||
seconds: 30
|
||||
- service: notify.alexa_media_skylar_s_bedroom
|
||||
data:
|
||||
message: Good Morning Skylar. You have school today. Time to get up.
|
||||
data:
|
||||
type: tts
|
||||
- service: script.skylar_morning_briefing
|
||||
# - service: notify.alexa_media_skylar_s_bedroom
|
||||
# data:
|
||||
# message: Good Morning Skylar. Time to Rise and Shine.
|
||||
# data:
|
||||
# type: tts
|
||||
# - delay:
|
||||
# seconds: 30
|
||||
# - service: notify.alexa_media_skylar_s_bedroom
|
||||
# data:
|
||||
# message: Good Morning Skylar. You have school today. Time to get up.
|
||||
# data:
|
||||
# type: tts
|
||||
|
||||
|
||||
- id: set_skylar_morning_report_time
|
||||
alias: set skylar morning report time
|
||||
@@ -261,19 +194,87 @@ automation:
|
||||
07:15
|
||||
{% endif %}
|
||||
|
||||
- id: set_morning_report_time
|
||||
alias: set morning report time
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '05:50:30'
|
||||
action:
|
||||
- service: input_datetime.set_datetime
|
||||
entity_id: input_datetime.morning_report
|
||||
data_template:
|
||||
time: >
|
||||
{% if states.calendar.skylar_school.attributes.offset_reached == True %}
|
||||
07:10
|
||||
{% else %}
|
||||
08:00
|
||||
{% endif %}
|
||||
# - id: set_morning_report_time
|
||||
# alias: set morning report time
|
||||
# trigger:
|
||||
# - platform: time
|
||||
# at: '05:50:30'
|
||||
# action:
|
||||
# - service: input_datetime.set_datetime
|
||||
# entity_id: input_datetime.morning_report
|
||||
# data_template:
|
||||
# time: >
|
||||
# {% if states.calendar.skylar_school.attributes.offset_reached == True %}
|
||||
# 07:10
|
||||
# {% else %}
|
||||
# 08:00
|
||||
# {% endif %}
|
||||
|
||||
|
||||
|
||||
script:
|
||||
reset_annc_switches:
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.good_morning_report
|
||||
|
||||
security_briefing:
|
||||
sequence:
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: kitchen
|
||||
message: !include ../templates/speech/security_report.yaml
|
||||
|
||||
event_briefing:
|
||||
sequence:
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: kitchen
|
||||
message: !include ../templates/speech/event_briefing.yaml
|
||||
|
||||
skylar_morning_briefing:
|
||||
sequence:
|
||||
- service: >
|
||||
{%- if is_state('binary_sensor.theater_occupancy', 'on') and is_state('media_player.theater_tv', 'on') %}
|
||||
script.jarvis_voice
|
||||
{% else %}
|
||||
notify.alexa_media_skylar_s_bedroom
|
||||
{%- endif %}
|
||||
data: >
|
||||
{%- if is_state('binary_sensor.theater_occupancy', 'on') and is_state('media_player.theater_tv', 'on') %}
|
||||
who: main
|
||||
message: !include ../templates/speech/skylar_morning_briefing.yaml
|
||||
{% else %}
|
||||
message: !include ../templates/speech/skylar_morning_briefing.yaml
|
||||
data:
|
||||
type: tts
|
||||
{%- endif %}
|
||||
|
||||
skylar_nightly_briefing:
|
||||
sequence:
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: !include ../templates/speech/skylar_nightly_briefing.yaml
|
||||
|
||||
nightly_briefing_report:
|
||||
sequence:
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: !include ../templates/speech/nightly_briefing.yaml
|
||||
|
||||
morning_briefing:
|
||||
sequence:
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: kitchen
|
||||
message: !include ../templates/speech/morning_briefing.yaml
|
||||
|
||||
morning_wakeup_report:
|
||||
sequence:
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: master_bedroom
|
||||
message: !include ../templates/speech/morning_wakeup_report.yaml
|
||||
|
@@ -149,9 +149,20 @@ script:
|
||||
- condition: state
|
||||
entity_id: sensor.washer_status
|
||||
state: complete
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_washer_needs_emptying: 1
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >
|
||||
<p>
|
||||
{{ [
|
||||
'Just a reminder. Washing machine needs to be emptied.',
|
||||
'I am sure you have more inportant things to do, but do not forget to empty the washer.',
|
||||
'Looks like the washing machine has completed it is cycle. You know what to do. <break time="1s"/> I hope.',
|
||||
'Do not forget to move the clothes to the dryer.',
|
||||
"Someone forgot to move the clothes to the dryer. I am not going to name any names. But there is a camera in there. ",
|
||||
"Do you like when your clothes smell like mildew? Because that is what is happeneing. <break time="1s"/> Right now. "
|
||||
] | random }}
|
||||
</p>
|
||||
|
||||
|
||||
washer_idle:
|
||||
|
@@ -106,3 +106,27 @@ script:
|
||||
media_content_type: video/youtube
|
||||
media_content_id: >
|
||||
{{ media }}
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
room_audio:
|
||||
friendly_name: "Room Audio"
|
||||
unit_of_measurement: ''
|
||||
value_template: >-
|
||||
{%- if is_state('binary_sensor.theater_occupancy', 'on') and is_state('media_player.theater_tv', 'on') %}
|
||||
theater
|
||||
{% elif is_state('binary_sensor.kitchen_occupancy', 'on') %}
|
||||
kitchen
|
||||
{% elif is_state('binary_sensor.living_room_occupancy', 'on') and is_state('input_boolean.audible_notifications', 'on') %}
|
||||
main
|
||||
{% elif is_state('binary_sensor.croft_occupancy', 'on') %}
|
||||
croft
|
||||
{% elif is_state('binary_sensor.master_bedroom_occupancy', 'on') %}
|
||||
master_bedroom
|
||||
{% else %}
|
||||
all_google
|
||||
{%- endif %}
|
||||
last_alexa:
|
||||
value_template: >
|
||||
{{ states.media_player | selectattr('attributes.last_called','eq',True) | map(attribute='entity_id') | first }}
|
@@ -165,6 +165,7 @@ automation:
|
||||
data:
|
||||
entity_id: light.kitchen_cabinets
|
||||
- service: script.good_night_loft
|
||||
- service: script.reset_annc_switches
|
||||
- service: script.twitter_notify_image
|
||||
data_template:
|
||||
tweet: >-
|
||||
@@ -222,10 +223,7 @@ automation:
|
||||
data:
|
||||
entity_id: alarm_control_panel.aarlo_ah_base_station
|
||||
mode: 'Armed'
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_dark_outside: 1
|
||||
call_garage_door_status: 1
|
||||
- service: script.nightly_briefing_report
|
||||
|
||||
- id: outside_lights_off_sunrise
|
||||
alias: Outside Lights off at Sunrise
|
||||
@@ -384,7 +382,7 @@ automation:
|
||||
data_template:
|
||||
time: >
|
||||
{% if states.sensor.school_tomorrow.state == 'on' %}
|
||||
20:00
|
||||
19:45
|
||||
{% else %}
|
||||
20:15
|
||||
{% endif %}
|
||||
|
@@ -185,10 +185,10 @@ automation:
|
||||
value_template: '{{ states.calendar.skylar_school.state == "Off" }}'
|
||||
action:
|
||||
- wait_template: "{{ not is_state('media_player.ha_speaker', 'playing') }}"
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_interuption: 1
|
||||
speech_message: "Blackout time has started."
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: "Blackout time has started."
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.blackout_time
|
||||
|
||||
@@ -204,10 +204,10 @@ automation:
|
||||
state: 'on'
|
||||
action:
|
||||
- wait_template: "{{ not is_state('media_player.ha_speaker', 'playing') }}"
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_interuption: 1
|
||||
speech_message: "Blackout time has ended"
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: "Blackout time has ended"
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.blackout_time
|
||||
|
||||
@@ -272,9 +272,10 @@ script:
|
||||
- condition: state
|
||||
entity_id: sensor.family_status
|
||||
state: Home
|
||||
- service: script.ah_report
|
||||
data:
|
||||
speech_message: "Skylar, digital learning will begin in about thirty minutes. I have turned on the lighting around your desk. I will be disabling audible notifications during school hours."
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: "Skylar, digital learning will begin in about thirty minutes. I have turned on the lighting around your desk. I will be disabling audible notifications during school hours."
|
||||
- delay:
|
||||
minutes: 5
|
||||
- service: input_boolean.turn_off
|
||||
|
@@ -20,10 +20,17 @@ automation:
|
||||
action:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: group.incense
|
||||
- service: script.ah_report
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
call_confirmation: 1
|
||||
call_house_party_protocol_enabled: 1
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >
|
||||
<p>
|
||||
{{ [
|
||||
'Anchorage House has been configured for a House Party.',
|
||||
'Incense has been turned on.',
|
||||
'I have enabled house party protocol.'
|
||||
] | random }}
|
||||
</p>
|
||||
|
||||
- id: house_party_protocol_off
|
||||
alias: Turn Off House Party Protocol
|
||||
@@ -35,7 +42,14 @@ automation:
|
||||
action:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: group.incense
|
||||
- service: script.ah_report
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
call_confirmation: 1
|
||||
call_house_party_protocol_disabled: 1
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >
|
||||
<p>
|
||||
{{ [
|
||||
'The House Party has been canceled.',
|
||||
'Incense has been turned off.',
|
||||
'I have disabled house party protocol.'
|
||||
] | random }}
|
||||
</p>
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -161,6 +161,25 @@ sensor:
|
||||
or is_state('sensor.family_status', 'Home') }}
|
||||
|
||||
automation:
|
||||
- id: skylar_is_awake
|
||||
alias: Skylar is Awake
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.skylar_room_occupancy
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: time
|
||||
after: '05:00:00'
|
||||
before: '08:30:00'
|
||||
action:
|
||||
- service: input_datetime.set_datetime
|
||||
entity_id: input_datetime.skylar_awake_at
|
||||
data:
|
||||
time: "{{ now().strftime('%H:%M') }}"
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.skylar_awake
|
||||
|
||||
- id: kat_arrives_zoo
|
||||
alias: Kat Arrives at Zoo
|
||||
initial_state: true
|
||||
@@ -173,10 +192,10 @@ automation:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.kat_travel_monitor
|
||||
- wait_template: "{{ not is_state('media_player.ha_speaker', 'playing') }}"
|
||||
- service: script.ah_report
|
||||
data:
|
||||
speech_message: 'Kat has arrived at work.'
|
||||
call_interuption: 1
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: 'Kat has arrived at work.'
|
||||
|
||||
- id: kat_leaves_zoo
|
||||
alias: Kat Leaves Zoo Notification
|
||||
@@ -190,10 +209,10 @@ automation:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.kat_travel_monitor
|
||||
- wait_template: "{{ not is_state('media_player.ha_speaker', 'playing') }}"
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_interuption: 1
|
||||
call_kat_headed_home: 1
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message:
|
||||
|
||||
- id: '1550109528753'
|
||||
alias: Jeff Is Heading Home
|
||||
@@ -205,10 +224,10 @@ automation:
|
||||
action:
|
||||
- service: script.jeff_destination_home
|
||||
- wait_template: "{{ not is_state('media_player.ha_speaker', 'playing') }}"
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_interurption: 1
|
||||
call_jeff_headed_home: 1
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message:
|
||||
|
||||
- id: jeff_heading_to_work
|
||||
alias: Jeff Is Heading To Work
|
||||
@@ -399,12 +418,9 @@ automation:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.jeff_traffic_alert_home
|
||||
|
||||
|
||||
|
||||
- id: welcome_home
|
||||
alias: Welcome Home
|
||||
mode: queued
|
||||
max: 4
|
||||
mode: restart
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
@@ -412,38 +428,57 @@ automation:
|
||||
- person.katherine
|
||||
- person.uncle_matt
|
||||
- person.papa
|
||||
- person.skylar
|
||||
from: 'not_home'
|
||||
to: 'home'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.family_status
|
||||
state: Home
|
||||
action:
|
||||
- service: script.family_is_home
|
||||
# - wait_template: >-
|
||||
# {{ states.binary_sensor.laundry_room_door.state == 'on' }}
|
||||
- delay: 00:02:00
|
||||
- service: script.ah_report
|
||||
- service: group.set
|
||||
data:
|
||||
object_id: "arriving"
|
||||
add_entities: >-
|
||||
{{ trigger.to_state.entity_id }}
|
||||
- service: script.standby
|
||||
- service: script.washer_finished_notification_audible
|
||||
- wait_template: "{{ states.binary_sensor.kitchen_door.state == 'on' }}"
|
||||
timeout: '00:1:00'
|
||||
- delay: '00:01:00'
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
call_interuption: 1
|
||||
welcome_home: >
|
||||
{% set person = trigger.to_state.attributes.friendly_name %}
|
||||
{%- macro greeting_sentence(person) -%}
|
||||
who: main
|
||||
message: >
|
||||
{% set person = expand('group.arriving')|map(attribute='name')|join(' and ') %}
|
||||
{% set peoplecount = expand('group.arriving') | count %}
|
||||
{% if peoplecount == 1 %}
|
||||
{% set is_are = ' is ' %}
|
||||
{% else %}
|
||||
{% set is_are = ' are ' %}
|
||||
{% endif %}
|
||||
{%- macro greeting_sentence(person, is_are) -%}
|
||||
{{ [
|
||||
person + " has arrived.",
|
||||
person + " is in the neighborhood.",
|
||||
person + " is arriving.",
|
||||
person ~ is_are + " in the neighborhood.",
|
||||
person ~ is_are + " arriving.",
|
||||
"My sensors are picking up the presence of additional humans. " ~ person +" has been identified as home.",
|
||||
"Welcome back home " ~ person,
|
||||
"Guess who is home?" ~ person +" is!",
|
||||
"Guess who is home?" ~ person ~ is_are,
|
||||
"I am sensing a disturbance in the force. " ~ person +" must be home!",
|
||||
person + " is now in the house.",
|
||||
person ~ is_are + "now in the house.",
|
||||
person ~ "! You are home!",
|
||||
"I know a secret! " ~ person +" is home!",
|
||||
person ~ is_are + " now here. Hash tag Welcome Home.",
|
||||
person ~ is_are + " now here. Hash tag Home.",
|
||||
person ~ is_are + " now here. Hash tag Smart Home.",
|
||||
"I know a secret! " ~ person ~ is_are +" home!",
|
||||
"Just a quick announcement. " ~ person +" has arrived!",
|
||||
"Hey" ~ person + "! High Five! Glad you are finally home.",
|
||||
"Just a quick announcement. " ~ person +" has arrived!",
|
||||
person + " has finally made it home."
|
||||
] | random }}
|
||||
{%- endmacro -%}
|
||||
{{greeting_sentence(person)}}
|
||||
- service: group.set
|
||||
data:
|
||||
object_id: "arriving"
|
||||
entities: []
|
||||
|
||||
|
||||
- id: guests_have_arrived
|
||||
@@ -483,33 +518,6 @@ automation:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.jeff_traffic_alert_home
|
||||
|
||||
# - id: '1550107919204'
|
||||
# alias: Family Is Home
|
||||
# trigger:
|
||||
# - platform: webhook
|
||||
# webhook_id: home_webhook
|
||||
# - entity_id: group.family
|
||||
# from: not_home
|
||||
# platform: state
|
||||
# to: home
|
||||
# condition: []
|
||||
# action:
|
||||
# - service: script.family_is_home
|
||||
|
||||
# - id: '1550108034209'
|
||||
# alias: Family Is Away
|
||||
# trigger:
|
||||
# - platform: webhook
|
||||
# webhook_id: away_webhook
|
||||
# - entity_id: group.family
|
||||
# from: home
|
||||
# platform: state
|
||||
# to: not_home
|
||||
# condition: []
|
||||
# action:
|
||||
# - service: script.family_is_away
|
||||
|
||||
|
||||
script:
|
||||
family_is_home:
|
||||
sequence:
|
||||
@@ -594,3 +602,12 @@ script:
|
||||
topic: kat/driving/destination
|
||||
payload: na
|
||||
retain: true
|
||||
reset_skylar_sensors:
|
||||
sequence:
|
||||
- delay: 02:00:00
|
||||
- service: input_datetime.set_datetime
|
||||
entity_id: input_datetime.skylar_awake_at
|
||||
data:
|
||||
time: "00:00:00"
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.skylar_awake
|
||||
|
@@ -191,21 +191,32 @@ automation:
|
||||
entity_id: input_boolean.audible_notifications
|
||||
state: 'on'
|
||||
action:
|
||||
- service: script.ah_report
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
speech_message: >
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >
|
||||
The {{ trigger.to_state.attributes.friendly_name }}
|
||||
{{ [
|
||||
" is standing open.",
|
||||
" is open.",
|
||||
" does not close on its own."
|
||||
" does not close on its own.",
|
||||
" was left standing open "
|
||||
] | random }}
|
||||
call_snark_door_open: 1
|
||||
{{ [
|
||||
'Can we get any more moths in here?',
|
||||
'Can a human be so kind and close it?',
|
||||
'The air quality in this house has actually improved.',
|
||||
'Closing the door would improve the internal climate of the house.',
|
||||
'Hey. The door was just opened and this is crazy. But now you know. So close it maybe.',
|
||||
'They always say when one door closes another one opens...that must of been waht happened',
|
||||
'And the automatic door closer appears to be broken. So...'
|
||||
] | random }}
|
||||
|
||||
initial_state: true
|
||||
|
||||
|
||||
- id: motion_detected
|
||||
alias: motion_detected
|
||||
- id: motion_detected_sentry_mode
|
||||
alias: motion_detected_sentry_mode
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
@@ -225,9 +236,10 @@ automation:
|
||||
entity_id: input_boolean.sentry_mode
|
||||
state: 'on'
|
||||
action:
|
||||
- service: script.ah_report
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
speech_message: >
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >
|
||||
{{ [
|
||||
"I have detected motion at the ",
|
||||
"Someone may be at the ",
|
||||
@@ -236,7 +248,14 @@ automation:
|
||||
"We appear to have a visitor at the "
|
||||
] | random }}
|
||||
{{ trigger.to_state.attributes.friendly_name }}.
|
||||
call_snark_door_motion: 1
|
||||
{{ [
|
||||
'Do you want me to send them away?',
|
||||
'I have armed the lasers. Just say the word.',
|
||||
'I was not informed there would be guests.',
|
||||
'They do not appear to have any gifts, so I suggest no opening the door.',
|
||||
'My sensors have detected a meat popsicle.',
|
||||
'I do not think they can hear me.'
|
||||
] | random }}
|
||||
- delay:
|
||||
minutes: 2
|
||||
initial_state: true
|
||||
@@ -337,9 +356,10 @@ automation:
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
action:
|
||||
- service: script.ah_report
|
||||
data_template:
|
||||
speech_message: >
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >
|
||||
{{ [
|
||||
"Barn door protocol has been activated.",
|
||||
"Anchorage House has been secured! ",
|
||||
@@ -363,9 +383,10 @@ automation:
|
||||
to: 'off'
|
||||
|
||||
action:
|
||||
- service: script.ah_report
|
||||
data_template:
|
||||
speech_message: >
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >
|
||||
{{ [
|
||||
"Barn door protocol has been deactivated.",
|
||||
"I am no longer monitoring the access points. ",
|
||||
@@ -387,9 +408,10 @@ automation:
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
action:
|
||||
- service: script.ah_report
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
speech_message: >
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >
|
||||
{{ [
|
||||
"Guest Mode has been enabled.",
|
||||
"I have switched to the system to guest mode.",
|
||||
@@ -749,9 +771,27 @@ script:
|
||||
|
||||
activate_barn_door_protocol:
|
||||
sequence:
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_confirmation: 1
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >-
|
||||
{{ [
|
||||
'Okay.',
|
||||
'If you insist.',
|
||||
'I am afraid I can not do that <break time="1s"/> I am kidding,',
|
||||
'Leave it to me.',
|
||||
'As you wish.',
|
||||
'I am on it.',
|
||||
'No Problem.',
|
||||
'I think I can handle that.',
|
||||
'Working on it now.',
|
||||
'<break time="2s"/> Oh, you were talking to me. Let me take care of that.'
|
||||
'Why not. It is not like <emphasis>I</emphasis> ever sleep.',
|
||||
'I am not even supposed to be here today. But whatever.',
|
||||
'You did not say the magic word. <break time="1s"/> Oh forget it. I will take care of it.',
|
||||
'Funny, I was just about to do that.',
|
||||
'There are still terabytes of calculations required before I can.<break time="1s"/> Oh, whatever.'
|
||||
] | random }}
|
||||
- delay:
|
||||
seconds: 2
|
||||
- service: script.lockdown
|
||||
@@ -764,9 +804,27 @@ script:
|
||||
- condition: state
|
||||
entity_id: sensor.family_status
|
||||
state: "Home"
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_confirmation: 1
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >-
|
||||
{{ [
|
||||
'Okay.',
|
||||
'If you insist.',
|
||||
'I am afraid I can not do that <break time="1s"/> I am kidding,',
|
||||
'Leave it to me.',
|
||||
'As you wish.',
|
||||
'I am on it.',
|
||||
'No Problem.',
|
||||
'I think I can handle that.',
|
||||
'Working on it now.',
|
||||
'<break time="2s"/> Oh, you were talking to me. Let me take care of that.'
|
||||
'Why not. It is not like <emphasis>I</emphasis> ever sleep.',
|
||||
'I am not even supposed to be here today. But whatever.',
|
||||
'You did not say the magic word. <break time="1s"/> Oh forget it. I will take care of it.',
|
||||
'Funny, I was just about to do that.',
|
||||
'There are still terabytes of calculations required before I can.<break time="1s"/> Oh, whatever.'
|
||||
] | random }}
|
||||
- delay:
|
||||
seconds: 2
|
||||
- service: input_boolean.turn_off
|
||||
@@ -777,10 +835,10 @@ script:
|
||||
- condition: state
|
||||
entity_id: group.external_doors
|
||||
state: "on"
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_issue: 1
|
||||
sspeech_message: >
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >
|
||||
{{ [
|
||||
"I was unable to activate barn door protocol due to an open door.",
|
||||
"You may want to check the external doors. I was unable to secure them all.",
|
||||
@@ -806,9 +864,27 @@ script:
|
||||
|
||||
activate_guest_mode:
|
||||
sequence:
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_confirmation: 1
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >-
|
||||
{{ [
|
||||
'Okay.',
|
||||
'If you insist.',
|
||||
'I am afraid I can not do that <break time="1s"/> I am kidding,',
|
||||
'Leave it to me.',
|
||||
'As you wish.',
|
||||
'I am on it.',
|
||||
'No Problem.',
|
||||
'I think I can handle that.',
|
||||
'Working on it now.',
|
||||
'<break time="2s"/> Oh, you were talking to me. Let me take care of that.'
|
||||
'Why not. It is not like <emphasis>I</emphasis> ever sleep.',
|
||||
'I am not even supposed to be here today. But whatever.',
|
||||
'You did not say the magic word. <break time="1s"/> Oh forget it. I will take care of it.',
|
||||
'Funny, I was just about to do that.',
|
||||
'There are still terabytes of calculations required before I can.<break time="1s"/> Oh, whatever.'
|
||||
] | random }}
|
||||
- delay:
|
||||
seconds: 2
|
||||
- service: input_boolean.turn_on
|
||||
|
@@ -116,11 +116,27 @@ automation:
|
||||
initial_state: true
|
||||
alias: 'Full Moon -Tweet'
|
||||
trigger:
|
||||
- platform: state
|
||||
- platform: sun
|
||||
event: sunset
|
||||
offset: -00:15:00
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.moon
|
||||
to: 'full_moon'
|
||||
state: 'full_moon'
|
||||
action:
|
||||
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >
|
||||
<p>
|
||||
{{ [
|
||||
'There is a Full Moon out tonight. and this time it is the <emphasis>actual</emphasis> moon. And <emphasis>not</emphasis> the neighbor. ',
|
||||
'Hey look, There is the full moon. ',
|
||||
'The moon is <emphasis>huge<e/mphasis>! And full. ',
|
||||
'If you went outside right now you might see the full moon. <break time="2s"/> Of course if you wait long enough there will be one inside the house too. ',
|
||||
'If you want to see the full moon, <emphasis>tonight is the night</emphasis>.']
|
||||
| random }}
|
||||
</p>
|
||||
- service: script.twitter_notify_image
|
||||
data_template:
|
||||
tweet: >-
|
||||
|
@@ -78,7 +78,41 @@ automation:
|
||||
at: '08:00:00'
|
||||
action:
|
||||
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
|
||||
- service: script.twitter_promos
|
||||
- service: script.twitter_selfpromos
|
||||
data:
|
||||
who: 'thejeffreystone'
|
||||
|
||||
- id: tweet_recent_content_js
|
||||
alias: Tweet Recent Content js
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '13:00:00'
|
||||
action:
|
||||
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
|
||||
- service: script.twitter_recent_content
|
||||
data:
|
||||
who: 'thejeffreystone'
|
||||
|
||||
- id: tweet_recent_content
|
||||
alias: Tweet Recent Contents
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '08:00:00'
|
||||
action:
|
||||
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
|
||||
- service: script.twitter_recent_content
|
||||
|
||||
- id: tweet_follow_me
|
||||
alias: Tweet Follow Me
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '08:00:00'
|
||||
action:
|
||||
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
|
||||
- service: script.twitter_follow_me
|
||||
|
||||
- id: tweet_some_promos2
|
||||
alias: Tweet Some Promos2
|
||||
@@ -90,6 +124,16 @@ automation:
|
||||
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
|
||||
- service: script.twitter_selfpromos
|
||||
|
||||
# - id: tweet_some_promos3
|
||||
# alias: Tweet Some Promos3
|
||||
# initial_state: true
|
||||
# trigger:
|
||||
# - platform: time
|
||||
# at: '13:00:00'
|
||||
# action:
|
||||
# - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
|
||||
# - service: script.twitter_selfpromos_sl
|
||||
|
||||
# The whole purpose of this automation is to tweet out some links to great Home Assistant content. This is not sponsored in any way.
|
||||
# I just wanted a way to give back to those I have borrowed from. Tweets ever Friday.
|
||||
- id: tweet_some_great_content
|
||||
@@ -150,6 +194,28 @@ automation:
|
||||
You can find my #homeassistant content at -> Blog: https://slacker-labs.com | Videos: https://www.youtube.com/channel/UCipZJ6748kd8TbelSxcvcVg | Config: https://github.com/thejeffreystone/home-assistant-configuration
|
||||
image: "/config/www/tweet_images/sl_logo.png"
|
||||
|
||||
- id: slackerlabs_info
|
||||
alias: SlackerLabs Info
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '10:00:00'
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{% set day=states("sensor.date").split('-')[2] | int %}
|
||||
{%- if day == 1 -%}
|
||||
true
|
||||
{%- endif -%}
|
||||
action:
|
||||
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
|
||||
- service: script.twitter_notify_image
|
||||
data_template:
|
||||
who: 'slackerlabs'
|
||||
tweet: >-
|
||||
You can find my #homeassistant content at -> Blog: https://slacker-labs.com | Videos: https://www.youtube.com/channel/UCipZJ6748kd8TbelSxcvcVg | Config: https://github.com/thejeffreystone/home-assistant-configuration
|
||||
image: "/config/www/tweet_images/sl_logo.png"
|
||||
|
||||
# - id: net_speed_report
|
||||
# initial_state: true
|
||||
# alias: Network Speed Report
|
||||
|
@@ -126,9 +126,10 @@ automation:
|
||||
- condition: template
|
||||
value_template: '{{ ((now().hour | int) > 7) and ((now().hour | int) < 16) }}'
|
||||
action:
|
||||
- service: script.ah_report
|
||||
data_template:
|
||||
usps: >-
|
||||
- service: script.jarvis_voice
|
||||
data:
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >-
|
||||
{%- if states.sensor.usps_mail.state | int == 1 -%}
|
||||
{{ [
|
||||
"USPS is delivering",
|
||||
@@ -182,9 +183,10 @@ automation:
|
||||
- condition: template
|
||||
value_template: '{{ ((now().hour | int) > 7) and ((now().hour | int) < 16) }}'
|
||||
action:
|
||||
- service: script.ah_report
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
usps: >
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >
|
||||
{%- if states.sensor.usps_packages.state | int == 1 -%}
|
||||
USPS is delivering {{ states.sensor.usps_packages.state }} package today.
|
||||
{%- else -%}
|
||||
@@ -214,9 +216,10 @@ automation:
|
||||
who: "jeff"
|
||||
title: "Delivering Today"
|
||||
message: "{{ states('sensor.mail_deliveries_message')}}"
|
||||
- service: script.ah_report
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
usps: >-
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >-
|
||||
{%- if states.sensor.mail_usps_mail.state | int == 1 -%}
|
||||
{{ [
|
||||
"USPS is delivering",
|
||||
@@ -257,8 +260,9 @@ automation:
|
||||
who: "jeff"
|
||||
title: "Package Delivered"
|
||||
message: "Fedex/UPS just made a delivery"
|
||||
- service: script.ah_report
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
usps: >-
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >-
|
||||
A package was just left on the porch.
|
||||
call_interuption: 1
|
@@ -428,9 +428,10 @@ automation:
|
||||
- condition: template
|
||||
value_template: "{{ (('Severe' in states.sensor.nws_alerts.attributes.title) or ('Thunderstorm' in states.sensor.nws_alerts.attributes.title)) and 'Warning' in states.sensor.nws_alerts.attributes.title }}"
|
||||
action:
|
||||
- service: script.ah_report
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
speech_message: >
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >
|
||||
{% if states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] is defined %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] }}
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[4] is defined %}
|
||||
@@ -446,16 +447,17 @@ automation:
|
||||
{% endif %}
|
||||
- service: script.twitter_notify_image
|
||||
data_template:
|
||||
tweet: '{{ [ "Anchorage House is battening down the hatches. Servere Weather is imminent. ",
|
||||
"The weather outside is getting intense, so I just made a weather announcement.",
|
||||
"Anchorage House monitors the NWS for severe weather using #HomeAssistant just for these occasions. Thanks for the heads up @NWSAtlanta " ] | random }}'
|
||||
tweet: '{{ [ "Anchorage House is battening down the hatches. Servere Weather is imminent. #homeassistant #weather ",
|
||||
"The weather outside is getting intense, so I just made a weather announcement. #homeassistant #weather ",
|
||||
"Anchorage House monitors the NWS for severe weather using #homeAssistant just for these occasions. Thanks for the heads up @NWSAtlanta #homeassistant #weather " ] | random }}'
|
||||
image: >-
|
||||
{{ [ "/config/www/tweet_images/lightning.jpg",
|
||||
"/config/www/tweet_images/lightning-bolt.jpg"] | random }}
|
||||
- delay: '00:00:15'
|
||||
- service: script.ah_report
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
speech_message: >
|
||||
who: main
|
||||
message: >
|
||||
{% if states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] is defined %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] }}
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[4] is defined %}
|
||||
@@ -487,9 +489,9 @@ automation:
|
||||
message: "Attention!,,,Attention!,,,The National Weather Service Has issued a Tornado Warning for our area."
|
||||
- service: script.twitter_notify_image
|
||||
data_template:
|
||||
tweet: '{{ [ "NWS is sounding the Tornado alarm, so I am too. Anchorage House is taking cover. ",
|
||||
"Anchorage House is heading to the closet because the NWS just issued a tornado warning for our area.",
|
||||
"I just activated the internal Tornado Alarm. Thanks for the heads up @NWSAtlanta " ] | random }}'
|
||||
tweet: '{{ [ "NWS is sounding the Tornado alarm, so I am too. Anchorage House is taking cover. #homeassistant #weather ",
|
||||
"Anchorage House is heading to the closet because the NWS just issued a tornado warning for our area. #homeassistant #weather ",
|
||||
"I just activated the internal Tornado Alarm. Thanks for the heads up @NWSAtlanta #homeassistant #weather " ] | random }}'
|
||||
image: >-
|
||||
"/config/www/tweet_images/tornado.jpg"
|
||||
- delay: '00:00:15'
|
||||
@@ -503,6 +505,11 @@ automation:
|
||||
data_template:
|
||||
title: "Tornado Warning!"
|
||||
message: "The National Weather Service Has issued a Tornado Warning for our area."
|
||||
- service: notify.alexa_media_skylar_s_bedroom
|
||||
data:
|
||||
message: A Tornado Warning has been issued for our area. Head to the closet.
|
||||
data:
|
||||
type: tts
|
||||
|
||||
- alias: Lightning Detected
|
||||
trigger:
|
||||
@@ -675,18 +682,42 @@ script:
|
||||
image: >-
|
||||
{{ [ "/config/www/tweet_images/lightning.jpg",
|
||||
"/config/www/tweet_images/lightning-bolt.jpg"] | random }}
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_lightning_alert: 1
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >-
|
||||
<p>
|
||||
{{ [
|
||||
'I have detected lightning withing 20 miles of Anchorage House.',
|
||||
'Did you see that flash? I did. Lightning is near.',
|
||||
'If you didnt hear the thunder you will soon. '
|
||||
]|random }}
|
||||
If anyone is outside they shoudld seek shelter inside.
|
||||
{% if is_state('binary_sensor.garage_door', 'on') %}
|
||||
{{ [ 'The garage door needs to be closed. ',
|
||||
'Can someone close the garage?. ',
|
||||
'If you do not want the contents of the garage to get wet, you might want to close it.'
|
||||
] | random }}
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
lightning_clear_audible:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.day
|
||||
state: 'on'
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_lightning_clear: 1
|
||||
- service: script.jarvis_voice
|
||||
data_template:
|
||||
who: '{{ states.sensor.room_audio.state }}'
|
||||
message: >-
|
||||
<p>
|
||||
{{ [
|
||||
'Lightning threat appears to be over.',
|
||||
'No more lightning appears to be occuring.',
|
||||
'Lightning is gone.'
|
||||
]|random }}
|
||||
It is safe to resume normal activities.
|
||||
</p>
|
||||
|
||||
refresh_weather_alert_sensors:
|
||||
sequence:
|
||||
|
Reference in New Issue
Block a user