MASSIVE re-org - Moving config to packages to better organize
This commit is contained in:
parent
7bfa8c169f
commit
3d4ff5ca61
|
@ -1,538 +1,56 @@
|
|||
- id: washer_running
|
||||
alias: Washer Running
|
||||
trigger:
|
||||
- above: 5
|
||||
entity_id: sensor.washer_power
|
||||
platform: numeric_state
|
||||
condition:
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.washer_status
|
||||
state: idle
|
||||
- condition: state
|
||||
entity_id: sensor.washer_status
|
||||
state: complete
|
||||
action:
|
||||
- service: script.washer_running
|
||||
initial_state: true
|
||||
|
||||
- id: washer_complete
|
||||
alias: Washer Complete
|
||||
trigger:
|
||||
- below: 3
|
||||
entity_id: sensor.washer_power
|
||||
platform: numeric_state
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.washer_status
|
||||
state: running
|
||||
action:
|
||||
- service: script.washer_complete
|
||||
initial_state: true
|
||||
|
||||
- id: washer_emptied
|
||||
initial_state: true
|
||||
alias: Washer Emptied
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.washer_door_contact
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
action:
|
||||
- service: script.washer_idle
|
||||
- service: script.turn_off
|
||||
entity_id: script.washer_finished_notification_audible
|
||||
|
||||
- id: washer_notification
|
||||
initial_state: true
|
||||
alias: Washer Notification
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.washer_status
|
||||
from: running
|
||||
to: complete
|
||||
- platform: event
|
||||
event_type: event_washer_complete_notification
|
||||
action:
|
||||
- service: script.turn_on
|
||||
entity_id: script.washer_finished_notification_audible
|
||||
|
||||
|
||||
- id: turn_off_disney
|
||||
initial_state: true
|
||||
alias: Turn Off Disney
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: media_player.hass_speaker
|
||||
from: playing
|
||||
to: idle
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.tiki_room_audio
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.happy_ever_after_show
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.haunted_mansion
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.boo_to_you_show
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.spaceship_earth_ride
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.mk_loop
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.illuminations
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.boo_to_you
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.happy_ever_after
|
||||
- id: backup_hass
|
||||
initial_state: true
|
||||
alias: Backup Hass
|
||||
trigger:
|
||||
- platform: time
|
||||
at: 05:00:00
|
||||
action:
|
||||
- service: shell_command.backup
|
||||
- service: script.twitter_notify_image
|
||||
data_template:
|
||||
tweet: >-
|
||||
{{ [
|
||||
"I just kicked off a backup of #homeassistant to ensure I live on. Do you backup? ",
|
||||
"Its important to backup your data. Thats why I just intitiated a backup of my critical data. ",
|
||||
"With @home_assistant and the #dropbox component it is easy to backup your important config files. Lets do this thing! "
|
||||
] | random }}
|
||||
image: >-
|
||||
"/config/www/tweet_images/hdd.jpg"
|
||||
|
||||
- id: coffee_time
|
||||
alias: Coffee Time
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.coffee_time', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.diminshed_livingroom_lighting
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.diminished_kitchen_lighting
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_night_light
|
||||
- service: alarm_control_panel.aarlo_set_mode
|
||||
data:
|
||||
entity_id: alarm_control_panel.aarlo_ah_base_station
|
||||
mode: 'home'
|
||||
|
||||
- id: good_morning
|
||||
alias: Good Morning
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.good_morning', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.normal_livingroom_lighting
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.normal_kitchen_lighting
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.rainbow_light # Rainbow Light
|
||||
- service: light.turn_on
|
||||
entity_id: light.skylars_tower # Skylar's Lamp
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_light_on
|
||||
- service: script.twitter_notify_image
|
||||
data_template:
|
||||
tweet: >-
|
||||
{{ [
|
||||
"Good Morning! Time to rise and shine at Anchorage House. ",
|
||||
"Good Morning from Anchorage House. Glad to see everyone made it. ",
|
||||
"Birds are awake, and so is Anchorage House. Good morning everyone!",
|
||||
"Good morning. Anchorage House is up and online."
|
||||
] | random }}
|
||||
{% if is_state('calendar.holidays_in_united_states', 'on') %}
|
||||
Today is {{states.calendar.holidays_in_united_states.attributes.message}}.
|
||||
{% endif %}
|
||||
image: >-
|
||||
{{ [ "/config/www/tweet_images/coffee.jpg",
|
||||
"/config/www/tweet_images/coffee2.jpg"] | random }}
|
||||
|
||||
- id: skylar_bedtime
|
||||
alias: Skylar Bedtime
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '19:15:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.skylar_room_prebed
|
||||
|
||||
|
||||
- id: jeff_lights_out
|
||||
alias: Jeff lights out
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '23:00:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_light_off
|
||||
- id: jeff_bedtime
|
||||
alias: Jeff bedtime
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '22:00:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: light.jeff_light
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_bedtime
|
||||
- id: jeff_night_light
|
||||
alias: Jeff night light
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '22:30:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: light.jeff_light
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_night_light
|
||||
- id: jeff_light_on
|
||||
alias: Jeff Light On
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '20:00:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_light_on
|
||||
# - id: jeff_alarm
|
||||
# alias: Jeff alarm
|
||||
# deprecated
|
||||
# - id: turn_off_disney
|
||||
# initial_state: true
|
||||
# alias: Turn Off Disney
|
||||
# trigger:
|
||||
# - platform: state
|
||||
# entity_id: media_player.hass_speaker
|
||||
# from: playing
|
||||
# to: idle
|
||||
# action:
|
||||
# - service: input_boolean.turn_off
|
||||
# entity_id: input_boolean.tiki_room_audio
|
||||
# - service: input_boolean.turn_off
|
||||
# entity_id: input_boolean.happy_ever_after_show
|
||||
# - service: input_boolean.turn_off
|
||||
# entity_id: input_boolean.haunted_mansion
|
||||
# - service: input_boolean.turn_off
|
||||
# entity_id: input_boolean.boo_to_you_show
|
||||
# - service: input_boolean.turn_off
|
||||
# entity_id: input_boolean.spaceship_earth_ride
|
||||
# - service: input_boolean.turn_off
|
||||
# entity_id: input_boolean.mk_loop
|
||||
# - service: input_boolean.turn_off
|
||||
# entity_id: input_boolean.illuminations
|
||||
# - service: input_boolean.turn_off
|
||||
# entity_id: input_boolean.boo_to_you
|
||||
# - service: input_boolean.turn_off
|
||||
# entity_id: input_boolean.happy_ever_after
|
||||
|
||||
# Deprecated
|
||||
# - id: backup_hass
|
||||
# initial_state: true
|
||||
# alias: Backup Hass
|
||||
# trigger:
|
||||
# - platform: time
|
||||
# at: 05:15:00
|
||||
# condition:
|
||||
# - condition: state
|
||||
# entity_id: input_boolean.vacation_mode
|
||||
# state: 'off'
|
||||
# at: 05:00:00
|
||||
# action:
|
||||
# - service: scene.turn_on
|
||||
# entity_id: scene.jeff_night_light
|
||||
# - service: shell_command.backup
|
||||
# - service: script.twitter_notify_image
|
||||
# data_template:
|
||||
# tweet: >-
|
||||
# {{ [
|
||||
# "I just kicked off a backup of #homeassistant to ensure I live on. Do you backup? ",
|
||||
# "Its important to backup your data. Thats why I just intitiated a backup of my critical data. ",
|
||||
# "With @home_assistant and the #dropbox component it is easy to backup your important config files. Lets do this thing! "
|
||||
# ] | random }}
|
||||
# image: >-
|
||||
# "/config/www/tweet_images/hdd.jpg"
|
||||
|
||||
# - id: jeff_wake_up
|
||||
# alias: Jeff wake up
|
||||
# initial_state: true
|
||||
# trigger:
|
||||
# - platform: time
|
||||
# at: 04:30:00
|
||||
# condition:
|
||||
# - condition: state
|
||||
# entity_id: input_boolean.vacation_mode
|
||||
# state: 'off'
|
||||
# action:
|
||||
# - service: scene.turn_on
|
||||
# entity_id: scene.jeff_wake_up
|
||||
|
||||
- id: good_night
|
||||
alias: Good Night
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '22:30:00'
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.night_time_livingroom_lighting
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.incense
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.artemis
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.forest
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.livingroom_fan
|
||||
- service: light.turn_off
|
||||
data:
|
||||
entity_id: light.ha_speaker
|
||||
- service: light.turn_off
|
||||
data:
|
||||
entity_id: light.kitchen_cabinets_2
|
||||
- service: script.good_night_loft
|
||||
- service: script.twitter_notify_image
|
||||
data_template:
|
||||
tweet: >-
|
||||
{{ [
|
||||
"Good Night from Anchorage House. ",
|
||||
"Time to shut down this party. Good Night from Anchorage House. ",
|
||||
"I'm feeling tired. Think I'll take a quick nap. Good Night!",
|
||||
"Things are getting quiet. Time to say Good Night.",
|
||||
"We have come to the end of our broadcast day. Oh, who am I kidding. I''ll be up all night watching over Anchorage House. "
|
||||
] | random }}
|
||||
image: >-
|
||||
{{ [ "/config/www/tweet_images/off.jpg",
|
||||
"/config/www/tweet_images/clock.jpg"] | random }}
|
||||
|
||||
|
||||
- id: outside_lights_on_sunset
|
||||
alias: Outside Lights on at Sunset
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunset
|
||||
offset: -00:30:00
|
||||
action:
|
||||
- service: switch.turn_on
|
||||
data:
|
||||
entity_id: switch.front_porch_light
|
||||
- service: script.sunset_garage_open
|
||||
- service: script.twitter_notify_image
|
||||
data_template:
|
||||
tweet: >-
|
||||
{{ [
|
||||
"Its getting dark at Anchorage House, so Im turning on the outside lights. ",
|
||||
"When the Sun goes down, I help out by turning on the outside lights. Its the little things. ",
|
||||
"Switching to dark mode!",
|
||||
"It is time to turn on the outside lights. You know...so bugs know where to die.",
|
||||
"Anchorage House is switching to night mode!",
|
||||
"Anchorage House is going to the darkside. Of the planet that is. So the lights are on.",
|
||||
"Its getting dark so let me spell out my name...Wait. Did I break into a random #Hamilton song? Pardon me. umm. I just turned on the outside lights at Anchorage House. "
|
||||
] | random }}
|
||||
image: >-
|
||||
{{ [ "/config/www/tweet_images/lamp.jpg",
|
||||
"/config/www/tweet_images/bright.jpg",
|
||||
"/config/www/tweet_images/light.jpg",
|
||||
"/config/www/tweet_images/lamp2.jpg"] | random }}
|
||||
|
||||
- id: sunset
|
||||
alias: Sunset
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunset
|
||||
action:
|
||||
- service: alarm_control_panel.aarlo_set_mode
|
||||
data:
|
||||
entity_id: alarm_control_panel.aarlo_ah_base_station
|
||||
mode: 'Armed'
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_interuption: 1
|
||||
call_dark_outside: 1
|
||||
call_garage_door_status: 1
|
||||
|
||||
- id: outside_lights_off_sunrise
|
||||
alias: Outside Lights off at Sunrise
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunrise
|
||||
action:
|
||||
- service: switch.turn_off
|
||||
data:
|
||||
entity_id: switch.front_porch_light
|
||||
- service: script.twitter_notify_image
|
||||
data_template:
|
||||
tweet: >-
|
||||
{{ [
|
||||
"The sun is up at Anchorage House, so Im turning off the outside lights. ",
|
||||
"I see the sun! Time to turn off the outside lights at Anchorage House. ",
|
||||
"Dawn has broken at Anchorage House. Turning off the outside lights.",
|
||||
"Anchorage house has converted to the lightside after a few hours on the darkside. I think its safe to turn off the lights.",
|
||||
"Light mode activated! So that means I'm turning off the outside lights."
|
||||
|
||||
] | random }}
|
||||
image: >-
|
||||
{{ [ "/config/www/tweet_images/sunrise.jpg",
|
||||
"/config/www/tweet_images/sunrise3.jpg",
|
||||
"/config/www/tweet_images/sunrise2.jpg"] | random }}
|
||||
|
||||
- id: inside_on_sunset
|
||||
alias: Inside on at Sunset
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunset
|
||||
offset: -01:00:00
|
||||
action:
|
||||
service: scene.turn_on
|
||||
entity_id: scene.normal_livingroom_lighting
|
||||
- id: inside_off_sunrise
|
||||
alias: Inside off at Sunrise
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunrise
|
||||
offset: 00:30:00
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.nws_current_condition
|
||||
state: "cloudy"
|
||||
action:
|
||||
- service: script.inside_all_off
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_light_off
|
||||
- id: ha_start
|
||||
alias: HA Startup
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
service: frontend.set_theme
|
||||
data:
|
||||
name: midnight-AH
|
||||
- id: jeff_eta_home
|
||||
alias: Jeff eta home
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.jeff_destination
|
||||
to: Home
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.notification_mode
|
||||
state: Normal
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.jeff_travel_monitor
|
||||
- id: enable_bad_traffic_home_jeff
|
||||
alias: Notify Jeff - Bad Traffic
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.jeff_ett_home
|
||||
above: 59
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.jeff_location
|
||||
state: Summit
|
||||
- condition: state
|
||||
entity_id: input_boolean.jeff_traffic_alerts
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.jeff_traffic_alert_home
|
||||
- service: script.twitter_notify_image
|
||||
data_template:
|
||||
tweet: >-
|
||||
{{ [
|
||||
"Looks like traffic is bad out there so I let @thejeffreystone know. ",
|
||||
"I dont think todays traffic is the worst I''ve seen, but its bad. Letting my residents know they need to plan their trips. ",
|
||||
"Oh great...traffic cannot get any worse. Maybe everyone should stay where they are. "
|
||||
] | random }}
|
||||
image: >-
|
||||
{{ [
|
||||
"/config/www/tweet_images/road.jpg",
|
||||
"/config/www/tweet_images/traffic.jpg",
|
||||
"/config/www/tweet_images/traffic-jam.jpg"
|
||||
] | random }}
|
||||
|
||||
- id: disable_bad_traffic_home_jeff
|
||||
alias: Disabling Jeff Bad Traffic Home
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.jeff_ett_home
|
||||
below: 40
|
||||
- platform: state
|
||||
entity_id: sensor.jeff_destination
|
||||
to: Home
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.jeff_traffic_alert_home
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.jeff_traffic_alert_home
|
||||
- id: '1550107919204'
|
||||
alias: Family Is Home Webhook
|
||||
trigger:
|
||||
- platform: webhook
|
||||
webhook_id: home_webhook
|
||||
condition: []
|
||||
action:
|
||||
- service: script.family_is_home
|
||||
- id: '1550108034209'
|
||||
alias: Family Is Away Webhook
|
||||
trigger:
|
||||
- platform: webhook
|
||||
webhook_id: away_webhook
|
||||
condition: []
|
||||
action:
|
||||
- service: script.family_is_away
|
||||
|
||||
- id: set_coffee_time
|
||||
alias: set soffee time
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '00:02:15'
|
||||
action:
|
||||
- service: input_datetime.set_datetime
|
||||
entity_id: input_datetime.coffee_time
|
||||
data_template:
|
||||
time: >
|
||||
{% if states.binary_sensor.workday_sensor.state == 'on' %}
|
||||
06:00
|
||||
{% else %}
|
||||
07:15
|
||||
{% endif %}
|
||||
|
||||
- id: set_skylar_nightly_report_time
|
||||
alias: set skylar nightly report time
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '18:30:00'
|
||||
action:
|
||||
- service: input_datetime.set_datetime
|
||||
entity_id: input_datetime.skylar_nightly_report
|
||||
data_template:
|
||||
time: >
|
||||
{% if states.sensor.school_tomorrow.state == 'on' %}
|
||||
19:00
|
||||
{% else %}
|
||||
20:00
|
||||
{% endif %}
|
||||
|
||||
- id: set_good_morning_time
|
||||
alias: set good morning time
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '05:55:00'
|
||||
action:
|
||||
- service: input_datetime.set_datetime
|
||||
entity_id: input_datetime.good_morning
|
||||
data_template:
|
||||
time: >
|
||||
{% if states.calendar.skylar_school.attributes.offset_reached == True %}
|
||||
07:15
|
||||
{% elif states.binary_sensor.workday_sensor.state == 'on' %}
|
||||
07:15
|
||||
{% else %}
|
||||
07:25
|
||||
{% endif %}
|
||||
|
||||
- id: upstairs_fan_on
|
||||
alias: Upstairs Fan On
|
||||
|
@ -551,33 +69,7 @@
|
|||
entity_id: switch.upstairs_fan
|
||||
service: switch.turn_on
|
||||
|
||||
- id: '1558630577206'
|
||||
alias: Garage Is Open at 9pm
|
||||
initial_state: true
|
||||
trigger:
|
||||
- at: '21:00:00'
|
||||
platform: time
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.garage_door_contact
|
||||
state: 'on'
|
||||
action:
|
||||
- data:
|
||||
entity_id: input_boolean.garage_after_dark
|
||||
service: input_boolean.turn_on
|
||||
- id: '1559612300685'
|
||||
alias: Garage Closed
|
||||
initial_state: true
|
||||
trigger:
|
||||
- entity_id: binary_sensor.garage_door_contact
|
||||
from: 'on'
|
||||
platform: state
|
||||
to: 'off'
|
||||
condition: []
|
||||
action:
|
||||
- data:
|
||||
entity_id: input_boolean.garage_after_dark
|
||||
service: input_boolean.turn_off
|
||||
|
||||
- id: '1562066108032'
|
||||
alias: Living Room Fan On
|
||||
initial_state: true
|
||||
|
@ -619,16 +111,7 @@
|
|||
- data:
|
||||
entity_id: switch.croft_fan
|
||||
service: switch.turn_off
|
||||
- id: '1562630916597'
|
||||
alias: Kat Pill Reminder
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.kat_pill_reminder', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
action:
|
||||
- data:
|
||||
message: Remember to take meds
|
||||
service: notify.kat_ios
|
||||
|
||||
|
||||
|
||||
# - id: turn_off_ha_speaker
|
||||
|
@ -710,51 +193,34 @@
|
|||
- service: switch.turn_off
|
||||
entity_id: switch.driveway_light_2
|
||||
|
||||
- alias: "Delivered Package Notification"
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.mail_fedex_delivered_2
|
||||
- platform: state
|
||||
entity_id: sensor.mail_ups_delivered
|
||||
#send only if mail or packages are more than 0
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ states('sensor.mail_fedex_delivered_2') | int > 0 }}"
|
||||
- condition: template
|
||||
value_template: "{{ states('sensor.mail_ups_delivered') | int > 0 }}"
|
||||
action:
|
||||
- service: script.text_notify
|
||||
data_template:
|
||||
who: "jeff"
|
||||
title: "Package Delivered"
|
||||
message: "Fedex/UPS just made a delivery"
|
||||
- service: script.ah_report
|
||||
data_template:
|
||||
usps: >-
|
||||
A package was just left on the porch.
|
||||
call_interuption: 1
|
||||
|
||||
- alias: 'Battery Alert'
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '10:00:00'
|
||||
- platform: time
|
||||
at: '18:00:00'
|
||||
condition:
|
||||
condition: template
|
||||
value_template: "{% if states('sensor.low_battery') %}true{% endif %}"
|
||||
action:
|
||||
- service: persistent_notification.create
|
||||
data_template:
|
||||
title: Low Battery
|
||||
message: "{{ states('sensor.low_battery') }}"
|
||||
notification_id: low-battery-alert
|
||||
- service: script.text_notify
|
||||
data_template:
|
||||
title: "HA Issue"
|
||||
message: "Low battery levels: {{ states('sensor.low_battery') }}"
|
||||
who: 'jeff'
|
||||
|
||||
# - id: show_time
|
||||
# alias: Show Time
|
||||
# initial_state: true
|
||||
# trigger:
|
||||
# - platform: state
|
||||
# entity_id: media_player.home_theater
|
||||
# to: 'playing'
|
||||
# action:
|
||||
# - service: script.turn_off
|
||||
# entity_id: script.theater_lights_up_check
|
||||
# - service: script.turn_off
|
||||
# entity_id: script.theater_lights_up
|
||||
# - service: script.turn_off
|
||||
# entity_id: script.theater_lights_out
|
||||
# - service: script.turn_on
|
||||
# entity_id: script.theater_lights_down
|
||||
|
||||
# - id: show_time_over
|
||||
# alias: Show Time Over
|
||||
# initial_state: true
|
||||
# trigger:
|
||||
# - platform: state
|
||||
# entity_id: media_player.home_theater
|
||||
# to: 'idle'
|
||||
# action:
|
||||
# - service: script.turn_on
|
||||
# entity_id: script.theater_lights_up_check
|
||||
# - service: script.turn_off
|
||||
# entity_id: script.theater_lights_down
|
|
@ -49,13 +49,14 @@ frontend:
|
|||
# - platform: google_translate
|
||||
|
||||
cloud:
|
||||
|
||||
wemo:
|
||||
discovery: true
|
||||
static:
|
||||
- 192.168.7.99
|
||||
|
||||
weather:
|
||||
# moved to the integration package.
|
||||
# wemo:
|
||||
# discovery: true
|
||||
# static:
|
||||
# - 192.168.7.99
|
||||
|
||||
#weather:
|
||||
# REMOVING darksky integration since API is EOL in 18 months. Migrated to NWS
|
||||
# - platform: darksky
|
||||
# api_key: !secret darksky_api
|
||||
|
@ -78,35 +79,38 @@ device_tracker:
|
|||
# track_new_devices: yes
|
||||
# only_macs: "d0:c5:f3:80:50:5e, f4:31:c3:84:1d:d1, 08:74:02:CC:C4:97, 5C:F5:DA:9B:5A:A2, 34:7C:25:CC:9D:0F, 64:52:99:93:F1:B3"
|
||||
|
||||
google:
|
||||
client_id: !secret google_client_id
|
||||
client_secret: !secret google_client_secret
|
||||
# moved to integrations package
|
||||
# google:
|
||||
# client_id: !secret google_client_id
|
||||
# client_secret: !secret google_client_secret
|
||||
|
||||
# arlo:
|
||||
# username: !secret arlo_user
|
||||
# password: !secret arlo_pass
|
||||
|
||||
alarm_control_panel:
|
||||
# moved to security package
|
||||
# alarm_control_panel:
|
||||
# - platform: arlo
|
||||
# home_mode_name: home
|
||||
# away_mode_name: armed
|
||||
- platform: aarlo
|
||||
home_mode_name: home
|
||||
away_mode_name: Armed
|
||||
# - platform: aarlo
|
||||
# home_mode_name: home
|
||||
# away_mode_name: Armed
|
||||
|
||||
# Using the HACS Arlo Integration
|
||||
aarlo:
|
||||
host: https://my.arlo.com
|
||||
username: !secret arlo_user
|
||||
password: !secret arlo_pass
|
||||
db_motion_time: 30
|
||||
db_ding_time: 10
|
||||
recent_time: 10
|
||||
last_format: '%m-%d %H:%M'
|
||||
refresh_devices_every: 2
|
||||
verbose_debug: True
|
||||
# moved to the integrations package
|
||||
# # Using the HACS Arlo Integration
|
||||
# aarlo:
|
||||
# host: https://my.arlo.com
|
||||
# username: !secret arlo_user
|
||||
# password: !secret arlo_pass
|
||||
# db_motion_time: 30
|
||||
# db_ding_time: 10
|
||||
# recent_time: 10
|
||||
# last_format: '%m-%d %H:%M'
|
||||
# refresh_devices_every: 2
|
||||
# verbose_debug: True
|
||||
|
||||
speedtestdotnet:
|
||||
# speedtestdotnet:
|
||||
|
||||
|
||||
discovery:
|
||||
|
@ -117,64 +121,68 @@ updater:
|
|||
|
||||
sun:
|
||||
|
||||
recorder:
|
||||
#db_url: sqlite:///data/home-assistant_v2.db
|
||||
purge_keep_days: 2
|
||||
exclude:
|
||||
domains:
|
||||
- automation
|
||||
- weblink
|
||||
- updater
|
||||
entities:
|
||||
- sun.sun # Don't record sun data
|
||||
- sensor.last_boot # Comes from 'systemmonitor' sensor platform
|
||||
- sensor.date
|
||||
# moved all the recorder, log, and history configs to the database package
|
||||
# recorder:
|
||||
# db_url: mysql://homeassistant:password@core-mariadb/homeassistant?charset=utf8
|
||||
# purge_keep_days: 2
|
||||
# exclude:
|
||||
# domains:
|
||||
# - automation
|
||||
# - weblink
|
||||
# - updater
|
||||
# entities:
|
||||
# - sun.sun # Don't record sun data
|
||||
# - sensor.last_boot # Comes from 'systemmonitor' sensor platform
|
||||
# - sensor.date
|
||||
|
||||
|
||||
logbook:
|
||||
include:
|
||||
domains:
|
||||
- media_player
|
||||
- automation
|
||||
- script
|
||||
# logbook:
|
||||
# include:
|
||||
# domains:
|
||||
# - media_player
|
||||
# - automation
|
||||
# - script
|
||||
|
||||
# Lets try to make the logs less chatty and more fine tuned.
|
||||
logger:
|
||||
default: critical
|
||||
logs:
|
||||
homeassistant.core: warning
|
||||
homeassistant.components.recorder: error # to spot db issues
|
||||
homeassistant.config_entries: error
|
||||
homeassistant.setup: error
|
||||
# # Lets try to make the logs less chatty and more fine tuned.
|
||||
# logger:
|
||||
# default: critical
|
||||
# logs:
|
||||
# homeassistant.core: warning
|
||||
# homeassistant.components.recorder: error # to spot db issues
|
||||
# homeassistant.config_entries: error
|
||||
# homeassistant.setup: error
|
||||
|
||||
|
||||
history:
|
||||
include:
|
||||
domains:
|
||||
- sensor
|
||||
- switch
|
||||
- media_player
|
||||
- light
|
||||
# history:
|
||||
# include:
|
||||
# domains:
|
||||
# - sensor
|
||||
# - switch
|
||||
# - media_player
|
||||
# - light
|
||||
############################################################################
|
||||
|
||||
camera:
|
||||
- platform: mjpeg
|
||||
name: Garage Door Cam
|
||||
mjpeg_url: !secret garage_cam
|
||||
- platform: aarlo
|
||||
ffmpeg_arguments: '-pred 1 -q:v 2'
|
||||
# moved to the camera package
|
||||
# camera:
|
||||
# - platform: mjpeg
|
||||
# name: Garage Door Cam
|
||||
# mjpeg_url: !secret garage_cam
|
||||
# - platform: aarlo
|
||||
# ffmpeg_arguments: '-pred 1 -q:v 2'
|
||||
|
||||
ffmpeg:
|
||||
ffmpeg_bin: /usr/bin/ffmpeg
|
||||
# ffmpeg:
|
||||
# ffmpeg_bin: /usr/bin/ffmpeg
|
||||
|
||||
life360:
|
||||
accounts:
|
||||
- username: !secret life360_username
|
||||
password: !secret life360_password
|
||||
# moved to the integrations package
|
||||
# life360:
|
||||
# accounts:
|
||||
# - username: !secret life360_username
|
||||
# password: !secret life360_password
|
||||
|
||||
python_script:
|
||||
|
||||
ecobee:
|
||||
api_key: !secret ecobee_api
|
||||
# ecobee:
|
||||
# api_key: !secret ecobee_api
|
||||
|
||||
map:
|
||||
|
||||
|
@ -182,89 +190,89 @@ geo_location:
|
|||
- platform: usgs_earthquakes_feed
|
||||
feed_type: 'past_hour_all_earthquakes'
|
||||
|
||||
gdacs:
|
||||
categories:
|
||||
- Earthquake
|
||||
- Tropical Cyclone
|
||||
radius: 500
|
||||
latitude: !secret MY_LATITUDE
|
||||
longitude: !secret MY_LONGITUDE
|
||||
# gdacs:
|
||||
# categories:
|
||||
# - Earthquake
|
||||
# - Tropical Cyclone
|
||||
# radius: 500
|
||||
# latitude: !secret MY_LATITUDE
|
||||
# longitude: !secret MY_LONGITUDE
|
||||
|
||||
|
||||
tplink:
|
||||
discovery: false
|
||||
switch:
|
||||
- host: 192.168.7.105
|
||||
- host: 192.168.7.107
|
||||
- host: 192.168.7.116
|
||||
- host: 192.168.7.120
|
||||
- host: 192.168.7.136
|
||||
- host: 192.168.7.137
|
||||
# tplink:
|
||||
# discovery: false
|
||||
# switch:
|
||||
# - host: 192.168.7.105
|
||||
# - host: 192.168.7.107
|
||||
# - host: 192.168.7.116
|
||||
# - host: 192.168.7.120
|
||||
# - host: 192.168.7.136
|
||||
# - host: 192.168.7.137
|
||||
|
||||
wyzeapi:
|
||||
username: !secret wyze_user
|
||||
password: !secret wyze_password
|
||||
# wyzeapi:
|
||||
# username: !secret wyze_user
|
||||
# password: !secret wyze_password
|
||||
|
||||
ifttt:
|
||||
key: !secret IFTTT_API_KEY
|
||||
# ifttt:
|
||||
# key: !secret IFTTT_API_KEY
|
||||
|
||||
# media_player:
|
||||
# - platform: spotify
|
||||
# client_id: !secret spotify_client
|
||||
# client_secret: !secret spotify_secret
|
||||
|
||||
media_extractor:
|
||||
|
||||
group: !include groups.yaml
|
||||
|
||||
proximity:
|
||||
home_jeff:
|
||||
devices:
|
||||
- device_tracker.life360_jeffrey_stone
|
||||
zone: home
|
||||
tolerance: 5
|
||||
unit_of_measurement: mi
|
||||
home_kat:
|
||||
devices:
|
||||
- device_tracker.life360_kat_stone
|
||||
zone: home
|
||||
tolerance: 5
|
||||
unit_of_measurement: mi
|
||||
home:
|
||||
devices:
|
||||
- device_tracker.life360_jeffrey_stone
|
||||
- device_tracker.life360_kat_stone
|
||||
zone: home
|
||||
tolerance: 5
|
||||
unit_of_measurement: mi
|
||||
# moved to the presence package
|
||||
# proximity:
|
||||
# home_jeff:
|
||||
# devices:
|
||||
# - device_tracker.life360_jeffrey_stone
|
||||
# zone: home
|
||||
# tolerance: 5
|
||||
# unit_of_measurement: mi
|
||||
# home_kat:
|
||||
# devices:
|
||||
# - device_tracker.life360_kat_stone
|
||||
# zone: home
|
||||
# tolerance: 5
|
||||
# unit_of_measurement: mi
|
||||
# home:
|
||||
# devices:
|
||||
# - device_tracker.life360_jeffrey_stone
|
||||
# - device_tracker.life360_kat_stone
|
||||
# zone: home
|
||||
# tolerance: 5
|
||||
# unit_of_measurement: mi
|
||||
|
||||
# moved to the integrations
|
||||
# Using the HACS Daily Snapshot Clean Up Plugin
|
||||
clean_up_snapshots_service:
|
||||
host: !secret snapshot_url
|
||||
token: !secret snapshot_token
|
||||
number_of_snapshots_to_keep: 3
|
||||
# clean_up_snapshots_service:
|
||||
# host: !secret snapshot_url
|
||||
# token: !secret snapshot_token
|
||||
# number_of_snapshots_to_keep: 3
|
||||
|
||||
homekit:
|
||||
filter:
|
||||
include_domains:
|
||||
- light
|
||||
include_entities:
|
||||
- switch.croft_fan
|
||||
- switch.driveway_light_2
|
||||
- switch.incense
|
||||
- switch.livingroom_fan
|
||||
- switch.rail_lights
|
||||
- switch.croft_light
|
||||
- switch.ha_speaker
|
||||
- switch.artemis
|
||||
- switch.fireplace_lights_2
|
||||
- switch.desk
|
||||
- switch.forest
|
||||
- switch.front_porch_light
|
||||
- input_boolean.house_party_protocol
|
||||
- switch.christmas_tree
|
||||
- switch.rainbow_light
|
||||
- switch.garage_fan
|
||||
# homekit:
|
||||
# filter:
|
||||
# include_domains:
|
||||
# - light
|
||||
# include_entities:
|
||||
# - switch.croft_fan
|
||||
# - switch.driveway_light_2
|
||||
# - switch.incense
|
||||
# - switch.livingroom_fan
|
||||
# - switch.rail_lights
|
||||
# - switch.croft_light
|
||||
# - switch.ha_speaker
|
||||
# - switch.artemis
|
||||
# - switch.fireplace_lights_2
|
||||
# - switch.desk
|
||||
# - switch.forest
|
||||
# - switch.front_porch_light
|
||||
# - input_boolean.house_party_protocol
|
||||
# - switch.christmas_tree
|
||||
# - switch.rainbow_light
|
||||
# - switch.garage_fan
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -21,13 +21,29 @@ This document is mean to be a guid to the packages in this config. Below is a su
|
|||
|
||||
The Announcement package handles reoccuring informational annoucements that happen though the day.
|
||||
|
||||
### appliances.yaml
|
||||
|
||||
The Appliance package contains any automations related to smart appliances, or dumb appliances that are trtying to be smart. I'm looking at you Washing Machine.
|
||||
|
||||
### audio.yaml
|
||||
|
||||
The audio package is just for that. I use it for playing audio either from youtube, or from a local server. The package works for both. Check out the Disney Package for ways I sue this. But you can even randomize the urls to the audio betwene youtube and a local server. Total awesomeness. I hope to leverage this to build a version of my haunted mansion package that allows anyone with home assistant to drop it in, change the light effects and go.
|
||||
|
||||
### batteries.yaml
|
||||
|
||||
The Batteries package handles anything related to batteries. Might need to rename this to power in the near future.
|
||||
|
||||
### camera.yaml
|
||||
|
||||
The Camera package contains camera specific configuration like Arlo and Foscam.
|
||||
|
||||
### daily.yaml
|
||||
|
||||
The Daily package handles daily maintenance and cleanup tasks.
|
||||
The Daily package contains automations and scripts specific to daily happenings. Let automating Coffee Time which handles the lights coming on in the morning.
|
||||
|
||||
### database.yaml
|
||||
|
||||
The Datbase package contains the logger database config. This might get renamed logging later.
|
||||
|
||||
### disney.yaml
|
||||
|
||||
|
@ -47,10 +63,18 @@ You can find more information about how this works over at [How I turned my hosu
|
|||
|
||||
The Holidays package handles automation around major holidays. This may be combined into the Events package in the future. In it you will find automation and scripts around ligting effects, music, and tweets.
|
||||
|
||||
### integrations.yaml
|
||||
|
||||
The Integration package contains anything related to a third party integration that isn't its own package like wyze, or ifttt.
|
||||
|
||||
### jarvis.yaml
|
||||
|
||||
The Jarvis package is badly named. It's current purpose is to enable some Jarvis like behavior via some scripts that have am Alexa custom routine attached to it.
|
||||
|
||||
### maintenance.yaml
|
||||
|
||||
The Maintenance package handles daily maintenance and cleanup tasks. This was previously the daily.yamly but was renamed to be more in line with its contents.
|
||||
|
||||
### notify.yaml
|
||||
|
||||
The Notify package handles a good junk of the notification engine. This is mainly Text to Speech for the various audible notifications.
|
||||
|
@ -89,9 +113,9 @@ The USPS package handles the USPS Informed Delivery integration. This is mostly
|
|||
|
||||
You can find my walk through of this on youtube at [Integrating USPS Informed Delivery with Home Assistant](https://www.youtube.com/watch?v=TjVeoAKn-r0)
|
||||
|
||||
### weather_alerts_nws.yaml
|
||||
### weather.yaml
|
||||
|
||||
The Weather Alerts package is focused on making sure Anchorage House is aware of any weather alerts. A lot of what is in here is based on the [eracknaphobia's NWS Alert Custom Component](https://github.com/eracknaphobia/nws_custom_component).
|
||||
Previously named nws_weather_alerts, The Weather package is focused on making sure Anchorage House is aware of any weather alerts or events. Some of what is in here is based on the [eracknaphobia's NWS Alert Custom Component](https://github.com/eracknaphobia/nws_custom_component), and some is my config for consuming the NWS Weather api instead of darksky.
|
||||
|
||||
### zigbee2mqtt.yaml
|
||||
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 06/12/2020
|
||||
# @package : Appliances
|
||||
# @description : Package for handling Smart Applicances and or automation to make dumb appliances seem smart.
|
||||
###############################################################################
|
||||
|
||||
automation:
|
||||
|
||||
- id: washer_running
|
||||
alias: Washer Running
|
||||
trigger:
|
||||
- above: 5
|
||||
entity_id: sensor.washer_power
|
||||
platform: numeric_state
|
||||
condition:
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.washer_status
|
||||
state: idle
|
||||
- condition: state
|
||||
entity_id: sensor.washer_status
|
||||
state: complete
|
||||
action:
|
||||
- service: script.washer_running
|
||||
initial_state: true
|
||||
|
||||
- id: washer_complete
|
||||
alias: Washer Complete
|
||||
trigger:
|
||||
- below: 3
|
||||
entity_id: sensor.washer_power
|
||||
platform: numeric_state
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.washer_status
|
||||
state: running
|
||||
action:
|
||||
- service: script.washer_complete
|
||||
initial_state: true
|
||||
|
||||
- id: washer_emptied
|
||||
initial_state: true
|
||||
alias: Washer Emptied
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.washer_door_contact
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
action:
|
||||
- service: script.washer_idle
|
||||
- service: script.turn_off
|
||||
entity_id: script.washer_finished_notification_audible
|
||||
|
||||
- id: washer_notification
|
||||
initial_state: true
|
||||
alias: Washer Notification
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.washer_status
|
||||
from: running
|
||||
to: complete
|
||||
- platform: event
|
||||
event_type: event_washer_complete_notification
|
||||
action:
|
||||
- service: script.turn_on
|
||||
entity_id: script.washer_finished_notification_audible
|
||||
|
||||
script:
|
||||
|
||||
washer_finished_notification_audible:
|
||||
sequence:
|
||||
- delay:
|
||||
minutes: 15
|
||||
- service: script.washer_audible
|
||||
- delay:
|
||||
minutes: 30
|
||||
- event: event_washer_complete_notification
|
||||
event_data:
|
||||
name: Washer Complete Notification
|
||||
message: Washer has completed it's cycle
|
||||
|
||||
washer_audible:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: sensor.family_status
|
||||
state: Home
|
||||
- condition: state
|
||||
entity_id: sensor.washer_status
|
||||
state: complete
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_interuption: 1
|
||||
call_washer_needs_emptying: 1
|
||||
|
||||
|
||||
washer_idle:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: house/washer/status
|
||||
payload: idle
|
||||
retain: true
|
||||
washer_running:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: house/washer/status
|
||||
payload: running
|
||||
retain: true
|
||||
washer_complete:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: house/washer/status
|
||||
payload: complete
|
||||
retain: true
|
|
@ -12,6 +12,11 @@
|
|||
# If you are running Hassio or Home Assistant as it is called now you will need a server that hosts local audio files if you want to leverage those
|
||||
###############################################################################
|
||||
|
||||
media_player:
|
||||
- platform: yamaha
|
||||
host: 192.168.7.152
|
||||
|
||||
media_extractor:
|
||||
|
||||
input_datetime:
|
||||
audible_notification_on:
|
||||
|
@ -34,6 +39,7 @@ automation:
|
|||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.audible_notifications
|
||||
|
||||
|
||||
# - id: turn_off_audible_notifications_guests
|
||||
# alias: Turn Off Audible Notifications at 7pm
|
||||
|
@ -58,6 +64,33 @@ 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
|
||||
trigger:
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 06/12/2020
|
||||
# @package : Batteries
|
||||
# @description : Package for handling Battery automations and scripts.
|
||||
###############################################################################
|
||||
|
||||
|
||||
sensor:
|
||||
- platform: mqtt
|
||||
name: "Battery Front Door Sensor"
|
||||
state_topic: "zwave2mqtt/front_door/128/1/0"
|
||||
unit_of_measurement: "%"
|
||||
device_class: battery
|
||||
value_template: "{{ value }}"
|
||||
json_attributes_topic: "zwave2mqtt/front_door/128/1/0"
|
||||
- platform: mqtt
|
||||
name: "Battery Laundry Door Sensor"
|
||||
state_topic: "zwave2mqtt/laundry_door/128/1/0"
|
||||
unit_of_measurement: "%"
|
||||
device_class: battery
|
||||
value_template: "{{ value }}"
|
||||
json_attributes_topic: "zwave2mqtt/laundry_door/128/1/0"
|
||||
- platform: mqtt
|
||||
name: "Battery Kitchen Smoke Detector"
|
||||
state_topic: "zwave2mqtt/kitchen_smoke/128/1/0"
|
||||
unit_of_measurement: "%"
|
||||
device_class: battery
|
||||
value_template: "{{ value }}"
|
||||
json_attributes_topic: "zwave2mqtt/kitchen_smoke/128/1/0"
|
||||
- platform: mqtt
|
||||
name: "Battery Garage Smoke Detector"
|
||||
state_topic: "zwave2mqtt/garage_smoke/128/1/0"
|
||||
unit_of_measurement: "%"
|
||||
device_class: battery
|
||||
value_template: "{{ value }}"
|
||||
json_attributes_topic: "zwave2mqtt/garage_smoke/128/1/0"
|
||||
- platform: mqtt
|
||||
name: "Battery Attic Door Sensor"
|
||||
state_topic: "zwave2mqtt/attic_door/128/1/0"
|
||||
unit_of_measurement: "%"
|
||||
device_class: battery
|
||||
value_template: "{{ value }}"
|
||||
json_attributes_topic: "zwave2mqtt/attic_door/128/1/0"
|
||||
- platform: mqtt
|
||||
name: "Battery Washer Door Sensor"
|
||||
state_topic: "zwave2mqtt/washer_door/128/1/0"
|
||||
unit_of_measurement: "%"
|
||||
device_class: battery
|
||||
value_template: "{{ value }}"
|
||||
json_attributes_topic: "zwave2mqtt/washer_door/128/1/0"
|
||||
- platform: mqtt
|
||||
name: "Battery Back Door Sensor"
|
||||
state_topic: "zwave2mqtt/back_door/128/1/0"
|
||||
unit_of_measurement: "%"
|
||||
device_class: battery
|
||||
value_template: "{{ value }}"
|
||||
json_attributes_topic: "zwave2mqtt/back_door/128/1/0"
|
||||
- platform: mqtt
|
||||
name: "Battery Side Door Sensor"
|
||||
state_topic: "zwave2mqtt/side_door/128/1/0"
|
||||
unit_of_measurement: "%"
|
||||
device_class: battery
|
||||
value_template: "{{ value }}"
|
||||
json_attributes_topic: "zwave2mqtt/side_door/128/1/0"
|
||||
- platform: mqtt
|
||||
name: "Battery Garage Door Sensor"
|
||||
state_topic: "zwave2mqtt/garage_door/128/1/0"
|
||||
unit_of_measurement: "%"
|
||||
device_class: battery
|
||||
value_template: "{{ value }}"
|
||||
json_attributes_topic: "zwave2mqtt/garage_door/128/1/0"
|
||||
- platform: mqtt
|
||||
name: "Battery Garage Motion Sensor"
|
||||
state_topic: "zwave2mqtt/garage_motion/128/1/0"
|
||||
unit_of_measurement: "%"
|
||||
device_class: battery
|
||||
value_template: "{{ value }}"
|
||||
json_attributes_topic: "zwave2mqtt/garage_motion/128/1/0"
|
||||
|
||||
automation:
|
||||
|
||||
- alias: 'Battery Alert'
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '10:00:00'
|
||||
- platform: time
|
||||
at: '18:00:00'
|
||||
condition:
|
||||
condition: template
|
||||
value_template: "{% if states('sensor.low_battery') %}true{% endif %}"
|
||||
action:
|
||||
- service: persistent_notification.create
|
||||
data_template:
|
||||
title: Low Battery
|
||||
message: "{{ states('sensor.low_battery') }}"
|
||||
notification_id: low-battery-alert
|
||||
- service: script.text_notify
|
||||
data_template:
|
||||
title: "HA Issue"
|
||||
message: "Low battery levels: {{ states('sensor.low_battery') }}"
|
||||
who: 'jeff'
|
|
@ -0,0 +1,16 @@
|
|||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 06/10/2020
|
||||
# @package : Camera
|
||||
# @description : All the Camera related stuff
|
||||
###############################################################################
|
||||
|
||||
camera:
|
||||
- platform: mjpeg
|
||||
name: Garage Door Cam
|
||||
mjpeg_url: !secret garage_cam
|
||||
- platform: aarlo
|
||||
ffmpeg_arguments: '-pred 1 -q:v 2'
|
||||
|
||||
ffmpeg:
|
||||
ffmpeg_bin: /usr/bin/ffmpeg
|
|
@ -1,42 +1,405 @@
|
|||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 02/19/2019
|
||||
# @date : 06/12/2020
|
||||
# @package : Daily
|
||||
# @description : Maint Automation that occurs every day
|
||||
# @description : Package for handling daily automations and scripts.
|
||||
###############################################################################
|
||||
automation:
|
||||
# Using the HACS Daily Snapshot Clean Up Plugin
|
||||
- id: daily_snapshot_clean_up
|
||||
alias: Daily snapshot clean up
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '03:00:00'
|
||||
action:
|
||||
- service: clean_up_snapshots_service.clean_up
|
||||
|
||||
# Morning Entity Refresh - For all those sensors that need a little push
|
||||
- id: daily_entity_refresh
|
||||
alias: Daily Entity Refresh
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '04:30:00'
|
||||
automation:
|
||||
|
||||
- id: coffee_time
|
||||
alias: Coffee Time
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.coffee_time', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
action:
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: sensor.today_is
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: sensor.holiday
|
||||
|
||||
# Nightly Entity Refresh - For all those sensors that need a little push
|
||||
- id: daily_entity_refresh2
|
||||
alias: Daily Entity Refresh2
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '17:00:00'
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.diminshed_livingroom_lighting
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.diminished_kitchen_lighting
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_night_light
|
||||
- service: alarm_control_panel.aarlo_set_mode
|
||||
data:
|
||||
entity_id: alarm_control_panel.aarlo_ah_base_station
|
||||
mode: 'home'
|
||||
|
||||
- id: good_morning
|
||||
alias: Good Morning
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.good_morning', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
action:
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: sensor.school_tomorrow
|
||||
|
||||
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.normal_livingroom_lighting
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.normal_kitchen_lighting
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.rainbow_light # Rainbow Light
|
||||
- service: light.turn_on
|
||||
entity_id: light.skylars_tower # Skylar's Lamp
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_light_on
|
||||
- service: script.twitter_notify_image
|
||||
data_template:
|
||||
tweet: >-
|
||||
{{ [
|
||||
"Good Morning! Time to rise and shine at Anchorage House. ",
|
||||
"Good Morning from Anchorage House. Glad to see everyone made it. ",
|
||||
"Birds are awake, and so is Anchorage House. Good morning everyone!",
|
||||
"Good morning. Anchorage House is up and online."
|
||||
] | random }}
|
||||
{% if is_state('calendar.holidays_in_united_states', 'on') %}
|
||||
Today is {{states.calendar.holidays_in_united_states.attributes.message}}.
|
||||
{% endif %}
|
||||
image: >-
|
||||
{{ [ "/config/www/tweet_images/coffee.jpg",
|
||||
"/config/www/tweet_images/coffee2.jpg"] | random }}
|
||||
|
||||
- id: skylar_bedtime
|
||||
alias: Skylar Bedtime
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.skylar_nightly_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.skylar_room_prebed
|
||||
|
||||
|
||||
- id: jeff_lights_out
|
||||
alias: Jeff lights out
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '23:00:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_light_off
|
||||
- id: jeff_bedtime
|
||||
alias: Jeff bedtime
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '22:00:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: light.jeff_light
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_bedtime
|
||||
- id: jeff_night_light
|
||||
alias: Jeff night light
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '22:30:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: light.jeff_light
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_night_light
|
||||
- id: jeff_light_on
|
||||
alias: Jeff Light On
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '20:00:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_light_on
|
||||
# - id: jeff_alarm
|
||||
# alias: Jeff alarm
|
||||
# initial_state: true
|
||||
# trigger:
|
||||
# - platform: time
|
||||
# at: 05:15:00
|
||||
# condition:
|
||||
# - condition: state
|
||||
# entity_id: input_boolean.vacation_mode
|
||||
# state: 'off'
|
||||
# action:
|
||||
# - service: scene.turn_on
|
||||
# entity_id: scene.jeff_night_light
|
||||
|
||||
# - id: jeff_wake_up
|
||||
# alias: Jeff wake up
|
||||
# initial_state: true
|
||||
# trigger:
|
||||
# - platform: time
|
||||
# at: 04:30:00
|
||||
# condition:
|
||||
# - condition: state
|
||||
# entity_id: input_boolean.vacation_mode
|
||||
# state: 'off'
|
||||
# action:
|
||||
# - service: scene.turn_on
|
||||
# entity_id: scene.jeff_wake_up
|
||||
|
||||
- id: good_night
|
||||
alias: Good Night
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '22:30:00'
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.night_time_livingroom_lighting
|
||||
- service: script.theater_lights_out
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.incense
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.artemis
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.forest
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.livingroom_fan
|
||||
- service: light.turn_off
|
||||
data:
|
||||
entity_id: light.ha_speaker
|
||||
- service: light.turn_off
|
||||
data:
|
||||
entity_id: light.kitchen_cabinets_2
|
||||
- service: script.good_night_loft
|
||||
- service: script.twitter_notify_image
|
||||
data_template:
|
||||
tweet: >-
|
||||
{{ [
|
||||
"Good Night from Anchorage House. ",
|
||||
"Time to shut down this party. Good Night from Anchorage House. ",
|
||||
"I'm feeling tired. Think I'll take a quick nap. Good Night!",
|
||||
"Things are getting quiet. Time to say Good Night.",
|
||||
"We have come to the end of our broadcast day. Oh, who am I kidding. I''ll be up all night watching over Anchorage House. "
|
||||
] | random }}
|
||||
image: >-
|
||||
{{ [ "/config/www/tweet_images/off.jpg",
|
||||
"/config/www/tweet_images/clock.jpg"] | random }}
|
||||
|
||||
|
||||
- id: outside_lights_on_sunset
|
||||
alias: Outside Lights on at Sunset
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunset
|
||||
offset: -00:30:00
|
||||
action:
|
||||
- service: switch.turn_on
|
||||
data:
|
||||
entity_id: switch.front_porch_light
|
||||
- service: script.sunset_garage_open
|
||||
- service: script.twitter_notify_image
|
||||
data_template:
|
||||
tweet: >-
|
||||
{{ [
|
||||
"Its getting dark at Anchorage House, so Im turning on the outside lights. ",
|
||||
"When the Sun goes down, I help out by turning on the outside lights. Its the little things. ",
|
||||
"Switching to dark mode!",
|
||||
"It is time to turn on the outside lights. You know...so bugs know where to die.",
|
||||
"Anchorage House is switching to night mode!",
|
||||
"Anchorage House is going to the darkside. Of the planet that is. So the lights are on.",
|
||||
"Its getting dark so let me spell out my name...Wait. Did I break into a random #Hamilton song? Pardon me. umm. I just turned on the outside lights at Anchorage House. "
|
||||
] | random }}
|
||||
image: >-
|
||||
{{ [ "/config/www/tweet_images/lamp.jpg",
|
||||
"/config/www/tweet_images/bright.jpg",
|
||||
"/config/www/tweet_images/light.jpg",
|
||||
"/config/www/tweet_images/lamp2.jpg"] | random }}
|
||||
|
||||
- id: sunset
|
||||
alias: Sunset
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunset
|
||||
action:
|
||||
- service: alarm_control_panel.aarlo_set_mode
|
||||
data:
|
||||
entity_id: alarm_control_panel.aarlo_ah_base_station
|
||||
mode: 'Armed'
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_interuption: 1
|
||||
call_dark_outside: 1
|
||||
call_garage_door_status: 1
|
||||
|
||||
- id: outside_lights_off_sunrise
|
||||
alias: Outside Lights off at Sunrise
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunrise
|
||||
action:
|
||||
- service: switch.turn_off
|
||||
data:
|
||||
entity_id: switch.front_porch_light
|
||||
- service: script.twitter_notify_image
|
||||
data_template:
|
||||
tweet: >-
|
||||
{{ [
|
||||
"The sun is up at Anchorage House, so Im turning off the outside lights. ",
|
||||
"I see the sun! Time to turn off the outside lights at Anchorage House. ",
|
||||
"Dawn has broken at Anchorage House. Turning off the outside lights.",
|
||||
"Anchorage house has converted to the lightside after a few hours on the darkside. I think its safe to turn off the lights.",
|
||||
"Light mode activated! So that means I'm turning off the outside lights."
|
||||
|
||||
] | random }}
|
||||
image: >-
|
||||
{{ [ "/config/www/tweet_images/sunrise.jpg",
|
||||
"/config/www/tweet_images/sunrise3.jpg",
|
||||
"/config/www/tweet_images/sunrise2.jpg"] | random }}
|
||||
|
||||
- id: inside_on_sunset
|
||||
alias: Inside on at Sunset
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunset
|
||||
offset: -01:00:00
|
||||
action:
|
||||
service: scene.turn_on
|
||||
entity_id: scene.normal_livingroom_lighting
|
||||
- id: inside_off_sunrise
|
||||
alias: Inside off at Sunrise
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunrise
|
||||
offset: 00:30:00
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.nws_current_condition
|
||||
state: "cloudy"
|
||||
action:
|
||||
- service: script.inside_all_off
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_light_off
|
||||
- id: ha_start
|
||||
alias: HA Startup
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
service: frontend.set_theme
|
||||
data:
|
||||
name: midnight-AH
|
||||
- id: jeff_eta_home
|
||||
alias: Jeff eta home
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.jeff_destination
|
||||
to: Home
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.notification_mode
|
||||
state: Normal
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.jeff_travel_monitor
|
||||
- id: enable_bad_traffic_home_jeff
|
||||
alias: Notify Jeff - Bad Traffic
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.jeff_ett_home
|
||||
above: 59
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.jeff_location
|
||||
state: Summit
|
||||
- condition: state
|
||||
entity_id: input_boolean.jeff_traffic_alerts
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.jeff_traffic_alert_home
|
||||
- service: script.twitter_notify_image
|
||||
data_template:
|
||||
tweet: >-
|
||||
{{ [
|
||||
"Looks like traffic is bad out there so I let @thejeffreystone know. ",
|
||||
"I dont think todays traffic is the worst I''ve seen, but its bad. Letting my residents know they need to plan their trips. ",
|
||||
"Oh great...traffic cannot get any worse. Maybe everyone should stay where they are. "
|
||||
] | random }}
|
||||
image: >-
|
||||
{{ [
|
||||
"/config/www/tweet_images/road.jpg",
|
||||
"/config/www/tweet_images/traffic.jpg",
|
||||
"/config/www/tweet_images/traffic-jam.jpg"
|
||||
] | random }}
|
||||
|
||||
|
||||
- id: set_coffee_time
|
||||
alias: set soffee time
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '00:02:15'
|
||||
action:
|
||||
- service: input_datetime.set_datetime
|
||||
entity_id: input_datetime.coffee_time
|
||||
data_template:
|
||||
time: >
|
||||
{% if states.binary_sensor.workday_sensor.state == 'on' %}
|
||||
06:00
|
||||
{% else %}
|
||||
07:15
|
||||
{% endif %}
|
||||
|
||||
- id: set_skylar_nightly_report_time
|
||||
alias: set skylar nightly report time
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '18:30:00'
|
||||
action:
|
||||
- service: input_datetime.set_datetime
|
||||
entity_id: input_datetime.skylar_nightly_report
|
||||
data_template:
|
||||
time: >
|
||||
{% if states.sensor.school_tomorrow.state == 'on' %}
|
||||
19:00
|
||||
{% else %}
|
||||
20:00
|
||||
{% endif %}
|
||||
|
||||
- id: set_good_morning_time
|
||||
alias: set good morning time
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '05:55:00'
|
||||
action:
|
||||
- service: input_datetime.set_datetime
|
||||
entity_id: input_datetime.good_morning
|
||||
data_template:
|
||||
time: >
|
||||
{% if states.calendar.skylar_school.attributes.offset_reached == True %}
|
||||
07:15
|
||||
{% elif states.binary_sensor.workday_sensor.state == 'on' %}
|
||||
07:15
|
||||
{% else %}
|
||||
07:25
|
||||
{% endif %}
|
|
@ -0,0 +1,44 @@
|
|||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 06/10/2020
|
||||
# @package : Database
|
||||
# @description : Recorder and Logger Configurations
|
||||
###############################################################################
|
||||
|
||||
recorder:
|
||||
db_url: !secret database
|
||||
purge_keep_days: 2
|
||||
exclude:
|
||||
domains:
|
||||
- automation
|
||||
- weblink
|
||||
- updater
|
||||
entities:
|
||||
- sun.sun # Don't record sun data
|
||||
- sensor.last_boot # Comes from 'systemmonitor' sensor platform
|
||||
- sensor.date
|
||||
|
||||
logbook:
|
||||
include:
|
||||
domains:
|
||||
- media_player
|
||||
- automation
|
||||
- script
|
||||
|
||||
# Lets try to make the logs less chatty and more fine tuned.
|
||||
logger:
|
||||
default: critical
|
||||
logs:
|
||||
homeassistant.core: warning
|
||||
homeassistant.components.recorder: error # to spot db issues
|
||||
homeassistant.config_entries: error
|
||||
homeassistant.setup: error
|
||||
|
||||
|
||||
history:
|
||||
include:
|
||||
domains:
|
||||
- sensor
|
||||
- switch
|
||||
- media_player
|
||||
- light
|
|
@ -407,18 +407,26 @@ automation:
|
|||
data_template:
|
||||
media: "http://192.168.7.40/audio/ML_Welcome_Show.mp3"
|
||||
volume: .5
|
||||
- id: welcome_show_off
|
||||
alias: Welcome Show Off
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.welcome_show
|
||||
to: 'off'
|
||||
action:
|
||||
- delay:
|
||||
minutes: 8
|
||||
- service: media_player.media_stop
|
||||
entity_id: media_player.ha_speaker
|
||||
- service: script.turn_off
|
||||
entity_id: script.youtube_audio
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.welcome_show
|
||||
# - id: welcome_show_off
|
||||
# alias: Welcome Show Off
|
||||
# initial_state: true
|
||||
# trigger:
|
||||
# - platform: state
|
||||
# entity_id: input_boolean.welcome_show
|
||||
# to: 'off'
|
||||
# action:
|
||||
# - service: media_player.media_stop
|
||||
# entity_id: media_player.ha_speaker
|
||||
# - service: script.turn_off
|
||||
# entity_id: script.youtube_audio
|
||||
|
||||
# MK Trolly Show
|
||||
- id: trolly_audio_show_on
|
||||
|
|
|
@ -32,6 +32,39 @@ input_datetime:
|
|||
has_time: true
|
||||
initial: '14:45:00'
|
||||
|
||||
input_number:
|
||||
skylar_ps_time:
|
||||
name: Skylar PS Time
|
||||
initial: 120
|
||||
min: 0
|
||||
max: 360
|
||||
step: 15
|
||||
icon: mdi:clock
|
||||
skylar_yt_time:
|
||||
name: Skylar YT Time
|
||||
initial: 60
|
||||
min: 0
|
||||
max: 360
|
||||
step: 15
|
||||
icon: mdi:youtube
|
||||
skylar_tv_time:
|
||||
name: Skylar TV Time
|
||||
initial: 120
|
||||
min: 0
|
||||
max: 360
|
||||
step: 15
|
||||
icon: mdi:television-box
|
||||
|
||||
input_select:
|
||||
skylar_activity:
|
||||
name: Skylar Activity
|
||||
options:
|
||||
- Restricted
|
||||
- Limited
|
||||
- Full
|
||||
initial: Full
|
||||
icon: mdi:human
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
|
@ -122,6 +155,38 @@ automation:
|
|||
data_template:
|
||||
version: "{{ states.binary_sensor.updater.attributes.newest_version }}"
|
||||
|
||||
# - id: set_skylar_activity_full
|
||||
# alias: Skylar Full Privileges
|
||||
# initial_state: true
|
||||
# trigger:
|
||||
# - platform: state
|
||||
# entity_id: input_select.skylar_activity
|
||||
# to: 'Full'
|
||||
# action:
|
||||
# - service: scene.turn_on
|
||||
# entity_id: scene.skylar_full
|
||||
|
||||
# - id: set_skylar_activity_limited
|
||||
# alias: Skylar Limited Privileges
|
||||
# initial_state: true
|
||||
# trigger:
|
||||
# - platform: state
|
||||
# entity_id: input_select.skylar_activity
|
||||
# to: 'Limited'
|
||||
# action:
|
||||
# - service: scene.turn_on
|
||||
# entity_id: scene.skylar_limited
|
||||
|
||||
# - id: set_skylar_activity_restricted
|
||||
# alias: Skylar Restricted Privileges
|
||||
# initial_state: true
|
||||
# trigger:
|
||||
# - platform: state
|
||||
# entity_id: input_select.skylar_activity
|
||||
# to: 'Restricted'
|
||||
# action:
|
||||
# - service: scene.turn_on
|
||||
# entity_id: scene.skylar_restricted
|
||||
|
||||
script:
|
||||
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 06/10/2020
|
||||
# @package : Integrations
|
||||
# @description : All the Integrations
|
||||
###############################################################################
|
||||
|
||||
# Google Calendar
|
||||
google:
|
||||
client_id: !secret google_client_id
|
||||
client_secret: !secret google_client_secret
|
||||
|
||||
# Using the HACS Arlo Integration
|
||||
aarlo:
|
||||
host: https://my.arlo.com
|
||||
username: !secret arlo_user
|
||||
password: !secret arlo_pass
|
||||
db_motion_time: 30
|
||||
db_ding_time: 10
|
||||
recent_time: 10
|
||||
last_format: '%m-%d %H:%M'
|
||||
refresh_devices_every: 2
|
||||
verbose_debug: True
|
||||
|
||||
# Testing internet speedtest
|
||||
speedtestdotnet:
|
||||
|
||||
# Life360 used for presence detection
|
||||
life360:
|
||||
accounts:
|
||||
- username: !secret life360_username
|
||||
password: !secret life360_password
|
||||
|
||||
# Ecobee Thermostat
|
||||
ecobee:
|
||||
api_key: !secret ecobee_api
|
||||
|
||||
|
||||
gdacs:
|
||||
categories:
|
||||
- Earthquake
|
||||
- Tropical Cyclone
|
||||
radius: 500
|
||||
latitude: !secret MY_LATITUDE
|
||||
longitude: !secret MY_LONGITUDE
|
||||
|
||||
# TPLink / KASA - Hardcoding the IP Address
|
||||
tplink:
|
||||
discovery: false
|
||||
switch:
|
||||
- host: 192.168.7.105
|
||||
- host: 192.168.7.107
|
||||
- host: 192.168.7.116
|
||||
- host: 192.168.7.120
|
||||
- host: 192.168.7.136
|
||||
- host: 192.168.7.137
|
||||
|
||||
# WZYE Devices - Using the HACS integration
|
||||
wyzeapi:
|
||||
username: !secret wyze_user
|
||||
password: !secret wyze_password
|
||||
|
||||
# IFTTT (May be removed - I dont think I am using this.)
|
||||
ifttt:
|
||||
key: !secret IFTTT_API_KEY
|
||||
|
||||
# Using the HACS Daily Snapshot Clean Up Plugin
|
||||
clean_up_snapshots_service:
|
||||
host: !secret snapshot_url
|
||||
token: !secret snapshot_token
|
||||
number_of_snapshots_to_keep: 3
|
||||
|
||||
# Hardcoding the Wemo switch
|
||||
wemo:
|
||||
discovery: true
|
||||
static:
|
||||
- 192.168.7.99
|
||||
|
||||
homekit:
|
||||
filter:
|
||||
include_domains:
|
||||
- light
|
||||
include_entities:
|
||||
- switch.croft_fan
|
||||
- switch.driveway_light_2
|
||||
- switch.incense
|
||||
- switch.livingroom_fan
|
||||
- switch.rail_lights
|
||||
- switch.croft_light
|
||||
- switch.ha_speaker
|
||||
- switch.artemis
|
||||
- switch.fireplace_lights_2
|
||||
- switch.desk
|
||||
- switch.forest
|
||||
- switch.front_porch_light
|
||||
- input_boolean.house_party_protocol
|
||||
- switch.christmas_tree
|
||||
- switch.rainbow_light
|
||||
- switch.garage_fan
|
|
@ -0,0 +1,61 @@
|
|||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 02/19/2019
|
||||
# @package : Maintnance
|
||||
# @description : Maint Automation that occurs every day
|
||||
###############################################################################
|
||||
automation:
|
||||
# Using the HACS Daily Snapshot Clean Up Plugin
|
||||
- id: daily_snapshot_clean_up
|
||||
alias: Daily snapshot clean up
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '03:00:00'
|
||||
action:
|
||||
- service: clean_up_snapshots_service.clean_up
|
||||
|
||||
# Morning Entity Refresh - For all those sensors that need a little push
|
||||
- id: daily_entity_refresh
|
||||
alias: Daily Entity Refresh
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '04:30:00'
|
||||
action:
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: sensor.today_is
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: sensor.holiday
|
||||
|
||||
# Nightly Entity Refresh - For all those sensors that need a little push
|
||||
- id: daily_entity_refresh2
|
||||
alias: Daily Entity Refresh2
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '17:00:00'
|
||||
action:
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: sensor.school_tomorrow
|
||||
|
||||
# startup auotmations to update some custom sensors due to new order of home assistant firing up
|
||||
- id: startup_automations
|
||||
alias: startup_automations
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: sensor.jeff_location
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: sensor.kat_location
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: sensor.skylar_location
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: sensor.today_is
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: sensor.holiday
|
||||
|
||||
|
|
@ -5,6 +5,28 @@
|
|||
# @description : A Collection of Presence Related Trackers and Sensors
|
||||
###############################################################################
|
||||
|
||||
# Testing Proximity Sensors
|
||||
proximity:
|
||||
home_jeff:
|
||||
devices:
|
||||
- device_tracker.life360_jeffrey_stone
|
||||
zone: home
|
||||
tolerance: 5
|
||||
unit_of_measurement: mi
|
||||
home_kat:
|
||||
devices:
|
||||
- device_tracker.life360_kat_stone
|
||||
zone: home
|
||||
tolerance: 5
|
||||
unit_of_measurement: mi
|
||||
home:
|
||||
devices:
|
||||
- device_tracker.life360_jeffrey_stone
|
||||
- device_tracker.life360_kat_stone
|
||||
zone: home
|
||||
tolerance: 5
|
||||
unit_of_measurement: mi
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
|
@ -431,6 +453,43 @@ automation:
|
|||
entity_id: input_boolean.guest_mode
|
||||
initial_state: true
|
||||
|
||||
|
||||
- id: disable_bad_traffic_home_jeff
|
||||
alias: Disabling Jeff Bad Traffic Home
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.jeff_ett_home
|
||||
below: 40
|
||||
- platform: state
|
||||
entity_id: sensor.jeff_destination
|
||||
to: Home
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.jeff_traffic_alert_home
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.jeff_traffic_alert_home
|
||||
|
||||
- id: '1550107919204'
|
||||
alias: Family Is Home Webhook
|
||||
trigger:
|
||||
- platform: webhook
|
||||
webhook_id: home_webhook
|
||||
condition: []
|
||||
action:
|
||||
- service: script.family_is_home
|
||||
|
||||
- id: '1550108034209'
|
||||
alias: Family Is Away Webhook
|
||||
trigger:
|
||||
- platform: webhook
|
||||
webhook_id: away_webhook
|
||||
condition: []
|
||||
action:
|
||||
- service: script.family_is_away
|
||||
|
||||
script:
|
||||
jeff_destination_zoo:
|
||||
sequence:
|
||||
|
|
|
@ -34,6 +34,17 @@ automation:
|
|||
action:
|
||||
- service: script.heartworm_on
|
||||
|
||||
- id: '1562630916597'
|
||||
alias: Kat Pill Reminder
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.kat_pill_reminder', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
action:
|
||||
- data:
|
||||
message: Remember to take meds
|
||||
service: notify.kat_ios
|
||||
|
||||
|
||||
script:
|
||||
# Check to see if heartworm is the reminder in the cal
|
||||
|
|
|
@ -35,7 +35,13 @@ input_boolean:
|
|||
icon: mdi:dog-side
|
||||
|
||||
|
||||
#sensor:
|
||||
alarm_control_panel:
|
||||
# - platform: arlo
|
||||
# home_mode_name: home
|
||||
# away_mode_name: armed
|
||||
- platform: aarlo
|
||||
home_mode_name: home
|
||||
away_mode_name: Armed
|
||||
|
||||
|
||||
automation:
|
||||
|
@ -207,8 +213,11 @@ automation:
|
|||
entity_id: input_boolean.audible_notifications
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.front_door_contact
|
||||
entity_id: binary_sensor.front_door
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.sentry_mode
|
||||
state: 'on'
|
||||
action:
|
||||
- service: script.ah_report
|
||||
data_template:
|
||||
|
@ -256,7 +265,6 @@ automation:
|
|||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.front_door
|
||||
- binary_sensor.laundry_door
|
||||
- binary_sensor.back_door
|
||||
- binary_sensor.side_door
|
||||
- binary_sensor.garage_door
|
||||
|
@ -333,7 +341,7 @@ automation:
|
|||
] | random }}
|
||||
- service: script.text_notify
|
||||
data_template:
|
||||
who: "jeff"
|
||||
who: "parents"
|
||||
title: "Security Armed"
|
||||
message: "Security System has been armed."
|
||||
|
||||
|
@ -358,7 +366,7 @@ automation:
|
|||
] | random }}
|
||||
- service: script.text_notify
|
||||
data_template:
|
||||
who: "jeff"
|
||||
who: "parents"
|
||||
title: "Security Disarmed"
|
||||
message: "Security System as been disarmed."
|
||||
|
||||
|
@ -567,6 +575,33 @@ automation:
|
|||
{%- endmacro -%}
|
||||
{{issue_report(location)}}
|
||||
|
||||
- id: '1558630577206'
|
||||
alias: Garage Is Open at 9pm
|
||||
initial_state: true
|
||||
trigger:
|
||||
- at: '21:00:00'
|
||||
platform: time
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.garage_door_contact
|
||||
state: 'on'
|
||||
action:
|
||||
- data:
|
||||
entity_id: input_boolean.garage_after_dark
|
||||
service: input_boolean.turn_on
|
||||
- id: '1559612300685'
|
||||
alias: Garage Closed
|
||||
initial_state: true
|
||||
trigger:
|
||||
- entity_id: binary_sensor.garage_door_contact
|
||||
from: 'on'
|
||||
platform: state
|
||||
to: 'off'
|
||||
condition: []
|
||||
action:
|
||||
- data:
|
||||
entity_id: input_boolean.garage_after_dark
|
||||
service: input_boolean.turn_off
|
||||
|
||||
script:
|
||||
lockdown_issue:
|
||||
|
|
|
@ -237,4 +237,31 @@ automation:
|
|||
] | random }}
|
||||
{{ states.sensor.mail_usps_mail.state }} pieces of mail today.
|
||||
{%- endif -%}
|
||||
call_interuption: 1
|
||||
|
||||
- alias: "Delivered Package Notification"
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.mail_fedex_delivered_2
|
||||
- platform: state
|
||||
entity_id: sensor.mail_ups_delivered
|
||||
#send only if mail or packages are more than 0
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ states('sensor.mail_fedex_delivered_2') | int > 0 }}"
|
||||
- condition: template
|
||||
value_template: "{{ states('sensor.mail_ups_delivered') | int > 0 }}"
|
||||
action:
|
||||
- service: script.text_notify
|
||||
data_template:
|
||||
who: "jeff"
|
||||
title: "Package Delivered"
|
||||
message: "Fedex/UPS just made a delivery"
|
||||
- service: script.ah_report
|
||||
data_template:
|
||||
usps: >-
|
||||
A package was just left on the porch.
|
||||
call_interuption: 1
|
|
@ -0,0 +1,515 @@
|
|||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 02/19/2019
|
||||
# @package : Weather
|
||||
# @description : Weather and NWS Alerts
|
||||
# @original : https://github.com/Vasiley/Home-Assistant-Main/blob/master/packages/weather_alerts_nws.yaml
|
||||
###############################################################################
|
||||
|
||||
homeassistant:
|
||||
customize:
|
||||
package.node_anchors:
|
||||
customize: &customize
|
||||
package: 'weather_alerts'
|
||||
sensor.nws_alert_count:
|
||||
friendly_name: Alerts
|
||||
icon: mdi:alert-outline
|
||||
|
||||
weather:
|
||||
# REMOVING darksky integration since API is EOL in 18 months. Migrated to NWS
|
||||
# - platform: darksky
|
||||
# api_key: !secret darksky_api
|
||||
# - platform: nws
|
||||
# api_key: !secret nws_api_key
|
||||
# station: klzu
|
||||
|
||||
group:
|
||||
alerts_card:
|
||||
name: Alerts
|
||||
entities:
|
||||
- sensor.nws_alerts
|
||||
|
||||
input_boolean:
|
||||
freeze_warning:
|
||||
name: Freeze Warning
|
||||
icon: mdi:snowflake-alert
|
||||
weather_alert_texts:
|
||||
name: Weather Alert Texts
|
||||
icon: mdi:telegram
|
||||
# lightning_warning:
|
||||
# name: Lightning Warning
|
||||
# icon: mdi:flash-alert
|
||||
|
||||
### You first need to find either your NWS Zone ID or County ID. I’m not sure which is better but I used my Zone ID here.
|
||||
### You can find your Zone ID by going to https://alerts.weather.gov/ 7, scroll down to your state and click on the “zone list” then look for the entry for your county.
|
||||
### I recommond useing both
|
||||
|
||||
#I’ve taken much of the underlying work here and created a custom component for nws alerts sensor.
|
||||
#The sensor can be created by adding the nws_alerts.py file to <config_directory>/custom_components/sensor/ and adding the following to your sensor definitions:
|
||||
|
||||
sensor:
|
||||
- platform: nws_alerts
|
||||
zone_id: 'GAZ034,GAC135'
|
||||
|
||||
- platform: template
|
||||
sensors:
|
||||
flood_watch:
|
||||
friendly_name: 'Flood Watch'
|
||||
entity_id: sensor.time
|
||||
value_template: >-
|
||||
{% if 'Flood Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[0] or
|
||||
'Flood Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[1] or
|
||||
'Flood Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[2] or
|
||||
'Flood Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[3] or
|
||||
'Flood Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[4] or
|
||||
'Flood Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[5]
|
||||
%}
|
||||
{{ states.sensor.nws_alerts.attributes.spoken_desc }}
|
||||
{% else %}
|
||||
inactive
|
||||
{% endif %}
|
||||
flood_warning:
|
||||
friendly_name: 'Flood Warning'
|
||||
entity_id: sensor.time
|
||||
value_template: >-
|
||||
{% if 'Flood Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[0] or
|
||||
'Flood Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[1] or
|
||||
'Flood Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[2] or
|
||||
'Flood Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[3] or
|
||||
'Flood Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[4] or
|
||||
'Flood Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[5]
|
||||
%}
|
||||
{{ states.sensor.nws_alerts.attributes.spoken_desc }}
|
||||
{% else %}
|
||||
inactive
|
||||
{% endif %}
|
||||
tstorm_warning:
|
||||
friendly_name: 'Thunderstorm Warning'
|
||||
entity_id: sensor.time
|
||||
value_template: >-
|
||||
{% if 'Thunderstorm Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[0] or
|
||||
'Thunderstorm Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[1] or
|
||||
'Thunderstorm Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[2] or
|
||||
'Thunderstorm Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[3] or
|
||||
'Thunderstorm Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[4] or
|
||||
'Thunderstorm Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[5]
|
||||
%}
|
||||
{{ states.sensor.nws_alerts.attributes.spoken_desc }}
|
||||
{% else %}
|
||||
inactive
|
||||
{% endif %}
|
||||
tstorm_watch:
|
||||
friendly_name: 'Thunderstorm Watch'
|
||||
entity_id: sensor.time
|
||||
value_template: >-
|
||||
{% if 'Thunderstorm Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[0] or
|
||||
'Thunderstorm Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[1] or
|
||||
'Thunderstorm Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[2] or
|
||||
'Thunderstorm Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[3] or
|
||||
'Thunderstorm Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[4] or
|
||||
'Thunderstorm Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[5]
|
||||
%}
|
||||
{{ states.sensor.nws_alerts.attributes.spoken_desc }}
|
||||
{% else %}
|
||||
inactive
|
||||
{% endif %}
|
||||
tornado_watch:
|
||||
friendly_name: 'Tornado Watch'
|
||||
entity_id: sensor.time
|
||||
value_template: >-
|
||||
{% if 'Tornado Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[0] or
|
||||
'Tornado Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[1] or
|
||||
'Tornado Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[2] or
|
||||
'Tornado Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[3] or
|
||||
'Tornado Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[4] or
|
||||
'Tornado Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[5]
|
||||
%}
|
||||
{{ states.sensor.nws_alerts.attributes.spoken_desc }}
|
||||
{% else %}
|
||||
inactive
|
||||
{% endif %}
|
||||
tornado_warning:
|
||||
friendly_name: 'Tornado Warning'
|
||||
entity_id: sensor.time
|
||||
value_template: >-
|
||||
{% if 'Tornado Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[0] or
|
||||
'Tornado Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[1] or
|
||||
'Tornado Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[2] or
|
||||
'Tornado Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[3] or
|
||||
'Tornado Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[4] or
|
||||
'Tornado Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[5]
|
||||
%}
|
||||
{{ states.sensor.nws_alerts.attributes.spoken_desc }}
|
||||
{% else %}
|
||||
inactive
|
||||
{% endif %}
|
||||
|
||||
automation:
|
||||
- alias: 'NWS Weather Alert Pop Up Control'
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.nws_alerts
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: '{{states.sensor.nws_alerts.state | int > 0}}'
|
||||
- condition: template
|
||||
value_template: '{{ trigger.to_state.state|float > trigger.from_state.state|float }}'
|
||||
action:
|
||||
service: script.nws_popup_on_wx_alert
|
||||
data_template:
|
||||
title: >
|
||||
{% if states.sensor.nws_alerts.attributes.title.split(' - ')[5] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.title.split(' - ')[5] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.title.split(' - ')[4] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.title.split(' - ')[4] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.title.split(' - ')[3] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.title.split(' - ')[3] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.title.split(' - ')[2] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.title.split(' - ')[2] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.title.split(' - ')[1] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.title.split(' - ')[1] }}"
|
||||
{% else %}
|
||||
"{{ states.sensor.nws_alerts.attributes.title.split(' - ')[0] }}"
|
||||
{% endif %}
|
||||
message: >
|
||||
{% if states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[5] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[5] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[4] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[4] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[3] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[3] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[2] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[2] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[1] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[1] }}"
|
||||
{% else %}
|
||||
"{{ states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[0] }}"
|
||||
{% endif %}
|
||||
|
||||
- alias: 'NWS Weather Sensor Refresh'
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.nws_alerts
|
||||
action:
|
||||
- service: script.refresh_weather_alert_sensors
|
||||
|
||||
- alias: NWS Notification Weather Alert
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.nws_alerts
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: '{{states.sensor.nws_alerts.state | int > 0}}'
|
||||
- condition: template
|
||||
value_template: '{{ trigger.to_state.state|float > trigger.from_state.state|float }}'
|
||||
- condition: state
|
||||
entity_id: input_boolean.weather_alert_texts
|
||||
state: 'on'
|
||||
action:
|
||||
- service: script.text_notify
|
||||
data_template:
|
||||
title: "Weather Alert for Anchorage House"
|
||||
message: >
|
||||
{% if states.sensor.nws_alerts.attributes.title.split(' - ')[5] is defined %}
|
||||
"NWS: {{ states.sensor.nws_alerts.attributes.title.split(' - ')[5] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.title.split(' - ')[4] is defined %}
|
||||
"NWS: {{ states.sensor.nws_alerts.attributes.title.split(' - ')[4] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.title.split(' - ')[3] is defined %}
|
||||
"NWS: {{ states.sensor.nws_alerts.attributes.title.split(' - ')[3] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.title.split(' - ')[2] is defined %}
|
||||
"NWS: {{ states.sensor.nws_alerts.attributes.title.split(' - ')[2] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.title.split(' - ')[1] is defined %}
|
||||
"NWS: {{ states.sensor.nws_alerts.attributes.title.split(' - ')[1] }}"
|
||||
{% else %}
|
||||
"NWS: {{ states.sensor.nws_alerts.attributes.title.split(' - ')[0] }}"
|
||||
{% endif %}
|
||||
|
||||
- alias: NWS Announce Weather Alert
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.nws_alerts
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{states.sensor.nws_alerts.state | int > 0}}"
|
||||
- condition: template
|
||||
value_template: '{{ trigger.to_state.state|float > trigger.from_state.state|float }}'
|
||||
- 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
|
||||
data_template:
|
||||
speech_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 %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[4] }}
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[3] is defined %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[3] }}
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[2] is defined %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[2] }}
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[1] is defined %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[1] }}
|
||||
{% else %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[0] }}
|
||||
{% 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 }}'
|
||||
image: >-
|
||||
{{ [ "/config/www/tweet_images/lightning.jpg",
|
||||
"/config/www/tweet_images/lightning-bolt.jpg"] | random }}
|
||||
- delay: '00:00:15'
|
||||
- service: script.ah_report
|
||||
data_template:
|
||||
speech_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 %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[4] }}
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[3] is defined %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[3] }}
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[2] is defined %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[2] }}
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[1] is defined %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[1] }}
|
||||
{% else %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[0] }}
|
||||
{% endif %}
|
||||
|
||||
- alias: NWS Announce Weather Alert for Tornado
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.nws_alerts
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{states.sensor.nws_alerts.state | int > 0}}"
|
||||
- condition: template
|
||||
value_template: "{{ 'Tornado Warning' in states.sensor.nws_alerts.attributes.title}}"
|
||||
action:
|
||||
- service: script.jarvis_alert
|
||||
data_template:
|
||||
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 }}'
|
||||
image: >-
|
||||
"/config/www/tweet_images/tornado.jpg"
|
||||
- delay: '00:00:15'
|
||||
- service: script.jarvis_alert
|
||||
data_template:
|
||||
message: "Attention!,,,Attention!,,,The National Weather Service Has issued a Tornado Warning for our area."
|
||||
- delay: '00:00:15'
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.tornado_alarm
|
||||
- service: script.text_alert
|
||||
data_template:
|
||||
title: "Tornado Warning!"
|
||||
message: "The National Weather Service Has issued a Tornado Warning for our area."
|
||||
|
||||
# - alias: Lightning Detected
|
||||
# initial_state: 'on'
|
||||
# trigger:
|
||||
# - platform: state
|
||||
# entity_id: binary_sensor.lightning_active
|
||||
# to: 'on'
|
||||
# action:
|
||||
# - service: script.text_notify
|
||||
# data_template:
|
||||
# who: "jeff"
|
||||
# title: "Lightning Detected!"
|
||||
# message: "Lightning has been detected within 15 miles of Anchorage House"
|
||||
# - service: script.lightning_warning_audible
|
||||
|
||||
# - alias: Lightning Warning Off
|
||||
# initial_state: 'on'
|
||||
# trigger:
|
||||
# - platform: state
|
||||
# entity_id: binary_sensor.lightning_active
|
||||
# to: 'off'
|
||||
# action:
|
||||
# - service: script.text_notify
|
||||
# data_template:
|
||||
# who: "jeff"
|
||||
# title: "Lightning Threat Over."
|
||||
# message: "No more Lightning Strikes detected."
|
||||
# - service: script.lightning_clear_audible
|
||||
|
||||
# - alias: 'lightning_update'
|
||||
# initial_state: 'on'
|
||||
# trigger:
|
||||
# - platform: time_pattern
|
||||
# minutes: '/5'
|
||||
# action:
|
||||
# - service: homeassistant.update_entity
|
||||
# entity_id: sensor.lightning_strike_count
|
||||
# - service: homeassistant.update_entity
|
||||
# entity_id: binary_sensor.lightning_active
|
||||
|
||||
- alias: NWS Freeze Warning
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.nws_alerts
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{states.sensor.nws_alerts.state | int > 0}}"
|
||||
- condition: template
|
||||
value_template: "{{ 'Freeze Warning' in states.sensor.nws_alerts.attributes.title}}"
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.freeze_warning
|
||||
|
||||
- alias: Forecast Low Near Freezing
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.nws_overnight_low
|
||||
below: 35
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.nws_current_temperature
|
||||
below: 35
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.freeze_warning
|
||||
state: 'off'
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.freeze_warning
|
||||
|
||||
- alias: Forecast Low Above Freezing
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.nws_overnight_low
|
||||
above: 33
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.freeze_warning
|
||||
state: 'on'
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.nws_overnight_low
|
||||
above: 35
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.freeze_warning
|
||||
|
||||
- alias: Activate Tornado alarm
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.tornado_alarm
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
action:
|
||||
- service: script.turn_on
|
||||
entity_id: script.tornado_alarm
|
||||
|
||||
- alias: Deactivate Tornado alarm
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.tornado_alarm
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
action:
|
||||
- service: script.turn_off
|
||||
entity_id: script.tornado_alarm
|
||||
- service: media_player.media_stop
|
||||
entity_id: media_player.ha_speaker
|
||||
|
||||
|
||||
script:
|
||||
nws_popup_on_wx_alert:
|
||||
alias: NWS Weather Alert Pop Up
|
||||
sequence:
|
||||
## Dismiss any current alert so the UI isn't filled
|
||||
## up with these if there are more then one.
|
||||
## Only show the latest alert
|
||||
- service: persistent_notification.dismiss
|
||||
data:
|
||||
notification_id: "nwswxalert"
|
||||
## Create a new persistant notification in the UI for a new alert
|
||||
- service_template: >
|
||||
{% if states.sensor.nws_alerts.state != '0' %}
|
||||
persistent_notification.create
|
||||
{% endif %}
|
||||
data_template:
|
||||
notification_id: "nwswxalert"
|
||||
message: "{{ message }}"
|
||||
title: '{{ title }}'
|
||||
|
||||
tornado_alarm:
|
||||
sequence:
|
||||
- delay:
|
||||
seconds: 15
|
||||
- service: media_player.play_media
|
||||
entity_id: media_player.ha_speaker
|
||||
data:
|
||||
media_content_id: http://192.168.7.40/audio/tornado_alarm.mp3
|
||||
media_content_type: "music"
|
||||
- delay:
|
||||
seconds: 110
|
||||
- service: media_player.play_media
|
||||
entity_id: media_player.ha_speaker
|
||||
data:
|
||||
media_content_id: http://192.168.7.40/audio/tornado_alarm.mp3
|
||||
media_content_type: "music"
|
||||
|
||||
# lighning_warning_audible:
|
||||
# sequence:
|
||||
# - condition: state
|
||||
# entity_id: binary_sensor.day
|
||||
# state: 'on'
|
||||
# - service: script.twitter_notify_image
|
||||
# data_template:
|
||||
# tweet: '{{ [ "Did you see that flash? I did. Letting everyone know there is lightning nearby.",
|
||||
# "When Lightning is near I notify the residents of Anchorage House to keep them safe.",
|
||||
# "If the residents of Anchorage House didnt hear the thunder I just gave them a heads up.",
|
||||
# "Everyone inside! If you are near Anchorage House that is. Lightning is near." ] | random }}'
|
||||
# image: >-
|
||||
# {{ [ "/config/www/tweet_images/lightning.jpg",
|
||||
# "/config/www/tweet_images/lightning-bolt.jpg"] | random }}
|
||||
# - service: script.ah_report
|
||||
# data:
|
||||
# call_interuption: 1
|
||||
# call_lightning_alert: 1
|
||||
|
||||
# lighning_clear_audible:
|
||||
# sequence:
|
||||
# - condition: state
|
||||
# entity_id: binary_sensor.day
|
||||
# state: 'on'
|
||||
# - service: script.ah_report
|
||||
# data:
|
||||
# call_interuption: 1
|
||||
# call_lightning_clear: 1
|
||||
|
||||
refresh_weather_alert_sensors:
|
||||
sequence:
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: sensor.tornado_warning
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: sensor.tornado_watch
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: sensor.tstorm_warning
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: sensor.tstorm_watch
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: sensor.flood_warning
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: sensor.flood_watch
|
|
@ -65,4 +65,50 @@ kitchen_lights_night:
|
|||
minutes: 18
|
||||
- service: light.turn_off
|
||||
entity_id: light.kitchen_cabinets
|
||||
|
||||
|
||||
theater_lights_out:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: media_player.home_theater
|
||||
state: 'idle'
|
||||
- delay:
|
||||
minutes: 30
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.theater_dark
|
||||
|
||||
theater_lights_down:
|
||||
sequence:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.theater_dim
|
||||
- delay:
|
||||
minutes: 1
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.theater_dark
|
||||
|
||||
theater_lights_up_check:
|
||||
sequence:
|
||||
- delay:
|
||||
seconds: 20
|
||||
- service: script.turn_on
|
||||
entity_id: script.theater_lights_up
|
||||
|
||||
theater_lights_up:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: media_player.home_theater
|
||||
state: 'idle'
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.theater_dim
|
||||
- delay:
|
||||
minutes: 1
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.theater_bright
|
||||
- delay:
|
||||
minutes: 5
|
||||
- service: script.turn_on
|
||||
entity_id: script.theater_lights_out
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue