Skip to content

Instantly share code, notes, and snippets.

@Cribstone
Created November 18, 2015 21:35
Show Gist options
  • Save Cribstone/b958168e71232566c901 to your computer and use it in GitHub Desktop.
Save Cribstone/b958168e71232566c901 to your computer and use it in GitHub Desktop.
Configuration.yaml - Home Assistant.io
homeassistant:
# Name of the location where Home Assistant is running
name: GooseCreek
# Location required to calculate the time the sun rises and sets
latitude: [REDACTED]
longitude: [REDACTED]
# C for Celcius, F for Fahrenheit
temperature_unit: F
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: America/New_York
customize:
thermostat.upstairs:
hidden: true
thermostat.downstairs:
hidden: true
thermostat.family_roomfamily_room:
entity_picture: https://dl.dropboxusercontent.com/u/81386/HA-Stuff/nest.jpg
friendly_name: 'Nest'
sensor.weather_precip_intensity:
friendly_name: 'Rainfall'
entity_picture: https://dl.dropboxusercontent.com/u/81386/HA-Stuff/rain-icon.jpg
sensor.weather_humidity:
friendly_name: 'Outdoor Humidity'
entity_picture: https://dl.dropboxusercontent.com/u/81386/HA-Stuff/humidity.png
sensor.weather_temperature:
friendly_name: 'Outdoor Temp'
sensor.weather_summary:
entity_picture: https://dl.dropboxusercontent.com/u/81386/HA-Stuff/weather-icon.jpg
script.timed_lamp:
hidden: true
script.timer_off:
hidden: true
scene.rainy_day_off:
hidden: true
scene.home_late_helper:
hidden: true
scene.early_morning_phase_1:
hidden: true
scene.early_morning_phase_2:
hidden: true
http:
api_password: [REDACTED]
discovery:
ifttt:
key: [REDACTED]
device_tracker:
platform: nmap_tracker
hosts: 192.168.10.100-250
# home_interval: 30
track_new_devices: no
# consider_home will be the number of seconds to wait till marking someone as not home after not being seen on scans.
# 900 seconds = 15 minutes
consider_home: 1800
frontend:
#conversation:
history:
logbook:
sun:
sensor:
platform: forecast
api_key: [REDACTED]
monitored_conditions:
- summary
# - precip_type
- precip_intensity
- temperature
# - dew_point
# - wind_speed
# - wind_bearing
# - cloud_cover
- humidity
# - pressure
# - visibility
# - ozone
#sensor:
# - platform: systemmonitor
# resources:
# - type: disk_use_percent
# arg: /home
# - type: memory_free
# - type: processor_use
thermostat:
platform: nest
username: [REDACTED]
password: [REDACTED]
#wink:
# access_token: [REDACTED]
# refresh_token: [REDACTED]
light:
platform: hue
# scrubbed Data ABOVE - Paste changing config below here:
#################################################################
## Groups
#################################################################
# A comma separated list of states that have to be tracked as a single group
# Grouped states should share the same type of states (ON/OFF or HOME/NOT_HOME)
group:
_GooseCreek Home:
- group.living_room
- group.kitchen_fan
- group.bedroom
- scene.rainy_day_lights
- scene.tv_time
Living Room:
- light.couch_front
- light.couch_back
- light.couch_lamp
Kitchen Fan:
- scene.kitchen_full_bright
- light.fan_bulb_1
- light.fan_bulb_2
- light.fan_bulb_3
Bedroom:
- light.bedroom_lamp
Family:
- device_tracker.carlo
- device_tracker.stacey
- device_tracker.franco
- device_tracker.yolanda
Devices:
- device_tracker.hue_hub
- device_tracker.tablo_tv
- device_tracker.iphone4
#################################################################
## Scenes
#################################################################
scene:
- name: 'Rainy Day Lights'
entities:
light.couch_back:
state: on
brightness: 255
light.couch_front:
state: on
brightness: 100
- name: 'Rainy Day off' # Hidden Scene
entities:
light.couch_back: off
light.couch_front: off
- name: 'TV Time'
entities:
light.couch_lamp:
state: on
brightness: 100
light.couch_back:
state: on
brightness: 100
light.couch_front:
state: on
brightness: 25
- name: 'Kitchen Full Bright'
entities:
light.fan_bulb_1:
state: on
brightness: 255
light.fan_bulb_2:
state: on
brightness: 255
light.fan_bulb_3:
state: on
brightness: 255
- name: 'Home Late Helper'
entities:
light.fan_bulb_1:
state: on
brightness: 255
- name: 'Early Morning Phase 1'
entities:
light.couch_lamp:
state: on
brightness: 150
- name: 'Early Morning Phase 2'
entities:
light.fan_bulb_1:
state: on
brightness: 150
#################################################################
## Automations
#################################################################
automation:
- alias: 'Rainy Day'
trigger:
- platform: state
entity_id: group.family
state: 'home'
- platform: state
entity_id: sun.sun
state: 'above_horizon'
- platform: numeric_state
# One of the next values has to be defined
entity_id: sensor.weather_precip_intensity
above: 3
condition: use_trigger_values
action:
service: scene.turn_on
entity_id: scene.rainy_day_lights
- alias: 'Rain is over'
trigger:
- platform: numeric_state
entity_id: sensor.weather_precip_intensity
# One of the next values has to be defined above: 0.1
below: 1
condition:
- platform: state
entity_id: sun.sun
state: 'above_horizon'
action:
service: scene.turn_on
entity_id: scene.rainy_day_off
- alias: 'Sunset Lights Phase 1'
trigger:
- platform: sun
event: 'sunset'
offset: '-00:45:00'
condition:
- platform: state
entity_id: group.family
state: 'home'
action:
service: light.turn_on
entity_id: light.couch_lamp
data:
# 900 seconds = 15 minutes
transition: 2700
brightness: 255
- alias: 'Sunset Lights Phase 2'
trigger:
- platform: sun
event: 'sunset'
offset: '-00:29:00'
condition:
- platform: state
entity_id: group.family
state: 'home'
action:
service: light.turn_on
entity_id: group.living_room
data:
# 900 seconds = 15 minutes
transition: 1800
brightness: 255
- alias: 'Sunset Lights - Away'
trigger:
- platform: state
entity_id: group.family
state: 'not_home'
- platform: state
entity_id: sun.sun
state: 'below_horizon'
condition:
- platform: state
entity_id: group.family
state: 'not_home'
- platform: state
entity_id: sun.sun
state: 'below_horizon'
- platform: time
before: '23:59'
action:
service: light.turn_on
entity_id: light.couch_lamp
data:
# 900 seconds = 15 minutes
transition: 1800
brightness: 150
- alias: 'Home Late'
trigger:
- platform: state
entity_id: group.family
state: 'home'
- platform: time
after: '20:00'
condition:
- platform: state
entity_id: sun.sun
state: 'below_horizon'
- platform: time
before: '23:59'
- platform: state
entity_id: group.family
state: 'home'
action:
service: scene.turn_on
entity_id: scene.tv_time
- alias: 'Home Late Helper'
# This event is triggered by the ManyThing Motion detection and an IFTTT Maker recipe.
# Turns on the kithen light for 10 minutes while there is motion detected in garage. (from Manything)
trigger:
- platform: event
event_type: 'motion_detected'
condition_type: or
condition:
- platform: time
before: '05:00'
- platform: time
after: '20:00'
action:
service: homeassistant.turn_on
entity_id: script.timed_lamp
- alias: 'Sunrise Bedroom Lamp'
trigger:
- platform: sun
event: 'sunrise'
offset: '+01:00:00'
condition:
- platform: state
entity_id: group.family
state: 'home'
action:
service: light.turn_on
entity_id: light.bedroom_lamp
data:
# 900 seconds = 15 minutes
transition: 2700
brightness: 255
- alias: 'GoodNight - Away Mode'
# There is also an IFTTT reipe that shuts down all lights when Nest goes into Away mode. - event_type= Good_Night
trigger:
- platform: state
entity_id: group.family
state: 'not_home'
- platform: event
event_type: 'good_night'
action:
service: light.turn_off
entity_id: group.all_lights
- alias: 'Kitchen 100%'
# This will watch for when ALL 3 Kitchen Fan bulbs turn on and then set them to 100% Birghtness.
trigger:
- platform: state
entity_id: light.fan_bulb_1
from: 'off'
to: 'on'
- platform: state
entity_id: light.fan_bulb_2
from: 'off'
to: 'on'
- platform: state
entity_id: light.fan_bulb_2
from: 'off'
to: 'on'
condition:
- platform: state
entity_id: light.fan_bulb_1
state: on
- platform: state
entity_id: light.fan_bulb_2
state: on
- platform: state
entity_id: light.fan_bulb_3
state: on
action:
service: scene.turn_on
entity_id: scene.kitchen_full_bright
- alias: 'Early Morning Lights'
trigger:
- platform: time
after: '06:50'
condition:
- platform: state
entity_id: light.couch_lamp
state: 'on'
action:
service: scene.turn_on
entity_id: scene.early_morning_phase_2
#################################################################
## IFTTT Manything Automations
#################################################################
- alias: 'ManyThing Recording ON'
# This calls an IFTTT recipe to turn on recording of the ManyThing Camera (iPhone) when we leave the house during the day.
trigger:
- platform: state
entity_id: group.family
state: 'not_home'
condition:
- platform: state
entity_id: sun.sun
state: 'above_horizon'
action:
service: ifttt.trigger
data: {"event":"manything_on"}
- alias: 'ManyThing Recording ON - NightTime'
# This calls an IFTTT recipe to turn on recording of the ManyThing Camera (iPhone) for the night.
trigger:
- platform: state
entity_id: group.family
state: 'home'
- platform: state
entity_id: sun.sun
state: 'below_horizon'
condition:
- platform: state
entity_id: sun.sun
state: 'below_horizon'
action:
service: ifttt.trigger
data: {"event":"manything_on"}
- alias: 'ManyThing Recording OFF'
# This calls an IFTTT recipe to turn off recording of the ManyThing Camera (iPhone) when we are home unless it's nighttime.
trigger:
- platform: state
entity_id: group.family
state: 'home'
- platform: state
entity_id: sun.sun
state: 'above_horizon'
condition: use_trigger_values
action:
service: ifttt.trigger
data: {"event":"manything_off"}
#################################################################
## Dash Button Automations
#################################################################
- alias: 'Dash ON Button Pressed - Morning'
trigger:
- platform: event
event_type: 'on_button_pressed'
condition:
- platform: state
entity_id: sun.sun
state: 'below_horizon'
- platform: time
after: '05:00'
before: '12:00'
action:
service: scene.turn_on
entity_id: scene.early_morning_phase_1
- alias: 'Dash ON Button Pressed - Middle Time'
trigger:
- platform: event
event_type: 'on_button_pressed'
condition:
- platform: state
entity_id: sun.sun
state: 'above_horizon'
action:
service: light.turn_on
entity_id: group.all_lights
data:
flash: "long"
- alias: 'Dash ON Button Pressed - Night Time'
trigger:
- platform: event
event_type: 'on_button_pressed'
condition:
- platform: state
entity_id: sun.sun
state: 'below_horizon'
- platform: time
before: '04:59'
action:
service: light.turn_off
entity_id: group.all_lights
data:
transition: 180
- alias: 'Dash ON Button Pressed - Bed Time'
trigger:
- platform: event
event_type: 'on_button_pressed'
condition:
- platform: state
entity_id: sun.sun
state: 'below_horizon'
- platform: time
after: '20:00'
action:
service: light.turn_off
entity_id: group.all_lights
data:
transition: 180
#################################################################
## Scripts
#################################################################
script:
timed_lamp:
alias: "Turn on light and set timer"
sequence:
- execute_service: scene.turn_on
service_data:
entity_id: light.fan_bulb_1
brightness: 255
# Set new timer
- execute_service: script.turn_on
service_data:
entity_id: script.timer_off
timer_off:
alias: "Turn off lamp after 10 minutes"
sequence:
- delay:
minutes: 1
- execute_service: light.turn_off
service_data:
entity_id: light.fan_bulb_1
transition: 500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment