Reorginizing packages...

This commit is contained in:
Jeffrey Stone 2020-11-07 11:20:26 -05:00
parent 7cc6b7d9d5
commit a2c75ab131
13 changed files with 318 additions and 161 deletions

View File

@ -7,6 +7,7 @@ Family:
- person.jeffrey
- person.katherine
House Conditions:
- climate.first_floor
- sensor.accurite_back_porch_temperature

View File

@ -114,6 +114,21 @@ automation:
script:
appliances_on:
sequence:
- service: switch.turn_on
data:
entity_id: switch.box_fans
appliances_off:
sequence:
- data:
entity_id: switch.incense
service: switch.turn_off
- data:
entity_id: switch.artemis
service: switch.turn_off
washer_finished_notification_audible:
sequence:
- delay:

View File

@ -13,9 +13,9 @@
# but if not you may need to modify the following section.
# For more info on Media Players visit https://www.home-assistant.io/integrations/media_player/
# MODIFY this section as needed or comment it out completely if not needed.
media_player:
- platform: yamaha
host: 192.168.7.152
# media_player:
# - platform: yamaha
# host: 192.168.7.152
################################
# Media extractor is used for playing youtube audio. For more info ->https://www.home-assistant.io/integrations/media_extractor/

View File

@ -69,6 +69,20 @@ automation:
entity_id: scene.skylar_room_prebed
- id: master_bedroom_lights_dim
alias: Master Bedroom lights dim
initial_state: true
trigger:
- platform: time
at: '22:30:00'
condition:
- condition: state
entity_id: input_boolean.vacation_mode
state: 'off'
action:
- service: scene.turn_on
entity_id: scene.master_bedroom_dim
- id: master_bedroom_lights_out
alias: Master Bedroom lights out
initial_state: true
@ -83,20 +97,6 @@ automation:
- service: scene.turn_on
entity_id: scene.master_bedroom_off
- id: master_bedroom_lights_out
alias: Master Bedroom lights out
initial_state: true
trigger:
- platform: time
at: '22:30:00'
condition:
- condition: state
entity_id: input_boolean.vacation_mode
state: 'off'
action:
- service: scene.turn_on
entity_id: scene.master_bedroom_dim
- id: master_bedroom_lights_on
alias: Master Bedroom Lights On
initial_state: true
@ -406,3 +406,11 @@ automation:
{% else %}
07:30
{% endif %}
script:
sunset_garage_open:
sequence:
- condition: state
entity_id: group.garage_doors
state: 'on'
- service: script.driveway_all_on

View File

@ -73,7 +73,7 @@ automation:
- condition: template
value_template: >
{%- set event=states.calendar.holidays_in_united_states.attributes.message %}
{%- if event == 'Halloween' %}
{%- if event == 'Halloween' and states.calendar.holidays_in_united_states.state == 'on'%}
true
{%- endif -%}
# If all conditions are true, then lets turn this thing on.

View File

@ -58,7 +58,7 @@ automation:
{{ [ "Looks like it is bright enough now, so I am turning off the inside lights.",
"It is now bright enough to turn off the inside lights, so thats what I did. Just now. ",
"There is enough natural light, so I am turning off the inside lights.",
""
"Thanks to #homeassistant and an Aqara Sensor I know it is bright enought to turn off the inside lights."
] | random }}
@ -66,6 +66,71 @@ automation:
script:
inside_all_off:
sequence:
- data:
entity_id: light.tower_lamp_4
service: light.turn_off
- data:
entity_id: light.living_room_lamp
service: light.turn_off
- data:
entity_id: light.front_door_lamp
service: light.turn_off
- data:
entity_id: light.kitchen_cabinets
service: light.turn_off
- data:
entity_id: light.kitchen_cabinet_lights
service: light.turn_off
- entity_id: switch.fireplace_lights
service: switch.turn_off
- entity_id: switch.upstairs
service: switch.turn_off
- entity_id: light.jeff_lamp
service: light.turn_off
inside_all_on:
sequence:
- service: scene.turn_on
entity_id: scene.normal_livingroom_lighting
- service: scene.turn_on
entity_id: scene.normal_kitchen_lighting
- service: switch.turn_on
entity_id: switch.fireplace_lights
- service: switch.turn_on
entity_id: switch.croft_light
- service: switch.turn_on
entity_id: switch.rail_lights
- service: scene.turn_on
entity_id: scene.jeff_light_on
driveway_on:
sequence:
- condition: state
entity_id: sun.sun
state: below_horizon
- data:
entity_id: switch.driveway_light
service: switch.turn_on
- data:
entity_id: light.side_door_light
service: light.turn_on
driveway_off:
sequence:
- delay:
seconds: 120
- condition: state
entity_id: binary_sensor.side_door
state: 'off'
- condition: state
entity_id: binary_sensor.garage_door
state: 'off'
- service: switch.turn_off
entity_id: switch.driveway_light
- service: light.turn_off
entity_id: light.side_door_light
# Turn on Living Room Lights if sun is down or cloud coverage is above 70%
livingroom_lamps_on:

View File

@ -315,7 +315,7 @@ script:
{% elif who == 'croft' %}
.50
{% elif who == 'master_bedroom' %}
.99
.50
{% elif who == 'studio' %}
.30
{% elif who == 'all_google' %}
@ -817,7 +817,7 @@ script:
'I will be going as HAL 9000. The Pod Bay Doors are being installed today. I <emphasis>dare</emphasis> you to ask me to open them. '
] | random }}
{% elif states.sensor.halloween_countdown.state | int < 30 %}
There are only {{states.sensor.holiday_halloween.state}} days
There are only {{states.sensor.halloween_countdown.state}} days
{{ [ 'until Halloween.',
'until Halloween. It might not be enough time. ',
'and counting until the best holiday ever.',

View File

@ -274,63 +274,30 @@ automation:
entity_id: input_boolean.skylar_school
initial_state: true
- id: test_family_has_arrived
alias: Test Family Has arrived
trigger:
- entity_id: group.family
from: not_home
platform: state
to: home
action:
- service: script.text_notify
data_template:
who: "jeff"
title: "Family has arrived"
message: "Someone in the Family has arrived"
- id: test_family_has_left
alias: Test Family Has left
trigger:
- entity_id: group.family
from: home
platform: state
to: not_home
action:
- service: script.text_notify
data_template:
who: "jeff"
title: "Family has left"
message: "Everyone in the Family has left"
#########################################################
- id: family_has_arrived
alias: Family Has arrived
trigger:
- platform: webhook
webhook_id: home_webhook
- entity_id: sensor.family_status
from: Away
platform: state
to: Home
- entity_id: person.jeffrey
event: enter
platform: zone
zone: zone.home
- entity_id: person.katherine
event: enter
platform: zone
zone: zone.home
- entity_id: group.family
from: not_home
platform: state
to: home
- entity_id: device_tracker.mal
from: not_home
platform: state
to: home
mode: single
condition:
- condition: state
entity_id: sensor.family_status
state: Away
action:
- service: script.vacation_canceled
- service: script.appliances_on
- service: script.standby
- service: script.washer_finished_notification_audible
- service: alarm_control_panel.aarlo_set_mode
data:
entity_id: alarm_control_panel.aarlo_ah_base_station
mode: 'home'
- service: script.family_is_home
initial_state: true
@ -342,23 +309,21 @@ automation:
from: Home
platform: state
to: Away
- platform: webhook
webhook_id: away_webhook
- entity_id: group.family
from: home
platform: state
to: not_home
mode: single
condition:
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
action:
- service: script.appliances_off
- service: scene.turn_on
entity_id: scene.lights_out
- service: script.security_check_garage
- service: script.security_check_zones
- service: script.lockdown
- service: script.lockdown_issue
- service: script.all_fans_off
- service: alarm_control_panel.aarlo_set_mode
data:
entity_id: alarm_control_panel.aarlo_ah_base_station
mode: 'Armed'
- service: script.family_is_away
#########################################################
- id: jeff_is_home
alias: Jeff is Home
@ -368,12 +333,15 @@ automation:
event: enter
platform: zone
zone: zone.home
mode: single
action:
- service: script.family_is_home
- service: script.jeff_destination_na
- service: script.driveway_on
- entity_id: input_boolean.jeff_travel_monitor
service: input_boolean.turn_off
- delay:
minutes: 2
- id: jeff_arrives_summit
alias: Jeff Arrives At Summit
@ -420,11 +388,14 @@ automation:
event: enter
platform: zone
zone: zone.home
mode: single
action:
- service: script.family_is_home
- service: script.driveway_on
- service: input_boolean.turn_off
entity_id: input_boolean.kat_travel_monitor
- delay:
minutes: 2
- id: welcome_home
alias: Welcome Home
@ -505,25 +476,68 @@ automation:
- 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: '1550107919204'
# alias: Family Is Home
# trigger:
# - platform: webhook
# webhook_id: home_webhook
# - entity_id: group.family
# from: not_home
# platform: state
# to: home
# condition: []
# action:
# - service: script.family_is_home
# - id: '1550108034209'
# alias: Family Is Away
# trigger:
# - platform: webhook
# webhook_id: away_webhook
# - entity_id: group.family
# from: home
# platform: state
# to: not_home
# condition: []
# action:
# - service: script.family_is_away
- id: '1550108034209'
alias: Family Is Away Webhook
trigger:
- platform: webhook
webhook_id: away_webhook
condition: []
action:
- service: script.family_is_away
script:
family_is_home:
sequence:
- condition: state
entity_id: sensor.family_status
state: Away
- service: script.standby
- service: script.washer_finished_notification_audible
- service: mqtt.publish
data:
topic: house/family/status
payload_template: Home
retain: true
family_is_away:
sequence:
- condition: state
entity_id: sensor.family_status
state: Home
- service: script.appliances_off
- service: scene.turn_on
entity_id: scene.lights_out
- service: script.security_check_garage
- service: script.security_check_zones
- service: script.lockdown
- service: script.lockdown_issue
- service: scene.turn_on
entity_id: scene.all_fans_off
- service: mqtt.publish
data:
topic: house/family/status
payload_template: Away
retain: true
jeff_destination_zoo:
sequence:
- service: mqtt.publish

View File

@ -213,6 +213,7 @@ automation:
- binary_sensor.aarlo_motion_driveway
from: 'off'
to: 'on'
mode: single
condition:
- condition: state
entity_id: input_boolean.audible_notifications
@ -236,6 +237,8 @@ automation:
] | random }}
{{ trigger.to_state.attributes.friendly_name }}.
call_snark_door_motion: 1
- delay:
minutes: 2
initial_state: true
- id: garage_opened_night
@ -320,10 +323,10 @@ automation:
entity_id: script.security_response
- service: media_player.media_stop
entity_id: media_player.ha_speaker
- service: input_boolean.turn_off
entity_id: input_boolean.security_alarm
- service: scene.turn_on
entity_id: scene.lr_red
- service: script.livingroom_lamps_on
- service: script.livingroom_lamps_off
entity_id: scene.normal_livingroom_lighting
- id: sentry_mode_enabled
alias: Sentry Mode Enabled Annoucement
@ -683,20 +686,30 @@ script:
state: "off"
- service: input_boolean.turn_on
entity_id: input_boolean.sentry_mode
- service: alarm_control_panel.aarlo_set_mode
data:
entity_id: alarm_control_panel.aarlo_ah_base_station
mode: 'Armed'
standby:
sequence:
- condition: state
entity_id: input_boolean.vacation_mode
state: 'off'
- service: input_boolean.turn_off
entity_id: input_boolean.sentry_mode
- service: input_boolean.turn_off
entity_id: input_boolean.security_issue
- service: script.vacation_canceled
- service: script.disarm_security
- service: input_boolean.turn_off
entity_id: input_boolean.lockdown_issue
- service: alarm_control_panel.aarlo_set_mode
data:
entity_id: alarm_control_panel.aarlo_ah_base_station
mode: 'home'
disarm_security:
sequence:
- condition: state
entity_id: input_boolean.sentry_mode
state: 'on'
- service: input_boolean.turn_off
entity_id: input_boolean.security_alarm
entity_id: input_boolean.sentry_mode
visitors_here:
sequence:
@ -727,6 +740,9 @@ script:
vacation_canceled:
sequence:
- condition: state
entity_id: input_boolean.vacation_mode
state: 'on'
- data:
entity_id: input_boolean.vacation_mode
service: input_boolean.turn_off

View File

@ -27,29 +27,30 @@ sensor:
- platform: moon
- platform: launch_library
- platform: rest
scan_interval: 1800
resource: https://launchlibrary.net/1.2.2/launch/next/10
# resource: https://raw.githubusercontent.com/cribbstechnologies/ha_config/master/www/test_launch.json
name: launch window
# if the current timestamp is in the launch window
# this sensor will return the UTC timestamp of the launch
value_template: >-
{%- for launch in value_json.launches %}
{% if launch.location.id == 16 or launch.location.id == 17 %}
{% if strptime(launch.isostart, '%Y%m%dT%H%M%SZ').strftime('%Y-%m-%d') == now().strftime('%Y-%m-%d') %}
{% set utc_offset_string = now().strftime('%z') %}
{% set utc_offset_direction = utc_offset_string[:1] %}
{% set utc_offset_hours = now().strftime('%z')[-4:] %}
{% set utc_offset_seconds = (utc_offset_hours| int /100) * 60 * 60 %}
{% if utc_offset_direction == '-' %}
{{ launch.wsstamp - utc_offset_seconds}}
{% else %}
{{ launch.wsstamp + utc_offset_seconds}}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
# Disabling
# - platform: rest
# scan_interval: 1800
# resource: https://launchlibrary.net/1.2.2/launch/next/10
# # resource: https://raw.githubusercontent.com/cribbstechnologies/ha_config/master/www/test_launch.json
# name: launch window
# # if the current timestamp is in the launch window
# # this sensor will return the UTC timestamp of the launch
# value_template: >-
# {%- for launch in value_json.launches %}
# {% if launch.location.id == 16 or launch.location.id == 17 %}
# {% if strptime(launch.isostart, '%Y%m%dT%H%M%SZ').strftime('%Y-%m-%d') == now().strftime('%Y-%m-%d') %}
# {% set utc_offset_string = now().strftime('%z') %}
# {% set utc_offset_direction = utc_offset_string[:1] %}
# {% set utc_offset_hours = now().strftime('%z')[-4:] %}
# {% set utc_offset_seconds = (utc_offset_hours| int /100) * 60 * 60 %}
# {% if utc_offset_direction == '-' %}
# {{ launch.wsstamp - utc_offset_seconds}}
# {% else %}
# {{ launch.wsstamp + utc_offset_seconds}}
# {% endif %}
# {% endif %}
# {% endif %}
# {% endfor %}
automation:

View File

@ -246,7 +246,7 @@ automation:
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
- service: script.twitter_notify_image
data_template:
message: >-
tweet: >-
{{ [ "There are only {{states.sensor.halloween_countdown.state}} days until Halloween.",
"Halloween is only {{states.sensor.halloween_countdown.state}} days away. It might not be enough time. ",
"Halloween is coming. {{states.sensor.halloween_countdown.state}} days and counting.",
@ -254,7 +254,7 @@ automation:
"You have {{states.sensor.halloween_countdown.state}} days until you need a Halloween costume.",
"Only {{states.sensor.halloween_countdown.state}} days until Halloween. But who is counting. amirite?",
"Would it be cliche if I went as a haunted house for Halloween? Asking for a another house.",
"Just in case I wanted to be HAL 9000 for Halloween I ordered some Pod Bay Doors."
"Just in case I wanted to be HAL 9000 for Halloween I ordered some Pod Bay Doors. They need to get here in {{states.sensor.halloween_countdown.state}} days."
] | random }}
image: >-
{{ [ "/config/www/tweet_images/halloween/potion.jpg",

View File

@ -90,6 +90,7 @@ sensor:
friendly_name: 'Flood Watch'
entity_id: sensor.time
value_template: >-
{% if states.sensor.nws_alerts.state | int > 0 %}
{% 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
@ -97,14 +98,17 @@ sensor:
'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 }}
active
{% endif %}
{% else %}
inactive
{% endif %}
flood_warning:
friendly_name: 'Flood Warning'
entity_id: sensor.time
value_template: >-
{% if states.sensor.nws_alerts.state | int > 0 %}
{% 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
@ -112,7 +116,8 @@ sensor:
'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 }}
active
{% endif %}
{% else %}
inactive
{% endif %}
@ -120,6 +125,7 @@ sensor:
friendly_name: 'Thunderstorm Warning'
entity_id: sensor.time
value_template: >-
{% if states.sensor.nws_alerts.state | int > 0 %}
{% 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
@ -127,7 +133,8 @@ sensor:
'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 }}
active
{% endif %}
{% else %}
inactive
{% endif %}
@ -135,6 +142,7 @@ sensor:
friendly_name: 'Thunderstorm Watch'
entity_id: sensor.time
value_template: >-
{% if states.sensor.nws_alerts.state | int > 0 %}
{% 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
@ -142,7 +150,8 @@ sensor:
'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 }}
active
{% endif %}
{% else %}
inactive
{% endif %}
@ -150,6 +159,7 @@ sensor:
friendly_name: 'Tornado Watch'
entity_id: sensor.time
value_template: >-
{% if states.sensor.nws_alerts.state | int > 0 %}
{% 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
@ -157,7 +167,8 @@ sensor:
'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 }}
active
{% endif %}
{% else %}
inactive
{% endif %}
@ -165,6 +176,7 @@ sensor:
friendly_name: 'Tornado Warning'
entity_id: sensor.time
value_template: >-
{% if states.sensor.nws_alerts.state | int > 0 %}
{% 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
@ -172,7 +184,8 @@ sensor:
'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 }}
active
{% endif %}
{% else %}
inactive
{% endif %}
@ -602,6 +615,16 @@ automation:
script:
store_lightning_count:
sequence:
- service: mqtt.publish
data:
topic: house/lightning/total_count
payload_template: "{{ states.sensor.back_porch.attributes.strike_count | int }}"
retain: true
nws_popup_on_wx_alert:
alias: NWS Weather Alert Pop Up
sequence:

View File

@ -401,3 +401,17 @@
# input_number.skylar_tv_time: 60
# input_number.skylar_ps_time: 60
# input_number.skylar_yt_time: 0
- name: all fans off
entities:
switch.croft_fan:
state: 'off'
switch.livingroom_fan:
state: 'off'
- name: all fans on
entities:
switch.croft_fan:
state: 'on'
switch.livingroom_fan:
state: 'on'