mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-09-13 15:26:58 +00:00
You can find the entire repo here.
This commit is contained in:
39
config/automation/Pool_Deck_lights.yaml
Executable file
39
config/automation/Pool_Deck_lights.yaml
Executable file
@@ -0,0 +1,39 @@
|
||||
#-------------------------------------------
|
||||
# When the Sliding door opens, at night, turn on Pool deck lights.
|
||||
# @CCOSTAN
|
||||
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
||||
#-------------------------------------------
|
||||
|
||||
- alias: Pool Deck light helper
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.MCU2_GPIO12
|
||||
to: 'on'
|
||||
for: '00:3:00'
|
||||
- platform: state
|
||||
entity_id: sun.sun
|
||||
to: 'below_horizon'
|
||||
from: 'above_horizon'
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
state: 'below_horizon'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.MCU2_GPIO12
|
||||
state: 'on'
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.dark_sky_temperature
|
||||
below: 80
|
||||
|
||||
action:
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.back_landscaping
|
||||
- service: light.turn_on
|
||||
entity_id: group.outdoor_pool_lights
|
||||
data:
|
||||
color_temp: 369
|
||||
- wait_template: >-
|
||||
{{ states.binary_sensor.MCU2_GPIO12.state == 'off' }}
|
||||
- service: light.turn_off
|
||||
entity_id: group.outdoor_pool_lights
|
62
config/automation/Speech/High_Wind_Speed_Check.yaml
Executable file
62
config/automation/Speech/High_Wind_Speed_Check.yaml
Executable file
@@ -0,0 +1,62 @@
|
||||
###################################
|
||||
## Tornados are no Joke.
|
||||
###################################
|
||||
|
||||
- alias: 'High Wind Speed Notification'
|
||||
hide_entity: True
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.dark_sky_wind_speed
|
||||
above: 24
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.dark_sky_wind_speed
|
||||
above: 40
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.dark_sky_wind_speed
|
||||
above: 60
|
||||
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{%- if states.automation.high_wind_speed_notification.attributes.last_triggered -%}
|
||||
{{ (as_timestamp(now()) - as_timestamp(states.automation.high_wind_speed_notification.attributes.last_triggered)) > 3600 }}
|
||||
{%- else -%}
|
||||
true
|
||||
{%- endif -%}
|
||||
|
||||
action:
|
||||
- service: script.notify_engine
|
||||
data_template:
|
||||
value1: 'VERY HIGH WINDS:'
|
||||
value2: "{{ states('sensor.dark_sky_wind_speed')}}"
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.alert_mode
|
||||
|
||||
- service: script.speech_engine
|
||||
data_template:
|
||||
value1: >
|
||||
{% set windspeed = states.sensor.dark_sky_wind_speed.state | round %}
|
||||
{% if ( windspeed > 25 ) and ( windspeed <= 40 ) %}
|
||||
HEAVY WINDS!!! Current Wind Speed is : {{windspeed}} mph! Be VERY careful outdoors!
|
||||
{% elif ( windspeed > 40 ) and ( windspeed <= 60 ) %}
|
||||
Warning! Wind speed is {{windspeed}} MPH. FIND SHELTER IMMEDIATELY!
|
||||
{% elif ( windspeed > 60 ) %}
|
||||
HURRICANE WINDS. FIND SHELTER, AND STAY INDOORS!
|
||||
{% endif %}
|
||||
call_window_check: 1
|
||||
call_garage_check: 1
|
||||
|
||||
- service: script.emergency
|
||||
|
||||
- service: script.tweet_engine
|
||||
data_template:
|
||||
tweet: >
|
||||
{% set windspeed = states.sensor.dark_sky_wind_speed.state | round %}
|
||||
{% if ( windspeed > 25 ) and ( windspeed <= 40 ) %}
|
||||
HEAVY WINDS!!! Current Wind Speed is : {{windspeed}} mph! Be VERY careful outdoors! #Florida #Weather (http://amzn.to/2jQLpVQ)
|
||||
{% elif ( windspeed > 40 ) and ( windspeed <= 60 ) %}
|
||||
Current Wind Speed is : {{windspeed}} mph! Warning! #Florida #Weather (http://amzn.to/2jQLpVQ) FIND SHELTER IMMEDIATELY! #Florida #Weather (http://amzn.to/2jQLpVQ)
|
||||
{% elif ( windspeed > 60 ) %}
|
||||
Current Wind Speed is : {{windspeed}} mph! HURRICANE WINDS. FIND SHELTER, AND STAY INDOORS! #Florida #Weather (http://amzn.to/2jQLpVQ)
|
||||
{% endif %}
|
12
config/automation/Speech/README.md
Executable file
12
config/automation/Speech/README.md
Executable file
@@ -0,0 +1,12 @@
|
||||
# [](https://travis-ci.org/CCOSTAN/Home-AssistantConfig) Home-Assistant Config by [@ccostan](http://www.twitter.com/ccostan)
|
||||
[Home Assistant](https://home-assistant.io/) configuration files (YAMLs)
|
||||
|
||||
Be sure to :star: my repo so you can keep up to date on the daily progress!
|
||||
|
||||
This directory is for all the speech only Automations. These speech scripts use a speechengine in the scripts folder but the automations generate all the text (mostly).
|
||||
|
||||
#Still have questions on my Config?
|
||||
Follow me on twitter : [@CCostan](https://twitter.com/ccostan)
|
||||
Follow the Smart Home on twitter : [@BearStoneHA](https://twitter.com/BearStoneHA)
|
||||
|
||||
You can also vist my [Blog](http://www.vmwareinfo.com/search/label/iot) for all of my [Home Automation Posts](http://www.vmwareinfo.com/search/label/iot).
|
41
config/automation/Speech/announcements.yaml
Executable file
41
config/automation/Speech/announcements.yaml
Executable file
@@ -0,0 +1,41 @@
|
||||
########## ############################################################
|
||||
## Announce when people come or go.
|
||||
## Announce over all Chromecast Audios
|
||||
######################################################################
|
||||
- alias: 'People Greeting'
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- device_tracker.carlo
|
||||
- device_tracker.stacey
|
||||
- device_tracker.franco
|
||||
- device_tracker.yolanda
|
||||
from: 'not_home'
|
||||
to: 'home'
|
||||
for: '00:02:00'
|
||||
|
||||
action:
|
||||
- service: script.speech_engine
|
||||
data_template:
|
||||
personarriving: >
|
||||
{% set person = trigger.entity_id.split('.')[1]|replace('_', ' ')%}
|
||||
{%- macro greeting_sentence(person) -%}
|
||||
{{ [
|
||||
"Welcome back home " ~ person,
|
||||
"Guess who is home?" ~ person +" is!",
|
||||
person + " is now in the house.",
|
||||
"Welcome Home " ~ person + ". We have missed you. Or at least Molly did.",
|
||||
"Our home is now complete, Rest your head and relax your feet! Welcome Back " ~ person,
|
||||
"Life is like a song, you’re back where you belong. Welcome home " ~ person,
|
||||
"Hey there " ~ person + " Welcome Home!",
|
||||
"Knock Knock. Who is There? " ~ person +" is!",
|
||||
person ~ "! You are home!",
|
||||
"I know a secret! " ~ person +" is home!"
|
||||
] | random }}
|
||||
{%- endmacro -%}
|
||||
{{greeting_sentence(person)}}
|
||||
call_responsibilities: 1
|
||||
call_no_announcement: 1
|
||||
call_garage_check: 1
|
||||
call_window_check: 1
|
35
config/automation/Speech/door_opened.yaml
Executable file
35
config/automation/Speech/door_opened.yaml
Executable file
@@ -0,0 +1,35 @@
|
||||
######################################################################
|
||||
## Door Open Announcements
|
||||
######################################################################
|
||||
- alias: 'Door Opened'
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.mcu1_gpio5 # Front door #
|
||||
- binary_sensor.mcu2_gpio5 # Back door #
|
||||
- binary_sensor.MCU2_GPIO12 # Main Slider
|
||||
- binary_sensor.MCU1_GPIO12 # Interior Garage Door #
|
||||
from: 'off'
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.sleepnumber_carlo_carlo_is_in_bed
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.sleepnumber_carlo_stacey_is_in_bed
|
||||
state: 'on'
|
||||
|
||||
action:
|
||||
- service: script.notify_engine
|
||||
data_template:
|
||||
who: 'parents'
|
||||
value1: "The {{ trigger.to_state.attributes.friendly_name }} has been {{ (trigger.to_state.state)|replace('_', ' ') }}."
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.alert_mode
|
||||
|
||||
- service: script.speech_engine
|
||||
data_template:
|
||||
call_window_check: 1
|
||||
call_inside_weather: 1
|
48
config/automation/Speech/garadget_Wind_Speed_Check.yaml
Executable file
48
config/automation/Speech/garadget_Wind_Speed_Check.yaml
Executable file
@@ -0,0 +1,48 @@
|
||||
###################################
|
||||
## Garadget Stuff - [Garadget](http://amzn.to/2jQLpVQ) - Garage Door opener/sensor
|
||||
###################################
|
||||
|
||||
- alias: 'Wind Speed Garage Door Check'
|
||||
# hide_entity: True
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.dark_sky_wind_speed
|
||||
above: 20
|
||||
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ states('cover.large_garage') == 'opened' }}"
|
||||
- condition: template
|
||||
value_template: "{{ states('cover.small_garage') == 'opened'}}"
|
||||
|
||||
action:
|
||||
- service: script.notify_engine
|
||||
data_template:
|
||||
value1: 'Check Garage Doors:'
|
||||
value2: "Small: {{ states('cover.small_garage')}}"
|
||||
value3: "Large: {{ states('cover.large_garage')}}"
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.alert_mode
|
||||
|
||||
- service: script.speech_engine
|
||||
data_template:
|
||||
value1: >
|
||||
"The winds are picking up outside. The wind speed is {{ states('sensor.dark_sky_wind_speed')|round}} miles per hour. For safety, please close the garage doors.
|
||||
{% if is_state('cover.large_garage', 'open') -%}
|
||||
The Large Garage Door is open
|
||||
{% endif -%}
|
||||
{% if is_state('cover.small_garage', 'open') -%}
|
||||
{% if is_state('cover.large_garage', 'open') -%}and
|
||||
{%- endif %} The small Garage Door is open.
|
||||
{% endif %}"
|
||||
|
||||
- service: script.tweet_engine
|
||||
data_template:
|
||||
tweet: >
|
||||
{{ [
|
||||
"Wind speed is {{ states('sensor.dark_sky_wind_speed')|round}} miles per hour. For safety, I'm going to close the @garadget doors.",
|
||||
"Getting pretty windy! {{ states('sensor.dark_sky_wind_speed')|round}}MPH. Time to ask @Garadget to close the garage doors."
|
||||
] | random + "(http://amzn.to/2jQLpVQ)"}}
|
19
config/automation/Speech/garage_closed.yaml
Executable file
19
config/automation/Speech/garage_closed.yaml
Executable file
@@ -0,0 +1,19 @@
|
||||
######################################################################
|
||||
## Garage Status Announcements - Only during normal hours.
|
||||
######################################################################
|
||||
- alias: 'Garage Door closed'
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- cover.large_garage
|
||||
- cover.small_garage
|
||||
from: 'open'
|
||||
to: 'closed'
|
||||
for: '00:02:00'
|
||||
|
||||
action:
|
||||
- service: script.speech_engine
|
||||
data_template:
|
||||
DoorClosed: "The {{ trigger.entity_id.split('.')[1]|replace('_', ' ') }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}."
|
||||
call_garage_check: 1
|
28
config/automation/Speech/garage_opened.yaml
Executable file
28
config/automation/Speech/garage_opened.yaml
Executable file
@@ -0,0 +1,28 @@
|
||||
######################################################################
|
||||
## Garage Status Announcements
|
||||
######################################################################
|
||||
- alias: 'Garage Opened'
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- cover.large_garage
|
||||
- cover.small_garage
|
||||
from: 'closed'
|
||||
to: 'open'
|
||||
for: '00:02:30'
|
||||
|
||||
action:
|
||||
- service_template: >
|
||||
{% set hour=states("sensor.time").split(':')[0] | int %}
|
||||
{% if hour >= 7 and hour <= 9 and states.input_boolean.school_mode.state == 'on'%}
|
||||
input_boolean.turn_off
|
||||
{% else %}
|
||||
input_boolean.turn_on
|
||||
{% endif %}
|
||||
entity_id: input_boolean.alert_mode
|
||||
|
||||
- service: script.speech_engine
|
||||
data_template:
|
||||
value1: "The {{ trigger.entity_id.split('.')[1]|replace('_', ' ') }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}."
|
||||
call_garage_check: 1
|
32
config/automation/Speech/home_stats.yaml
Executable file
32
config/automation/Speech/home_stats.yaml
Executable file
@@ -0,0 +1,32 @@
|
||||
######################################################################
|
||||
## Some home facts when we get back home from being away.
|
||||
######################################################################
|
||||
- alias: 'Home Stats'
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- group.family
|
||||
from: 'not_home'
|
||||
to: 'home'
|
||||
for: '00:03:00'
|
||||
|
||||
- platform: state
|
||||
entity_id: input_boolean.home_stats
|
||||
to: 'on'
|
||||
from: 'off'
|
||||
|
||||
action:
|
||||
|
||||
- wait_template: >-
|
||||
{{ is_state('group.garage_doors', 'closed') }}
|
||||
timeout: 00:05:30
|
||||
|
||||
- service: script.speech_engine
|
||||
data:
|
||||
call_inside_weather: 1
|
||||
call_responsibilities: 1
|
||||
call_outside_weather: 1
|
||||
call_garage_check: 1
|
||||
call_window_check: 1
|
||||
call_light_check: 1
|
24
config/automation/Speech/nest.yaml
Executable file
24
config/automation/Speech/nest.yaml
Executable file
@@ -0,0 +1,24 @@
|
||||
######################################################################
|
||||
## Announce when one of the nests kick in
|
||||
## Announce over all Chromecast Audios
|
||||
######################################################################
|
||||
- alias: 'Nest Status'
|
||||
|
||||
trigger:
|
||||
|
||||
- platform: state
|
||||
entity_id:
|
||||
- sensor.downstairs_thermostat_hvac_state
|
||||
- sensor.upstairs_thermostat_hvac_state
|
||||
from: 'off'
|
||||
|
||||
# condition:
|
||||
# - condition: template
|
||||
# value_template: >-
|
||||
# {{ as_timestamp(states.automation.nest_status.attributes.last_triggered) > as_timestamp(now()) - (1800) }}
|
||||
|
||||
action:
|
||||
- service: script.speech_engine
|
||||
data_template:
|
||||
NestStatus: "The {{ trigger.entity_id.split('.')[1].split('_')[0]}} {{ trigger.entity_id.split('.')[1].split('_')[1]}} has now been turned on for {{(trigger.to_state.state)}}."
|
||||
call_window_check: 1
|
25
config/automation/Speech/new_device.yaml
Executable file
25
config/automation/Speech/new_device.yaml
Executable file
@@ -0,0 +1,25 @@
|
||||
##############################################################################
|
||||
### New Device has connected to the network. let everyone know.
|
||||
##############################################################################
|
||||
|
||||
- alias: "New device connected"
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: device_tracker_new_device
|
||||
|
||||
action:
|
||||
- wait_template: >-
|
||||
{{ not is_state('media_player.livingroomCC', 'playing') }}
|
||||
|
||||
- service: script.speech_engine
|
||||
data_template:
|
||||
NewDevice: "There has been a new device detected on the network. Be sure to appropriately catagorize {{trigger.event.data.host_name}} within Circle."
|
||||
|
||||
- service: script.tweet_engine
|
||||
data_template:
|
||||
tweet: >
|
||||
{{ [
|
||||
"New Device on the Network! @MeetCircle has alerted me me and now it is locked down.",
|
||||
"Constant monitoring of the network by @MeetCircle has detected a new device in the environment."
|
||||
] | random + " (http://amzn.to/2eAgaA6)"}}
|
||||
##############################################################################
|
15
config/automation/Speech/responsibilities.yaml
Executable file
15
config/automation/Speech/responsibilities.yaml
Executable file
@@ -0,0 +1,15 @@
|
||||
######################################################################
|
||||
## Who's day is it anyway? Pretty sure my parent's didn't code to figure this out.
|
||||
######################################################################
|
||||
- alias: 'responsibilities'
|
||||
|
||||
trigger:
|
||||
|
||||
- platform: state
|
||||
entity_id: input_boolean.responsibilities
|
||||
to: 'on'
|
||||
|
||||
action:
|
||||
- service: script.speech_engine
|
||||
data:
|
||||
call_responsibilities: 1
|
50
config/automation/System/CucKoo_Clock.yaml
Executable file
50
config/automation/System/CucKoo_Clock.yaml
Executable file
@@ -0,0 +1,50 @@
|
||||
###################################
|
||||
## cuckoo Clock simulation.
|
||||
## Plays the number of cuckoos per hour and 1 on the half hour.
|
||||
###################################
|
||||
|
||||
- alias: Cuckoo Clock
|
||||
trigger:
|
||||
- platform: time
|
||||
minutes: 00
|
||||
seconds: 20
|
||||
- platform: time
|
||||
minutes: 30
|
||||
seconds: 00
|
||||
|
||||
condition:
|
||||
- condition: time
|
||||
after: '09:29:00'
|
||||
before: '21:30:00'
|
||||
- condition: state
|
||||
entity_id: group.family
|
||||
state: 'home'
|
||||
- condition: template
|
||||
value_template: >
|
||||
{% if is_state('media_player.livingroomCC', 'playing') %}
|
||||
false
|
||||
{% else %}
|
||||
true
|
||||
{% endif %}
|
||||
|
||||
action:
|
||||
- service: script.amp_settings
|
||||
data:
|
||||
media_player: 'media_player.livingroomcc'
|
||||
volume_level: 0.22
|
||||
|
||||
- service: media_player.play_media
|
||||
data_template:
|
||||
entity_id: >
|
||||
{% if states.group.bed.state == 'off' %}
|
||||
media_player.livingroomCC
|
||||
{% else %}
|
||||
media_player.alarm_clock, media_player.bedroom_alarm_panel
|
||||
{% endif %}
|
||||
media_content_id: >
|
||||
{% if now().strftime("%M")|int == 30 %}
|
||||
https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/sounds/cuckoo-clock-01.wav
|
||||
{% else %}
|
||||
https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/sounds/cuckoo-clock-{{now().strftime("%I")}}.wav
|
||||
{% endif %}
|
||||
media_content_type: audio/mp4
|
12
config/automation/System/README.md
Executable file
12
config/automation/System/README.md
Executable file
@@ -0,0 +1,12 @@
|
||||
# [](https://travis-ci.org/CCOSTAN/Home-AssistantConfig) Home-Assistant Config by [@ccostan](http://www.twitter.com/ccostan)
|
||||
[Home Assistant](https://home-assistant.io/) configuration files (YAMLs)
|
||||
|
||||
Be sure to :star: my repo so you can keep up to date on the daily progress!
|
||||
|
||||
This directory is primarily used for automations that are just running in the background all the time. Little robots just doing thier thing to help make the house the smartest and most proactive it can be for us.
|
||||
|
||||
#Still have questions on my Config?
|
||||
Follow me on twitter : [@CCostan](https://twitter.com/ccostan)
|
||||
Follow the Smart Home on twitter : [@BearStoneHA](https://twitter.com/BearStoneHA)
|
||||
|
||||
You can also vist my [Blog](http://www.vmwareinfo.com/search/label/iot) for all of my [Home Automation Posts](http://www.vmwareinfo.com/search/label/iot).
|
26
config/automation/System/Self_heal.yaml
Executable file
26
config/automation/System/Self_heal.yaml
Executable file
@@ -0,0 +1,26 @@
|
||||
###################################
|
||||
## Self Healing Section -
|
||||
## Home Assistant runs on my [Raspberry Pi 3](http://amzn.to/2e3DOBY) with [Aeon Labs Z Wave Stick (GEN 5)](http://amzn.to/2eAiAP0).
|
||||
###################################
|
||||
|
||||
- alias: Heal Components Nightly
|
||||
hide_entity: True
|
||||
trigger:
|
||||
platform: time
|
||||
at: '2:31:00'
|
||||
action:
|
||||
# - service: zwave.heal_network - Not needed anymore since I've migrated to Wink.
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: switch.bedroom_restart_on
|
||||
|
||||
- service: script.tweet_engine
|
||||
data_template:
|
||||
tweet: >
|
||||
{{ [
|
||||
"While they sleep, I self heal the #Z-Wave network with #Wink. (http://amzn.to/2E9Vax2)",
|
||||
"2:30am, Time to restart the #Amazon Alarm Panels for a fresh start in the morning. (http://www.vmwareinfo.com/2017/08/project-update-visualization-of-home.html)",
|
||||
"Restarting the #Amazon Fire Tablets nightly to clear memory issues or any other bugs (http://www.vmwareinfo.com/2017/07/visualizing-smart-home-using-home.html)",
|
||||
"Nightly #Z-WAVE Self heals keep all the gear in check! (http://amzn.to/2q17R4S)",
|
||||
"Every night at 2:31am, I do my self-heal and rebuild the #ZWAVE network.",
|
||||
"Without my Nightly #ZWave Self Heal, things get a little whackado."
|
||||
] | random + " #SelfHeal "}}
|
34
config/automation/System/Wink_update_notification.yaml
Executable file
34
config/automation/System/Wink_update_notification.yaml
Executable file
@@ -0,0 +1,34 @@
|
||||
- alias: "Wink Update Available Notification"
|
||||
hide_entity: True
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: "{{ is_state_attr('binary_sensor.carlowink', 'update needed', True) }} != False }}"
|
||||
|
||||
action:
|
||||
- service: script.notify_engine
|
||||
data_template:
|
||||
value1: 'Check the Wink Hub. Update is needed.'
|
||||
value2: "{{ states.binary_sensor.carlowink.attributes }}"
|
||||
value3: ''
|
||||
who: 'carlo'
|
||||
|
||||
- service: notify.html5
|
||||
data_template:
|
||||
title: "Wink Update Available"
|
||||
message: "Wink Update is available. - {{ as_timestamp(now()) | timestamp_custom('%I:%M:%S %p %d%b%Y', true) }}"
|
||||
data:
|
||||
url: "https://home-assistant.io/getting-started/installation-raspberry-pi-all-in-one/#upgrading"
|
||||
|
||||
- service: persistent_notification.create
|
||||
data:
|
||||
title: "Wink Update Available"
|
||||
message: "Wink Update is available. - {{ as_timestamp(now()) | timestamp_custom('%I:%M:%S %p %d%b%Y', true) }}"
|
||||
notification_id: "update_available"
|
||||
|
||||
- service: script.tweet_engine
|
||||
data_template:
|
||||
tweet: >
|
||||
{{ [
|
||||
"Check @TheWinkApp Hub @CCostan. Update is needed. {{ states.binary_sensor.carlowink.attributes }}",
|
||||
"New update from @TheWinkApp. Hop to it @CCostan"
|
||||
] | random + "(http://amzn.to/2orGEWo)"}}
|
26
config/automation/System/bad_logins.yaml
Executable file
26
config/automation/System/bad_logins.yaml
Executable file
@@ -0,0 +1,26 @@
|
||||
###################################
|
||||
## Uses IFTTT to notify me of bad logins.
|
||||
###################################
|
||||
|
||||
- alias: Login Failure
|
||||
hide_entity: True
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: "{{ states('persistent_notification.httplogin') != 'unknown' }}"
|
||||
|
||||
action:
|
||||
- service: script.notify_engine
|
||||
data_template:
|
||||
value1: 'Bad Login: '
|
||||
value2: 'There was a Hack attempt!'
|
||||
value3: 'Go Check the GUI for details.'
|
||||
who: 'carlo'
|
||||
|
||||
- service: script.tweet_engine
|
||||
data_template:
|
||||
tweet: >
|
||||
{{ [
|
||||
"Seriously, I am a Smart Home. I am logging your hack attempt.",
|
||||
"If you do not know the password, you get locked out and IP banned.",
|
||||
"Three Strikes and you are OUT! IP Banned."
|
||||
] | random + "#Security"}}
|
50
config/automation/System/detect_and_adjust_lights.yaml
Executable file
50
config/automation/System/detect_and_adjust_lights.yaml
Executable file
@@ -0,0 +1,50 @@
|
||||
##############################################################################
|
||||
### Detect when lights are turned on and adjust them accordingly based on time.
|
||||
### Code by @JesseWebDotCom
|
||||
##############################################################################
|
||||
- alias: detect lights and adjust the brightness when turned on based on time
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: state_changed
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: group.family
|
||||
state: 'home'
|
||||
- condition: state
|
||||
entity_id: input_boolean.alert_mode
|
||||
state: 'off'
|
||||
- condition: template
|
||||
value_template: "{{ trigger.event.data is not none }}"
|
||||
- condition: template
|
||||
value_template: "{{ trigger.event.data.entity_id is not none }}"
|
||||
- condition: template
|
||||
value_template: "{{ trigger.event.data.entity_id.split('.')[0] == 'light' }}"
|
||||
- condition: template
|
||||
value_template: "{{ trigger.event.data.entity_id.split('_')[0] != 'light.tv' }}"
|
||||
- condition: template
|
||||
value_template: "{{ trigger.event.data.entity_id.split('_')[0] != 'light.couch' }}"
|
||||
- condition: template
|
||||
value_template: "{{ trigger.event.data.entity_id.split('_')[0] != 'light.office' }}"
|
||||
- condition: template
|
||||
value_template: "{{ trigger.event.data.entity_id.split('_')[1] != 'screensaver' }}"
|
||||
- condition: template
|
||||
value_template: "{{ trigger.event.data.new_state.state == 'on' }}"
|
||||
- condition: template
|
||||
value_template: "{{ trigger.event.data.old_state.state == 'off' }}"
|
||||
|
||||
action:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: "{{ trigger.event.data.entity_id }}"
|
||||
brightness: >
|
||||
{% set hour=states("sensor.time").split(':')[0] | int %}
|
||||
{%- if hour >= 5 and hour < 8 -%}
|
||||
50
|
||||
{%- elif hour >= 8 and hour <20 -%}
|
||||
255
|
||||
{%- elif hour >= 20 and hour <24 -%}
|
||||
40
|
||||
{%- else -%}
|
||||
15
|
||||
{%- endif %}
|
37
config/automation/System/door_chime.yaml
Executable file
37
config/automation/System/door_chime.yaml
Executable file
@@ -0,0 +1,37 @@
|
||||
###################################
|
||||
## @CCOSTAN
|
||||
## Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
||||
###################################
|
||||
|
||||
- alias: Door Chime
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- group.entry_points
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: group.family
|
||||
state: 'home'
|
||||
|
||||
action:
|
||||
- service: script.amp_settings
|
||||
data:
|
||||
media_player: 'media_player.livingroomcc'
|
||||
volume_level: 0.22
|
||||
|
||||
- service: media_player.play_media
|
||||
data_template:
|
||||
entity_id: >
|
||||
{% if states.group.bed.state == 'off' %}
|
||||
media_player.livingroomCC
|
||||
{% else %}
|
||||
media_player.alarm_clock, media_player.bedroom_alarm_panel
|
||||
{% endif %}
|
||||
media_content_id: >
|
||||
{% if trigger.to_state.state == 'on' %}
|
||||
https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/sounds/one-tone-chime.mp3
|
||||
{% else %}
|
||||
https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/sounds/two-tone-chime.mp3
|
||||
{% endif %}
|
||||
media_content_type: audio/mp4
|
29
config/automation/System/ip_change.yaml
Executable file
29
config/automation/System/ip_change.yaml
Executable file
@@ -0,0 +1,29 @@
|
||||
##############################################################################
|
||||
### Detect when things are on and forgotten about. Like any Good Watchdog.
|
||||
##############################################################################
|
||||
|
||||
##############################################################################
|
||||
|
||||
- alias: "NOTIFY IF IP CHANGES"
|
||||
hide_entity: True
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.ipchange
|
||||
from: 'False'
|
||||
to: 'True'
|
||||
action:
|
||||
- service: script.notify_engine
|
||||
data_template:
|
||||
value1: 'Changed IP address:'
|
||||
value2: "New IP: {{ states('sensor.exteral_ip') }}"
|
||||
value3: ' - Be sure to Change DNS!'
|
||||
who: 'carlo'
|
||||
|
||||
- service: script.tweet_engine
|
||||
data_template:
|
||||
tweet: >
|
||||
{{ [
|
||||
"That's weird. Looks like my IP address changed. @CCostan, please check it out.",
|
||||
"Time to update @GoDaddy @CCostan. Looks like my IP address changed."
|
||||
] | random + " #HomeAutomation"}}
|
||||
##############################################################################
|
29
config/automation/System/rachio_rain_delay.yaml
Executable file
29
config/automation/System/rachio_rain_delay.yaml
Executable file
@@ -0,0 +1,29 @@
|
||||
###################################
|
||||
## Uses IFTTT to trigger rain delay with rachio
|
||||
###################################
|
||||
|
||||
- alias: Rachio_Rain_Delay
|
||||
hide_entity: True
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id:
|
||||
- sensor.dark_sky_precip_intensity_max
|
||||
- sensor.dark_sky_precip_intensity
|
||||
above: 0.5
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.dark_sky_wind_speed
|
||||
above: 20
|
||||
|
||||
action:
|
||||
- service: ifttt.trigger
|
||||
data_template: {"event":"Rachio_Rain_Delay"}
|
||||
|
||||
- service: script.tweet_engine
|
||||
data_template:
|
||||
tweet: >
|
||||
{{ [
|
||||
"Looks like Rain, Pausing the @_Rachio for 24 hours. (http://amzn.to/2eoPKBW)",
|
||||
"Since it is going to rain tomorrow, I'll pause @_Rachio for 24 hours.",
|
||||
"No reason to water the grass if it's going to rain tomorrow. pausing @_Rachio for 24 hours.",
|
||||
"Mother Nature is watering the grass today so I can pause @_Rachio for 24 hours."
|
||||
] | random + " #SavingWater"}}
|
75
config/automation/System/trigger_dump.yaml
Executable file
75
config/automation/System/trigger_dump.yaml
Executable file
@@ -0,0 +1,75 @@
|
||||
###################################
|
||||
## Trigger Dump
|
||||
###################################
|
||||
|
||||
- alias: Trigger dump - MQTT
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: feedreader
|
||||
action:
|
||||
- service: script.notify_engine
|
||||
data_template:
|
||||
value1: 'Check the MQTT Dump'
|
||||
value2: '/dump/{{ trigger.platform }}'
|
||||
who: 'carlo'
|
||||
- service: mqtt.publish
|
||||
data_template:
|
||||
topic: '/dump/{{ trigger.platform }}'
|
||||
retain: false
|
||||
payload: >-
|
||||
{%- macro dumpState(statePrefix, stateObj) -%}
|
||||
{{statePrefix ~ ": "}} {{- stateObj.state }}{{- "\n" -}}
|
||||
{{statePrefix ~ ".entity_id: "}} {{- stateObj.entity_id }}{{- "\n" -}}
|
||||
{{statePrefix ~ ".domain: "}} {{- stateObj.domain }}{{- "\n" -}}
|
||||
{{statePrefix ~ ".object_id: "}} {{- stateObj.object_id }}{{- "\n" -}}
|
||||
{{statePrefix ~ ".name: "}} {{- stateObj.name }}{{- "\n" -}}
|
||||
{{statePrefix ~ ".last_updated: "}} {{- stateObj.last_updated }}{{- "\n" -}}
|
||||
{{statePrefix ~ ".last_changed: "}} {{- stateObj.last_changed }}{{- "\n" -}}
|
||||
{%- for attrib in stateObj.attributes | sort() %}
|
||||
{%- if attrib is defined -%}
|
||||
{{- statePrefix ~ ".attributes." ~ attrib ~ ": " -}} {{- stateObj.attributes[attrib] -}}
|
||||
{{- "\n" -}}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{% set p = trigger.platform %}
|
||||
{{"trigger.platform: "}} {{ p }}{{- "\n" -}}
|
||||
|
||||
{%- if p == "mqtt" -%}
|
||||
{{"trigger.topic: "}} {{ trigger.topic }}{{- "\n" -}}
|
||||
{{"trigger.payload: "}} {{ trigger.payload }}{{- "\n" -}}
|
||||
{{"trigger.payload_json: "}} {{ trigger.payload_json }}{{- "\n" -}}
|
||||
{{"trigger.qos: "}} {{ trigger.qos }}{{- "\n" -}}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if p == "event" or p == "sun" or p == "zone" -%}
|
||||
{{"trigger.event: "}} {{ trigger.event }}{{- "\n" -}}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if p == "numeric_state" -%}
|
||||
{{"trigger.above: "}} {{ trigger.above }}{{- "\n" -}}
|
||||
{{"trigger.below: "}} {{trigger.below }}{{- "\n" -}}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if p == "state" -%}
|
||||
{{"trigger.for: "}} {{ trigger.for }}{{- "\n" -}}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if p == "time" -%}
|
||||
{{"trigger.now: "}} {{ trigger.now }}{{- "\n" -}}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if p == "zone" -%}
|
||||
{{"trigger.zone: "}} {{ trigger.zone }}{{- "\n" -}}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if p == "state" or p == "numeric_state" or p == "template" or p == "zone" -%}
|
||||
{{"trigger.entity_id: "}} {{ trigger.entity_id }}{{- "\n" -}}{{- "\n" -}}
|
||||
{{"trigger.from_state: "}} {{- "\n" -}}
|
||||
-------------------{{- "\n" -}}
|
||||
{{ dumpState("trigger.from_state", trigger.from_state) }} {{- "\n" -}}
|
||||
trigger.to_state:{{- "\n" -}}
|
||||
-----------------{{- "\n" -}}
|
||||
{{ dumpState("trigger.to_state", trigger.to_state) }}
|
||||
{%- endif -%}
|
34
config/automation/System/update_notification.yaml
Executable file
34
config/automation/System/update_notification.yaml
Executable file
@@ -0,0 +1,34 @@
|
||||
- alias: "Update Available Notification"
|
||||
hide_entity: True
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: updater.updater
|
||||
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: "{{ states('updater.updater') != 'unknown' }}"
|
||||
|
||||
action:
|
||||
- service: script.notify_engine
|
||||
data_template:
|
||||
value1: 'There is a new Version of Home-Assistant Available.'
|
||||
value2: "{{ states('updater.updater') }}"
|
||||
who: 'carlo'
|
||||
|
||||
- service: script.tweet_engine
|
||||
data:
|
||||
tweet: "New version of @Home_Assistant! Cannot wait for @CCostan to install it! - {{ states('updater.updater') }} (http://www.vmwareinfo.com/2017/07/my-smart-home-look-at-parts-that-make.html)"
|
||||
|
||||
|
||||
- service: notify.html5
|
||||
data_template:
|
||||
title: "Update Available"
|
||||
message: "Home Assistant {{ states('updater.updater') }} is available. - {{ as_timestamp(now()) | timestamp_custom('%I:%M:%S %p %d%b%Y', true) }}"
|
||||
data:
|
||||
url: "https://home-assistant.io/getting-started/installation-raspberry-pi-all-in-one/#upgrading"
|
||||
|
||||
- service: persistent_notification.create
|
||||
data:
|
||||
title: "Update Available"
|
||||
message: "Home Assistant {{ states('updater.updater') }} is available. - {{ as_timestamp(now()) | timestamp_custom('%I:%M:%S %p %d%b%Y', true) }}"
|
||||
notification_id: "update_available"
|
27
config/automation/System/watchdog_light.yaml
Executable file
27
config/automation/System/watchdog_light.yaml
Executable file
@@ -0,0 +1,27 @@
|
||||
##############################################################################
|
||||
### Detect when things are on and forgotten about. Like any Good Watchdog.
|
||||
##############################################################################
|
||||
|
||||
- alias: Automated Light WatchDog!
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- light.hallway
|
||||
- group.hallway_lights
|
||||
- group.foyer_lights
|
||||
- switch.printer_outlet
|
||||
to: 'on'
|
||||
for: '00:20:00'
|
||||
|
||||
- platform: state
|
||||
entity_id:
|
||||
- group.upstairs
|
||||
- switch.garage_outlet
|
||||
to: 'on'
|
||||
for: '02:00:00'
|
||||
|
||||
#Turn it off!
|
||||
action:
|
||||
- service: homeassistant.turn_off
|
||||
data_template:
|
||||
entity_id: "{{ trigger.entity_id }}"
|
31
config/automation/Timed_Triggers/0640.yaml
Executable file
31
config/automation/Timed_Triggers/0640.yaml
Executable file
@@ -0,0 +1,31 @@
|
||||
######################################################################
|
||||
## Stuff that needs to happen at 06:30am.
|
||||
######################################################################
|
||||
|
||||
- alias: 'Timed 640.'
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '06:40:00'
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: group.family
|
||||
state: home
|
||||
- condition: state
|
||||
entity_id: input_boolean.school_mode
|
||||
state: 'on'
|
||||
- condition: time
|
||||
weekday:
|
||||
- mon
|
||||
- tue
|
||||
- wed
|
||||
- thu
|
||||
- fri
|
||||
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- light.d1
|
||||
- light.d2
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.kitchen_accents
|
38
config/automation/Timed_Triggers/0650.yaml
Executable file
38
config/automation/Timed_Triggers/0650.yaml
Executable file
@@ -0,0 +1,38 @@
|
||||
######################################################################
|
||||
## Stuff that needs to happen at 08:30am.
|
||||
######################################################################
|
||||
|
||||
- alias: 'Kids 650.'
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '06:50:00'
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: group.family
|
||||
state: home
|
||||
- condition: state
|
||||
entity_id: input_boolean.school_mode
|
||||
state: 'on'
|
||||
- condition: time
|
||||
weekday:
|
||||
- mon
|
||||
- tue
|
||||
- wed
|
||||
- thu
|
||||
- fri
|
||||
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- light.d1
|
||||
- light.d2
|
||||
- group.kitchen_lights
|
||||
- service: light.turn_off
|
||||
entity_id:
|
||||
- group.dining_room_lights
|
||||
|
||||
- wait_template: >-
|
||||
{{ states.sun.sun.state == 'above_horizon' }}
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.kitchen_accents
|
34
config/automation/Timed_Triggers/0830.yaml
Executable file
34
config/automation/Timed_Triggers/0830.yaml
Executable file
@@ -0,0 +1,34 @@
|
||||
######################################################################
|
||||
## Stuff that needs to happen at 08:30am.
|
||||
######################################################################
|
||||
|
||||
- alias: 'Kids left for the day.'
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '08:30:00'
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: group.family
|
||||
state: home
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.school_mode
|
||||
state: 'on'
|
||||
- condition: time
|
||||
weekday:
|
||||
- mon
|
||||
- tue
|
||||
- wed
|
||||
- thu
|
||||
- fri
|
||||
action:
|
||||
- wait_template: >-
|
||||
{{ is_state('group.garage_doors', 'open') }}
|
||||
- service: light.turn_off
|
||||
entity_id:
|
||||
- group.all_lights
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.kitchen_accents
|
25
config/automation/Timed_Triggers/2200.yaml
Executable file
25
config/automation/Timed_Triggers/2200.yaml
Executable file
@@ -0,0 +1,25 @@
|
||||
######################################################################
|
||||
## Stuff that needs to happen at 10pm.
|
||||
######################################################################
|
||||
|
||||
- alias: 'Shut down AMP in Living room'
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '22:00:00'
|
||||
|
||||
action:
|
||||
- wait_template: >-
|
||||
{{ not is_state('media_player.livingroomCC', 'playing') }}
|
||||
- wait_template: >-
|
||||
{{ not is_state('media_player.whole_house', 'playing') }}
|
||||
|
||||
- service: script.speech_engine
|
||||
data_template:
|
||||
call_no_announcement: 1
|
||||
call_garage_check: 1
|
||||
call_window_check: 1
|
||||
|
||||
- wait_template: >-
|
||||
{{ not is_state('media_player.livingroomCC', 'playing') }}
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.living_room_amp
|
43
config/automation/Timed_Triggers/README.md
Executable file
43
config/automation/Timed_Triggers/README.md
Executable file
@@ -0,0 +1,43 @@
|
||||
# [](https://travis-ci.org/CCOSTAN/Home-AssistantConfig) Home-Assistant Config by [@ccostan](http://www.twitter.com/ccostan)
|
||||
[Home Assistant](https://home-assistant.io/) configuration files (YAMLs)
|
||||
|
||||
Be sure to :star: my repo so you can keep up to date on the daily progress!
|
||||
|
||||
This directory is primarily used for automations that are triggered via time. Daily, monthly, seasonally or on the hour.
|
||||
|
||||
**Time Based Automation TimeLine**
|
||||
|
||||
ALL DAY LONG:
|
||||
Checks to see if we are away.
|
||||
Cuckoo Clock goes off each hour and on the half.
|
||||
|
||||
SUNRISE minus 1 hour
|
||||
Turn off ALL SWITCHES
|
||||
Turn off ALL LIGHTS
|
||||
05:00 AM ** Light Brightness helper 50 Brightness **
|
||||
06:00 AM ( on school days) : Turn on Dining Room lights, Kitchen Accents and start Kid's bedroom [Hue Go](http://amzn.to/2iB36Ii) wake up lights.
|
||||
06:51 AM Turn on Dinette lights, Turn off Dining Room Lights and Kitchen Accents
|
||||
07:51 AM Turn on Kitchen Lights
|
||||
08:00 AM ** Light Brightness helper FULL 255 Brightness **
|
||||
08:31 AM (on school days) Turn off ALL interior lights.
|
||||
09:00 AM Speech Notifications are enabled for the house.
|
||||
|
||||
SUNSET:
|
||||
Turn on Den Outlet, Living Room Outlet, Dining Room Outlet, Outdoor Bathroom light, TV lights
|
||||
Activate Monthly Front Lighting Scene
|
||||
Check if Garage Door is open (Every 60 minutes)
|
||||
** Kitchen Light/Accent Helper Activated **
|
||||
|
||||
08:00 PM ** Late Night Helper is active **
|
||||
08:00 PM ** Light Brightness helper 35 Brightness **
|
||||
08:00 PM TV time Scene triggered if the TV is on.
|
||||
09:00 PM Turn on [Hue Go](http://amzn.to/2iB36Ii) lights for the kid's rooms and start fading down.
|
||||
10:00 PM Speech Notifications are disabled for the house. (except under ALERT mode) and AMP is shut.
|
||||
02:00 AM ** Late Night Help Deactivated **
|
||||
02:31 AM Heal ZWave Network
|
||||
|
||||
#Still have questions on my Config?
|
||||
Follow me on twitter : [@CCostan](https://twitter.com/ccostan)
|
||||
Follow the Smart Home on twitter : [@BearStoneHA](https://twitter.com/BearStoneHA)
|
||||
|
||||
You can also vist my [Blog](http://www.vmwareinfo.com/search/label/iot) for all of my [Home Automation Posts](http://www.vmwareinfo.com/search/label/iot).
|
43
config/automation/Timed_Triggers/night_watchdog.yaml
Executable file
43
config/automation/Timed_Triggers/night_watchdog.yaml
Executable file
@@ -0,0 +1,43 @@
|
||||
######################################################################
|
||||
## Stuff that needs to happen after 10pm.
|
||||
######################################################################
|
||||
|
||||
- alias: Automated NIGHT WatchDog!
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: switch.living_room_amp
|
||||
to: 'on'
|
||||
for: '00:10:00'
|
||||
- platform: state
|
||||
entity_id: media_player.livingroomCC
|
||||
to: 'off'
|
||||
for: '00:02:00'
|
||||
- platform: state
|
||||
entity_id: media_player.whole_house
|
||||
to: 'off'
|
||||
for: '00:02:00'
|
||||
|
||||
condition:
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: group.family
|
||||
state: 'not_home'
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: 'off'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: group.bed
|
||||
state: 'on'
|
||||
|
||||
action:
|
||||
- service: switch.turn_off
|
||||
data_template:
|
||||
entity_id: "{{ trigger.entity_id }}"
|
21
config/automation/Timed_Triggers/startup_month.yaml
Executable file
21
config/automation/Timed_Triggers/startup_month.yaml
Executable file
@@ -0,0 +1,21 @@
|
||||
###################################
|
||||
## Start Up Section
|
||||
###################################
|
||||
|
||||
- alias: Check if it's summer vacation on startup.
|
||||
hide_entity: True
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{% set month=states("sensor.date").split('-')[1] | int %}
|
||||
{%- if month == 6 or month == 7 -%}
|
||||
true
|
||||
{%- endif -%}
|
||||
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.school_mode
|
27
config/automation/Timed_Triggers/startup_notification.yaml
Executable file
27
config/automation/Timed_Triggers/startup_notification.yaml
Executable file
@@ -0,0 +1,27 @@
|
||||
###################################
|
||||
## Start Up Section
|
||||
###################################
|
||||
|
||||
- alias: Startup Notification and Shut startup lights
|
||||
hide_entity: True
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
- service: script.notify_engine
|
||||
data_template:
|
||||
value1: 'Startup: Home Assistant is Up and Running!'
|
||||
who: 'carlo'
|
||||
|
||||
- service: light.turn_off
|
||||
entity_id: group.hallway_lights
|
||||
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "garadget/Garadget Small/command"
|
||||
payload: "get-status"
|
||||
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "garadget/Garadget Large/command"
|
||||
payload: "get-status"
|
47
config/automation/Timed_Triggers/sunrise_turn_off.yaml
Executable file
47
config/automation/Timed_Triggers/sunrise_turn_off.yaml
Executable file
@@ -0,0 +1,47 @@
|
||||
###################################
|
||||
## Sunrise and Sunset stuff
|
||||
###################################
|
||||
|
||||
- alias: 'Sunset Stuff off'
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunrise
|
||||
offset: '-02:00:00'
|
||||
|
||||
action:
|
||||
- service: script.interior_off
|
||||
- service: homeassistant.turn_off
|
||||
entity_id:
|
||||
- group.landscaping
|
||||
- service: script.tweet_engine
|
||||
data_template:
|
||||
tweet: >
|
||||
{{ [
|
||||
"Even though they are sleeping, I still turn off the outdoor lights before sunrise.",
|
||||
"It was a beautiful sunrise. Time to turn off the exterior lights. (http://www.vmwareinfo.com/2017/08/diy-outdoor-smart-home-led-strips.html)",
|
||||
"If the sun is out, we do not need the exterior lights on. (http://amzn.to/2q17R4S)",
|
||||
"The sun is up so it's time to turn the outside lights off. Lucky for my family, I have them covered!"
|
||||
] | random + "#HomeAutomation"}}
|
||||
|
||||
- delay: '00:{{ (range(1, 55)|random|int) }}:00'
|
||||
- service: homeassistant.turn_off
|
||||
entity_id:
|
||||
- group.exterior_lights
|
||||
- group.outdoor_front_lights
|
||||
- group.outdoor_pool_lights
|
||||
- group.all_lights
|
||||
|
||||
- wait_template: >-
|
||||
{{ states.sun.sun.state == 'above_horizon' }}
|
||||
- service: homeassistant.turn_off
|
||||
entity_id:
|
||||
- switch.master_bathroom_accents
|
||||
- group.exterior_lights
|
||||
- group.outdoor_front_lights
|
||||
- service: script.interior_off
|
||||
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.medicine
|
||||
- input_boolean.daylight_override
|
||||
- input_boolean.guest_mode
|
65
config/automation/Timed_Triggers/sunset_turn_on.yaml
Executable file
65
config/automation/Timed_Triggers/sunset_turn_on.yaml
Executable file
@@ -0,0 +1,65 @@
|
||||
###################################
|
||||
## Sunrise and Sunset stuff
|
||||
# @CCOSTAN
|
||||
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
||||
###################################
|
||||
|
||||
- alias: 'Sunset Stuff on'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sun.sun
|
||||
to: 'below_horizon'
|
||||
from: 'above_horizon'
|
||||
|
||||
action:
|
||||
- service: script.tweet_engine
|
||||
data_template:
|
||||
tweet: >
|
||||
{{ [
|
||||
"Right before sunset, I turn on the outdoor lights.",
|
||||
"Since it gets dark around sunset, I will turn on the landscaping lights.",
|
||||
"Time to turn on the Landscaping lights.",
|
||||
"Daytime is over, Time to turn on the exterior lights.",
|
||||
"Once the Sun goes down, we turn on the exterior lights.",
|
||||
"Since it is sunset, I will turn on the exterior lights."
|
||||
] | random + [
|
||||
" #Sunset",
|
||||
" #HomeAutomation",
|
||||
" #AccentLighting",
|
||||
" (http://www.vmwareinfo.com/2017/08/diy-outdoor-smart-home-led-strips.html)"
|
||||
] | random }}
|
||||
- delay: '00:{{ (range(1, 20)|random|int) }}:00'
|
||||
- service: script.speech_engine
|
||||
data:
|
||||
call_dark_outside: 1
|
||||
call_window_check: 1
|
||||
- service: homeassistant.turn_on
|
||||
entity_id:
|
||||
- switch.front_landscaping
|
||||
- service: script.monthly_color_scene
|
||||
- service: light.turn_on
|
||||
entity_id: light.outdoor_bathroom
|
||||
data:
|
||||
brightness: 20
|
||||
- wait_template: >-
|
||||
{{ states.group.family.state == 'home' }}
|
||||
- service: switch.turn_on
|
||||
entity_id:
|
||||
- switch.master_bathroom_accents
|
||||
- switch.back_landscaping
|
||||
- switch.front_door_outlet
|
||||
- switch.living_room_outlet
|
||||
- switch.den_outlet
|
||||
- switch.foyer_outlet
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- group.living_room_accents
|
||||
- light.bedroom
|
||||
- wait_template: >-
|
||||
{{ is_state('group.garage_doors', 'closed') }}
|
||||
- wait_template: >-
|
||||
{{ is_state('group.entry_points', 'off') }}
|
||||
- service: script.speech_engine
|
||||
data:
|
||||
call_garage_check: 1
|
||||
call_window_check: 1
|
26
config/automation/Timed_Triggers/wake_up.yaml
Executable file
26
config/automation/Timed_Triggers/wake_up.yaml
Executable file
@@ -0,0 +1,26 @@
|
||||
######################################################################
|
||||
## Stuff that needs to happen when we are both out of bed.
|
||||
######################################################################
|
||||
|
||||
- alias: 'Time to wake up!'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: group.bed
|
||||
to: 'off'
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: group.family
|
||||
state: home
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: 'off'
|
||||
- condition: time
|
||||
after: '07:00:00'
|
||||
before: '11:00:00'
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- group.kitchen_lights
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.living_room_amp
|
30
config/automation/away.yaml
Executable file
30
config/automation/away.yaml
Executable file
@@ -0,0 +1,30 @@
|
||||
######################################################################
|
||||
## Shut it all down. No one is here
|
||||
######################################################################
|
||||
|
||||
- alias: 'Away Mode'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.downstairs_away_mode
|
||||
to: 'True'
|
||||
- platform: state
|
||||
entity_id: group.family
|
||||
to: 'not_home'
|
||||
- platform: state
|
||||
entity_id: input_boolean.good_night
|
||||
to: 'on'
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: group.family
|
||||
state: 'not_home'
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: 'off'
|
||||
|
||||
action:
|
||||
- service: script.interior_off
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.back_landscaping
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.good_night
|
25
config/automation/color_tornado.yaml
Executable file
25
config/automation/color_tornado.yaml
Executable file
@@ -0,0 +1,25 @@
|
||||
######################################################################
|
||||
## Color Tornado!
|
||||
######################################################################
|
||||
- alias: 'Color Tornado'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.color_tornado
|
||||
to: 'on'
|
||||
from: 'off'
|
||||
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- light.justin_go
|
||||
data:
|
||||
effect: colorloop
|
||||
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- light.justin_go
|
||||
data:
|
||||
effect: colorloop
|
||||
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.color_tornado
|
66
config/automation/dark_rainy_day.yaml
Executable file
66
config/automation/dark_rainy_day.yaml
Executable file
@@ -0,0 +1,66 @@
|
||||
######################################################################
|
||||
## Dark House Little extra light - DARK and Cloudy or just rainy.
|
||||
######################################################################
|
||||
|
||||
- alias: 'Dark House Little extra light'
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sun.sun
|
||||
value_template: '{{ state.attributes.elevation }}'
|
||||
below: 20.0
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.dark_sky_cloud_coverage
|
||||
above: 90
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.dark_sky_precip_intensity
|
||||
above: 1
|
||||
- platform: state
|
||||
entity_id: group.family
|
||||
to: 'home'
|
||||
from: 'not_home'
|
||||
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: numeric_state
|
||||
entity_id: sun.sun
|
||||
value_template: '{{ state.attributes.elevation }}'
|
||||
below: 20.0
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.dark_sky_cloud_coverage
|
||||
above: 90
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.dark_sky_precip_intensity
|
||||
above: 1
|
||||
- condition: state
|
||||
entity_id: binary_sensor.sleepnumber_carlo_carlo_is_in_bed
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.sleepnumber_carlo_stacey_is_in_bed
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
state: 'above_horizon'
|
||||
- condition: state
|
||||
entity_id: group.family
|
||||
state: 'home'
|
||||
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- light.couch_1
|
||||
- light.sink
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.daylight_override
|
||||
- service: script.speech_engine
|
||||
data_template:
|
||||
value1: "It is getting a little dark inside the house because of the {{trigger.entity_id.split('_')[2]|replace('precip','rain') }} {{trigger.entity_id.split('_')[3]|replace('intensity',' ')}} outside. I will turn on some extra lights in the living room."
|
||||
call_window_check: 1
|
||||
call_garage_check: 1
|
||||
|
||||
######################################################################
|
22
config/automation/dash_buttons.yaml
Executable file
22
config/automation/dash_buttons.yaml
Executable file
@@ -0,0 +1,22 @@
|
||||
###################################
|
||||
## Press an [Amazon Dash Buttons](http://amzn.to/2dPKZhM) and then stuff happens.
|
||||
###################################
|
||||
|
||||
- alias: 'Toggle Office Light on/off'
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: office_lamp_dash
|
||||
|
||||
action:
|
||||
# Disable this automation
|
||||
- service: automation.turn_off
|
||||
entity_id: automation.toggle_office_light_onoff
|
||||
- service: light.toggle
|
||||
entity_id: light.office_lamp
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.daylight_override
|
||||
- delay:
|
||||
minutes: 1
|
||||
# enable this automation - This prevents duplicate pushes.
|
||||
- service: automation.turn_on
|
||||
entity_id: automation.toggle_office_light_onoff
|
19
config/automation/flash_all.yaml
Executable file
19
config/automation/flash_all.yaml
Executable file
@@ -0,0 +1,19 @@
|
||||
######################################################################
|
||||
## Flash all the lights!
|
||||
######################################################################
|
||||
- alias: 'Flash all_lights'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.flash
|
||||
to: 'on'
|
||||
from: 'off'
|
||||
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- group.all_lights
|
||||
data:
|
||||
flash: long
|
||||
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.flash
|
86
config/automation/garadget.yaml
Executable file
86
config/automation/garadget.yaml
Executable file
@@ -0,0 +1,86 @@
|
||||
###################################
|
||||
## Garadget Stuff - [Garadget](http://amzn.to/2jQLpVQ) - Garage Door opener/sensor
|
||||
##
|
||||
###################################
|
||||
|
||||
- alias: Garadget Reflection Rates
|
||||
hide_entity: True
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.large_garage_reflection_rate
|
||||
below: 85
|
||||
# for: '00:05:00'
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.small_garage_reflection_rate
|
||||
below: 85
|
||||
# for: '00:05:00'
|
||||
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: "{{ states('cover.large_garage') == 'closed' }}"
|
||||
- condition: template
|
||||
value_template: "{{ states('cover.small_garage') == 'closed' }}"
|
||||
|
||||
action:
|
||||
- service: script.notify_engine
|
||||
data_template:
|
||||
value1: 'Check Garage Doors Reflection:'
|
||||
value2: "Small: {{ states('sensor.small_garage_reflection_rate')}}"
|
||||
value3: "Large: {{ states('sensor.large_garage_reflection_rate')}}"
|
||||
who: "carlo"
|
||||
|
||||
##############################################################################
|
||||
|
||||
- alias: Is the Garage door Open at night - Checks every 30 minutes or 5 minutes after we drive away.
|
||||
hide_entity: True
|
||||
trigger:
|
||||
- platform: time
|
||||
minutes: '/45'
|
||||
seconds: 00
|
||||
- platform: state
|
||||
entity_id: group.family
|
||||
to: not_home
|
||||
for: 00:05:00
|
||||
- platform: state
|
||||
entity_id: input_boolean.tv_time
|
||||
to: 'on'
|
||||
from: 'off'
|
||||
|
||||
condition:
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: group.family
|
||||
state: not_home
|
||||
for: 00:05:00
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ states('cover.large_garage') == 'opened' }}"
|
||||
- condition: template
|
||||
value_template: "{{ states('cover.small_garage') == 'opened' }}"
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
state: 'below_horizon'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ states('cover.large_garage') == 'opened' }}"
|
||||
- condition: template
|
||||
value_template: "{{ states('cover.small_garage') == 'opened'}}"
|
||||
|
||||
action:
|
||||
- service: script.notify_engine
|
||||
data_template:
|
||||
value1: 'Check Garage Doors:'
|
||||
value2: "Small: {{ states('cover.small_garage')}}"
|
||||
value3: "Large: {{ states('cover.large_garage')}}"
|
||||
who: "family"
|
||||
|
||||
- service: script.speech_engine
|
||||
data_template:
|
||||
value1: "Please check the garage doors. The Small garage is {{ states('cover.small_garage')}} and the large garage is {{ states('cover.large_garage')}}"
|
43
config/automation/good_morning.yaml
Executable file
43
config/automation/good_morning.yaml
Executable file
@@ -0,0 +1,43 @@
|
||||
######################################################################
|
||||
## Weekday Morning Routines for the Wife and Kiddos.
|
||||
######################################################################
|
||||
|
||||
- alias: 'Good Morning Routine'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.good_morning
|
||||
to: 'on'
|
||||
from: 'off'
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.sleepnumber_carlo_stacey_is_in_bed
|
||||
to: 'off'
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: group.family
|
||||
state: home
|
||||
- condition: state
|
||||
entity_id: input_boolean.school_mode
|
||||
state: 'on'
|
||||
- condition: time
|
||||
after: '06:00:00'
|
||||
before: '10:00:00'
|
||||
- condition: time
|
||||
weekday:
|
||||
- mon
|
||||
- tue
|
||||
- wed
|
||||
- thu
|
||||
- fri
|
||||
|
||||
action:
|
||||
- delay: 00:20:00
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- light.s1
|
||||
- light.s4
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.kitchen_accents
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.good_morning
|
49
config/automation/good_night.yaml
Executable file
49
config/automation/good_night.yaml
Executable file
@@ -0,0 +1,49 @@
|
||||
######################################################################
|
||||
## Good night Routine
|
||||
######################################################################
|
||||
|
||||
- alias: 'Good Night Trigger'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.good_night
|
||||
to: 'on'
|
||||
from: 'off'
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.sleepnumber_carlo_carlo_is_in_bed
|
||||
- binary_sensor.sleepnumber_carlo_stacey_is_in_bed
|
||||
to: 'on'
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
state: 'below_horizon'
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.sleepnumber_carlo_carlo_is_in_bed
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.sleepnumber_carlo_stacey_is_in_bed
|
||||
state: 'on'
|
||||
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.good_night
|
||||
|
||||
- service: script.speech_engine
|
||||
data_template:
|
||||
value1: >
|
||||
{{ [
|
||||
"Sleep Tight, Don't let the bedbugs bite.",
|
||||
"Have pleasant dreams",
|
||||
"As they say in the Navy, See you in the rise."
|
||||
"Dream pleasant dreams. Tomorrow is a new day.",
|
||||
"Early sleep and early wake up gives health and makes you grow.",
|
||||
"Good night, good night! Parting is such sweet sorrow that I shall say goodnight till it is Morrow.",
|
||||
"There is a time for many words, and there is also a time for sleep.",
|
||||
"This good night isn’t meant to bring an end to this day. It’s intended to wish you awesomeness in what lies ahead.",
|
||||
"Stuff your worries in your pillow, wrap your troubles in your blanket and spread your anxieties on your sheets. When you wake up tomorrow, you may have dirty linen, but more importantly, you’ll have a fresh mind and a happy heart. Good night."
|
||||
] | random }}
|
||||
- service: script.interior_off
|
24
config/automation/guard_dog.yaml
Executable file
24
config/automation/guard_dog.yaml
Executable file
@@ -0,0 +1,24 @@
|
||||
######################################################################
|
||||
## Speak Max! Speak Max!!
|
||||
######################################################################
|
||||
|
||||
- alias: Guard Dog
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.guard_dog
|
||||
to: 'on'
|
||||
from: 'off'
|
||||
- platform: state
|
||||
entity_id: binary_sensor.front_door_opened
|
||||
to: 'on'
|
||||
from: 'off'
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: group.all_covers
|
||||
state: 'closed'
|
||||
|
||||
action:
|
||||
- service: script.dog_bark
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.guard_dog
|
18
config/automation/ifttt_calendar.yaml
Executable file
18
config/automation/ifttt_calendar.yaml
Executable file
@@ -0,0 +1,18 @@
|
||||
###################################
|
||||
## IFTTT checks Office 365 Calendar and Notifies me of appointments. Flash lights but only at reasonable hours.
|
||||
###################################
|
||||
- alias: 'IFTTT Appointment reminder'
|
||||
hide_entity: True
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: IFTTT_Appointment
|
||||
|
||||
condition:
|
||||
- condition: time
|
||||
after: '06:00:00'
|
||||
before: '20:00:00'
|
||||
|
||||
action:
|
||||
- service: script.flash_notify
|
||||
|
||||
|
31
config/automation/ifttt_logger.yaml
Executable file
31
config/automation/ifttt_logger.yaml
Executable file
@@ -0,0 +1,31 @@
|
||||
###################################
|
||||
## LOG IFTTT Stuff - Rachio
|
||||
###################################
|
||||
- alias: 'Log Sprinkler Activity'
|
||||
hide_entity: True
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: rachio_water_stops
|
||||
|
||||
action:
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "Rachio Sprinkler:"
|
||||
message: "The Lawn was watered just now."
|
||||
|
||||
- service: mqtt.publish
|
||||
data_template:
|
||||
payload: '{{ states("sensor.date") }}'
|
||||
topic: 'ifttt/rachio/watering_time'
|
||||
retain: true
|
||||
|
||||
- service: script.tweet_engine
|
||||
data_template:
|
||||
tweet: >
|
||||
{{ [
|
||||
"Just finished watering the lawn with @_Rachio.",
|
||||
"The lawn looked thirsty so I watered it.",
|
||||
"My lawn looks great and we definately do not water it nearly as much as everyone else. (http://amzn.to/2eoPKBW)",
|
||||
"No rain in the forecast? @_Rachio knows & chose to water the lawn.",
|
||||
".@CCostan does not even think about watering the lawn. Me and @_Rachio take care of that."
|
||||
] | random + " #SavingWater"}}
|
61
config/automation/kitchen_lights_and_accents.yaml
Executable file
61
config/automation/kitchen_lights_and_accents.yaml
Executable file
@@ -0,0 +1,61 @@
|
||||
#####################################################################################
|
||||
### If the Kitchen Lights go on for more than 10 minutes, turn off the accent lights
|
||||
### connected to [Etekcity Outlets](http://amzn.to/2efNoBP)
|
||||
## [433Mhz Transmitter and receiver](http://amzn.to/2dceNY2)
|
||||
#####################################################################################
|
||||
|
||||
- alias: Kitchen lights on - Accent lights off
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: group.kitchen_lights
|
||||
to: 'on'
|
||||
for: '00:05:00'
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: switch.kitchen_accents
|
||||
state: 'on'
|
||||
|
||||
action:
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.kitchen_accents
|
||||
|
||||
##############################################################################
|
||||
|
||||
- alias: Kitchen lights off - turn on Accent lights
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: group.kitchen_lights
|
||||
to: 'off'
|
||||
for: '00:05:00'
|
||||
- platform: state
|
||||
entity_id: sun.sun
|
||||
to: 'below_horizon'
|
||||
from: 'above_horizon'
|
||||
|
||||
condition:
|
||||
- condition: sun
|
||||
after: 'sunset'
|
||||
- condition: state
|
||||
entity_id: group.kitchen_lights
|
||||
state: 'off'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.sleepnumber_carlo_carlo_is_in_bed
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.sleepnumber_carlo_stacey_is_in_bed
|
||||
state: 'off'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: group.family
|
||||
state: 'home'
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: 'on'
|
||||
|
||||
action:
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.kitchen_accents
|
46
config/automation/late_night_helper.yaml
Executable file
46
config/automation/late_night_helper.yaml
Executable file
@@ -0,0 +1,46 @@
|
||||
###################################
|
||||
## Late Night lights Section
|
||||
# @CCOSTAN
|
||||
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
||||
###################################
|
||||
- alias: 'Late Night Helper'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.downstairs_away_mode
|
||||
to: 'False'
|
||||
- platform: state
|
||||
entity_id: group.family
|
||||
to: home
|
||||
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
state: 'below_horizon'
|
||||
- condition: state
|
||||
entity_id: group.bed
|
||||
state: 'off'
|
||||
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- light.living_room_slider
|
||||
- light.foyer_door
|
||||
- light.fridge
|
||||
- light.M1_front_right
|
||||
- light.S1
|
||||
- light.S4
|
||||
- service: switch.turn_on
|
||||
entity_id:
|
||||
- switch.kitchen_accents
|
||||
- delay: '00:05:00'
|
||||
- service: light.turn_off
|
||||
entity_id:
|
||||
- light.S1
|
||||
- light.S4
|
||||
- light.foyer_door
|
||||
- light.fridge
|
||||
- light.living_room_slider
|
||||
- light.M1_front_right
|
59
config/automation/late_night_outside_helper.yaml
Executable file
59
config/automation/late_night_outside_helper.yaml
Executable file
@@ -0,0 +1,59 @@
|
||||
###################################
|
||||
## Late Night lights Section
|
||||
# @CCOSTAN
|
||||
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
||||
###################################
|
||||
- alias: 'Late Night Helper outside'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: group.all_covers
|
||||
to: 'open'
|
||||
- platform: state
|
||||
entity_id: sun.sun
|
||||
to: 'below_horizon'
|
||||
from: 'above_horizon'
|
||||
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
state: 'below_horizon'
|
||||
- condition: state
|
||||
entity_id: group.all_covers
|
||||
state: 'open'
|
||||
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.front_full_brightness
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- group.living_room_accents
|
||||
data_template:
|
||||
color_name: >
|
||||
{% if states.group.entry_points.state == 'on' or states.group.all_covers.state != 'closed' -%}
|
||||
red
|
||||
{% else %}
|
||||
gold
|
||||
{% endif %}
|
||||
- service: switch.turn_on
|
||||
entity_id:
|
||||
- switch.master_bathroom_accents
|
||||
- switch.back_landscaping
|
||||
- switch.front_door_outlet
|
||||
- switch.living_room_outlet
|
||||
- switch.den_outlet
|
||||
- switch.foyer_outlet
|
||||
- wait_template: >-
|
||||
{{ states.group.garage_doors.state == 'closed' }}
|
||||
- service: script.monthly_color_scene
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- group.living_room_accents
|
||||
data_template:
|
||||
color_name: >
|
||||
{% if states.group.entry_points.state == 'on' or states.group.all_covers.state != 'closed' -%}
|
||||
red
|
||||
{% else %}
|
||||
gold
|
||||
{% endif %}
|
41
config/automation/master_bath_accents.yaml
Executable file
41
config/automation/master_bath_accents.yaml
Executable file
@@ -0,0 +1,41 @@
|
||||
#####################################################################################
|
||||
### When we get out of bed at night, turn on the accent lights in the bathroom
|
||||
## and then turn off the lights when we are back in bed.
|
||||
## Also turn on the lights sunset comes. (but only if we are home)
|
||||
### connected to [Etekcity Outlets](http://amzn.to/2efNoBP)
|
||||
## [433Mhz Transmitter and receiver](http://amzn.to/2dceNY2)
|
||||
#####################################################################################
|
||||
|
||||
- alias: Bedtime Accent Light
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.sleepnumber_carlo_carlo_is_in_bed
|
||||
- binary_sensor.sleepnumber_carlo_stacey_is_in_bed
|
||||
to: 'off'
|
||||
- platform: state
|
||||
entity_id: sun.sun
|
||||
to: 'below_horizon'
|
||||
from: 'above_horizon'
|
||||
- platform: state
|
||||
entity_id: group.family
|
||||
from: 'not_home'
|
||||
to: 'home'
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
state: 'below_horizon'
|
||||
- condition: state
|
||||
entity_id: group.family
|
||||
state: 'home'
|
||||
|
||||
action:
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.master_bathroom_accents
|
||||
- wait_template: >-
|
||||
{{ not is_state('binary_sensor.sleepnumber_carlo_stacey_is_in_bed', 'off') }}
|
||||
- wait_template: >-
|
||||
{{ not is_state('binary_sensor.sleepnumber_carlo_carlo_is_in_bed', 'off') }}
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.master_bathroom_accents
|
21
config/automation/mealtime.yaml
Executable file
21
config/automation/mealtime.yaml
Executable file
@@ -0,0 +1,21 @@
|
||||
######################################################################
|
||||
## Time to eat - Set it up!
|
||||
######################################################################
|
||||
|
||||
- alias: Meal Time
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.meal_time
|
||||
to: 'on'
|
||||
from: 'off'
|
||||
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- group.dinette_lights
|
||||
- group.kitchen_lights
|
||||
- service: light.turn_off
|
||||
entity_id:
|
||||
- group.living_room_lights
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.meal_time
|
37
config/automation/medicine_logger.yaml
Executable file
37
config/automation/medicine_logger.yaml
Executable file
@@ -0,0 +1,37 @@
|
||||
###################################
|
||||
## LOG Medicine
|
||||
###################################
|
||||
- alias: 'Log Medicine Activity'
|
||||
hide_entity: True
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: medicine_dash
|
||||
- platform: state
|
||||
entity_id: input_boolean.medicine
|
||||
to: 'on'
|
||||
from: 'off'
|
||||
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.medicine
|
||||
- service: automation.turn_off
|
||||
entity_id: automation.log_medicine_activity
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "Medicine Push"
|
||||
message: "Took Medicine today."
|
||||
|
||||
- service: mqtt.publish
|
||||
data_template:
|
||||
payload: '{{ states("sensor.date") }}'
|
||||
topic: 'dash/medicine/medicine_time'
|
||||
retain: true
|
||||
|
||||
- service: script.notify_engine
|
||||
data_template:
|
||||
value1: 'Took Medicine today.'
|
||||
who: "parents"
|
||||
- delay:
|
||||
minutes: 1
|
||||
- service: automation.turn_on
|
||||
entity_id: automation.log_medicine_activity
|
53
config/automation/tv_time_on_and_off.yaml
Executable file
53
config/automation/tv_time_on_and_off.yaml
Executable file
@@ -0,0 +1,53 @@
|
||||
######################################################################
|
||||
## TV Time at sunset or 8pm. Whichever is later.
|
||||
######################################################################
|
||||
|
||||
- alias: TV Time
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.TV_time
|
||||
to: 'on'
|
||||
from: 'off'
|
||||
- platform: state
|
||||
entity_id: sun.sun
|
||||
to: 'below_horizon'
|
||||
from: 'above_horizon'
|
||||
- platform: state
|
||||
entity_id: media_player.living_room_ultra
|
||||
to: 'playing'
|
||||
from: 'idle'
|
||||
- platform: time
|
||||
at: '20:00:00'
|
||||
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: group.family
|
||||
state: home
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
state: 'below_horizon'
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: 'off'
|
||||
- condition: time
|
||||
after: '20:00:00'
|
||||
- condition: state
|
||||
entity_id: media_player.living_room_ultra
|
||||
state: 'playing'
|
||||
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.tv_time
|
||||
|
||||
- service: light.turn_off
|
||||
entity_id:
|
||||
- group.dinette_lights
|
||||
- group.kitchen_lights
|
||||
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.kitchen_accents
|
||||
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.tv_time
|
32
config/automation/upstairs_motion_ifttt.yaml
Executable file
32
config/automation/upstairs_motion_ifttt.yaml
Executable file
@@ -0,0 +1,32 @@
|
||||
# Uses the Nest thermostat to turn on lights and turn them off upstairs.
|
||||
|
||||
- alias: 'Upstairs Light Turn on'
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: upstairs_light_on
|
||||
- platform: state
|
||||
entity_id: binary_sensor.upstairs_away_mode
|
||||
to: 'False'
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
state: 'below_horizon'
|
||||
- condition: time
|
||||
before: '23:45'
|
||||
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: group.upstairs
|
||||
|
||||
- alias: 'Upstairs Light Turn off'
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: upstairs_light_off
|
||||
- platform: state
|
||||
entity_id: binary_sensor.upstairs_away_mode
|
||||
to: 'True'
|
||||
|
||||
action:
|
||||
service: light.turn_off
|
||||
entity_id: group.upstairs
|
22
config/automation/work.yaml
Executable file
22
config/automation/work.yaml
Executable file
@@ -0,0 +1,22 @@
|
||||
######################################################################
|
||||
## Time to work - Set it up!
|
||||
######################################################################
|
||||
|
||||
- alias: Time to Work
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.work
|
||||
to: 'on'
|
||||
from: 'off'
|
||||
|
||||
action:
|
||||
- service: light.turn_off
|
||||
entity_id:
|
||||
- group.dinette_lights
|
||||
- group.kitchen_lights
|
||||
- group.living_room_lights
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- light.office_lamp
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.work
|
73
config/automation/zwave_hallway_door_sensor.yaml
Executable file
73
config/automation/zwave_hallway_door_sensor.yaml
Executable file
@@ -0,0 +1,73 @@
|
||||
###################################
|
||||
## ZWave Section -
|
||||
## Home Assistant runs on my [Raspberry Pi 3](http://amzn.to/2e3DOBY) with [Aeon Labs Z Wave Stick (GEN 5)](http://amzn.to/2eAiAP0).
|
||||
###################################
|
||||
|
||||
##############################################################
|
||||
- alias: Hallway ZWave Enerwave Door Sensors Open
|
||||
hide_entity: True
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.hallway_pantry_opened
|
||||
to: 'on'
|
||||
- platform: state
|
||||
entity_id: binary_sensor.hallway_linen_opened
|
||||
to: 'on'
|
||||
|
||||
condition:
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: sun
|
||||
after: sunset
|
||||
after_offset: '-03:00:00'
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.dark_sky_cloud_coverage
|
||||
above: 50
|
||||
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- light.kids_hallway
|
||||
- light.k4
|
||||
- delay: 00:20:00
|
||||
- service: light.turn_off
|
||||
entity_id: light.kids_hallway
|
||||
|
||||
##############################################################
|
||||
- alias: ZWave Enerwave Door Sensors Closed
|
||||
hide_entity: True
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.hallway_pantry_opened
|
||||
to: 'off'
|
||||
- platform: state
|
||||
entity_id: binary_sensor.hallway_linen_opened
|
||||
to: 'off'
|
||||
|
||||
action:
|
||||
service: light.turn_off
|
||||
entity_id: light.kids_hallway
|
||||
|
||||
##############################################################
|
||||
- alias: Shutdown Helper light
|
||||
hide_entity: True
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: light.k4
|
||||
to: 'on'
|
||||
for: '00:20:00'
|
||||
- platform: state
|
||||
entity_id: binary_sensor.hallway_pantry_opened
|
||||
to: 'off'
|
||||
- platform: state
|
||||
entity_id: binary_sensor.hallway_linen_opened
|
||||
to: 'off'
|
||||
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: light.k1
|
||||
state: 'off'
|
||||
|
||||
action:
|
||||
- service: light.turn_off
|
||||
entity_id: light.k4
|
Reference in New Issue
Block a user