2019-11-10 00:11:03 +00:00
|
|
|
###############################################################################
|
|
|
|
# @author : Jeffrey Stone
|
2020-06-12 20:02:42 +00:00
|
|
|
# @date : 06/12/2020
|
2019-11-10 00:11:03 +00:00
|
|
|
# @package : Daily
|
2020-06-12 20:02:42 +00:00
|
|
|
# @description : Package for handling daily automations and scripts.
|
2019-11-10 00:11:03 +00:00
|
|
|
###############################################################################
|
2020-06-12 20:02:42 +00:00
|
|
|
|
2019-11-10 00:11:03 +00:00
|
|
|
automation:
|
2020-06-12 20:02:42 +00:00
|
|
|
|
|
|
|
- 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)) }}"
|
2019-11-10 00:11:03 +00:00
|
|
|
action:
|
2020-06-12 20:02:42 +00:00
|
|
|
- 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 }}
|
2019-11-16 02:41:10 +00:00
|
|
|
|
2020-06-12 20:02:42 +00:00
|
|
|
- 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:
|
2020-04-10 17:38:28 +00:00
|
|
|
- platform: time
|
2020-06-12 20:02:42 +00:00
|
|
|
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:
|
2020-06-07 23:32:41 +00:00
|
|
|
- platform: time
|
2020-06-12 20:02:42 +00:00
|
|
|
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
|
2020-06-15 00:48:52 +00:00
|
|
|
- service: switch.turn_off
|
2020-06-12 20:02:42 +00:00
|
|
|
data:
|
2020-06-15 00:48:52 +00:00
|
|
|
entity_id: switch.ha_speaker
|
2020-06-12 20:02:42 +00:00
|
|
|
- service: light.turn_off
|
|
|
|
data:
|
2020-06-15 00:48:52 +00:00
|
|
|
entity_id: light.kitchen_cabinets
|
2020-06-12 20:02:42 +00:00
|
|
|
- service: script.good_night_loft
|
2020-06-15 00:48:52 +00:00
|
|
|
- service: script.theater_lights_out
|
2020-06-12 20:02:42 +00:00
|
|
|
- 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
|
2020-06-15 00:48:52 +00:00
|
|
|
- service: scene.turn_on
|
|
|
|
entity_id: scene.normal_livingroom_lighting
|
2020-06-12 20:02:42 +00:00
|
|
|
- service: script.sunset_garage_open
|
|
|
|
- service: script.twitter_notify_image
|
|
|
|
data_template:
|
|
|
|
tweet: >-
|
|
|
|
{{ [
|
2020-06-15 00:48:52 +00:00
|
|
|
"Its getting dark at Anchorage House, so Im turning on the outside and inside lights. ",
|
|
|
|
"When the Sun goes down, I help out by turning on the lights. Its the little things. ",
|
|
|
|
"Switching to dark mode! The outuisde and inside lights are on.",
|
2020-06-12 20:02:42 +00:00
|
|
|
"It is time to turn on the outside lights. You know...so bugs know where to die.",
|
|
|
|
"Anchorage House is switching to night mode!",
|
2020-06-15 00:48:52 +00:00
|
|
|
"Anchorage House is going to the darkside. Of the planet that is. So the lights are on."
|
2020-06-12 20:02:42 +00:00
|
|
|
] | 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
|
2020-06-15 00:48:52 +00:00
|
|
|
offset: -02:00:00
|
|
|
|
condition:
|
|
|
|
- condition: template
|
|
|
|
value_template: >
|
|
|
|
{%- if states.weather.home.state != "sunny" or states.weather.home.state != "partlycloudy" or states.weather.home.state != "clear" -%}
|
|
|
|
true
|
|
|
|
{%- endif -%}
|
2020-06-12 20:02:42 +00:00
|
|
|
action:
|
2020-06-15 00:48:52 +00:00
|
|
|
- service: scene.turn_on
|
|
|
|
entity_id: scene.normal_livingroom_lighting
|
|
|
|
- service: scene.turn_on
|
|
|
|
entity_id: scene.normal_kitchen_lighting
|
|
|
|
- service: script.twitter_notify
|
|
|
|
data:
|
|
|
|
message: >-
|
|
|
|
{{ [ "It is dark inside the house due to the conditions outside the house so I am turning on the inside lights.",
|
|
|
|
"When it gets dark enough outside I turn on the inside lights. ",
|
|
|
|
"Since I monitor the conditions inside and outside the Anchorage House I know all the things. Like it is time to turn on the inside lights."
|
|
|
|
] | random }}
|
|
|
|
|
|
|
|
- id: inside_off_after_sunrise
|
|
|
|
alias: Inside off after Sunrise
|
2020-06-12 20:02:42 +00:00
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: sun
|
|
|
|
event: sunrise
|
2020-06-15 00:48:52 +00:00
|
|
|
offset: 02:30:00
|
2020-06-12 20:02:42 +00:00
|
|
|
action:
|
2020-06-15 00:48:52 +00:00
|
|
|
- service: script.livingroom_lights_off
|
|
|
|
- service: script.kitchen_lights_off
|
2020-06-12 20:02:42 +00:00
|
|
|
- service: scene.turn_on
|
|
|
|
entity_id: scene.jeff_light_off
|
2020-06-15 00:48:52 +00:00
|
|
|
- service: script.twitter_notify
|
|
|
|
data:
|
|
|
|
message: >-
|
|
|
|
{{ [ "Looks like a nice day outside so I am turning off the inside lights.",
|
|
|
|
"It is now bright enough to turn off the inside lights. ",
|
|
|
|
"The inside lights are no longer needed so I am turning them off.",
|
|
|
|
"Two and half hours after sunrise there is enough light to turn off the inside lights."
|
|
|
|
] | random }}
|
|
|
|
|
2020-06-12 20:02:42 +00:00
|
|
|
- id: ha_start
|
|
|
|
alias: HA Startup
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: homeassistant
|
|
|
|
event: start
|
|
|
|
action:
|
|
|
|
service: frontend.set_theme
|
|
|
|
data:
|
|
|
|
name: midnight-AH
|
2020-06-15 00:48:52 +00:00
|
|
|
|
2020-06-12 20:02:42 +00:00
|
|
|
- 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'
|
2020-06-07 23:32:41 +00:00
|
|
|
action:
|
2020-06-12 20:02:42 +00:00
|
|
|
- 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 %}
|