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:
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
|
Reference in New Issue
Block a user