Teagan Glenn
that@teagantotally.rocks
Teagan42
Denver Devs Slack: Teagan42
Enough Said
pip3 install homeassistant
hass --open-ui
homeassistant:
name: Home Assistant
latitude: 39.6323225
longitude: -105.131914
temperature_unit: F
time_zone: America/Denver
sun:
frontend:
# Configuration
sensor:
platform: forecast
api_key: {{YOUR KEY}}
monitored_conditions:
- precip_intensity
sensor:
platform: openweathermap
api_key: {{YOUR KEY}}
forecast: 0 or 1 # Current or Forecast
monitored_conditions:
- rain
sensor:
platform: yr
monitored_conditions:
- precipitation
# Configuration
switch:
platform: rpi_gpio
ports:
4: Zone 1
11: Zone 2
12: Zone 3
# Etc.
invert_logic: false
# Trigger
alias: 'Zone 1'
trigger:
platform: time
hours: '/8'
minutes: 0
condition:
condition: numeric_state
entity_id: sensor.weather_precip_intensity
below: 1
action:
service: switch.turn_on
data:
entity_id: switch.zone_1
# Is Not Raining
alias: 'Timer - Not Raining'
trigger:
platform: state
entity_id:
- switch.zone_1
- switch.zone_2
- switch.zone_3
state: 'on'
for:
minutes: 15
action:
service: switch.turn_off
data_template:
entity_id: '{{ trigger.entity_id }}'
# Is Raining
alias: 'Timer - Raining'
trigger:
platform: state
entity_id:
- switch.zone_1
- switch.zone_2
- switch.zone_3
state: 'on'
for:
minutes: 5
condition:
condition: numeric_state
entity_id: sensor.weather_precip_intensity
above: 1
action:
service: switch.turn_off
data_template:
entity_id: '{{ trigger.entity_id }}'
alias: 'Intruder Alert'
trigger:
platform: state
entity_id: group.door_sensors
from: 'off'
to: 'on'
condition:
condition: state
entity_id: group.family
state: 'not_home'
action:
service: script.intruder_alert
sequence:
- service: notify.aws_sns
data_template:
message: >
Someone is in the house.
http://domain{{ camera.entry.attributes.entity_picture }}
target: 'aws:arn:important'
title: 'Possible Intruder Detected'
- service: light.turn_on
entity_id: light.all_lights
alias: 'Thermostat - Occupied - Cool'
trigger:
platform: template
value_template: >
{{
(float(states.thermostat.main.attributes.current_temperature) > 77
or (
states.thermostat.main.attributes.system_mode == 'cool' and
float(states.thermostat.main.state) != 77
))
and group.family.state == 'home'
}}
action:
- service: thermostat.set_hvac_mode
data:
entity_id: thermostat.main
hvac_mode: 'cool'
- service: thermostat.set_temperature
data:
entity_id: thermostat.main
temperature: 77
alias: 'Thermostat - Away - Cool'
trigger:
platform: template
value_template: >
{{
(float(states.thermostat.main.attributes.current_temperature) > 82
or (
states.thermostat.main.attributes.system_mode == 'cool' and
float(states.thermostat.breathosmart.state) != 82
))
and group.family.state != 'home'
}}
action:
- service: thermostat.set_hvac_mode
data:
entity_id: thermostat.main
hvac_mode: 'cool'
- service: thermostat.set_temperature
data:
entity_id: thermostat.main
temperature: 82
alias: 'Thermostat - Occupied - Heat'
trigger:
platform: template
value_template: >
{{
(float(states.thermostat.main.attributes.current_temperature) < 69
or (
states.thermostat.main.attributes.system_mode == 'heat' and
float(states.thermostat.main.state) != 69
))
and group.family.state == 'home'
}}
action:
- service: thermostat.set_hvac_mode
data:
entity_id: thermostat.main
hvac_mode: 'heat'
- service: thermostat.set_temperature
data:
entity_id: thermostat.main
temperature: 69
alias: 'Thermostat - Away - Heat'
trigger:
platform: template
value_template: >
{{
(float(states.thermostat.main.attributes.current_temperature) < 65
or (
states.thermostat.main.attributes.system_mode == 'heat' and
float(states.thermostat.main.state) != 65
))
and group.family.state != 'home'
}}
action:
- service: thermostat.set_hvac_mode
data:
entity_id: thermostat.main
hvac_mode: 'heat'
- service: thermostat.set_temperature
data:
entity_id: thermostat.main
temperature: 65
alias: 'Movie Mode'
trigger:
platform: state
entity_id: media_player.default
from: 'idle'
to: 'playing'
action:
- service: script.movie_mode
sequence:
- service: light.turn_off
data:
entity_id: light.living_room
- service: light.turn_on
data:
entity_id: light.floorboards
- condition: state
entity_id: input_boolean.should_make_popcorn
state: 'on'
- service: switch.turn_on
data:
entity_id: switch.popcorn_machine
- service: input_boolean.turn_off
data:
entity_id: input_boolean.should_make_popcorn
- service: notify.aws_sns
data:
message: 'Your popcorn will be ready shortly.'
target: 'aws:arn:address'
title: 'Movie Time!'
- delay: 00:05:00
- service: switch.turn_off
data:
entity_id: switch.popcorn_machine
No Problem!
The API used to talk to the physical device.
The representation of your physical device inside Home-Assistant.io
The type or category of a component
Home Assitant
http://home-assistant.io
Jinga2 Templates
http://jinja.pocoo.org/
Alexa Skills
https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit
Home Assistant Help Chat Room
https://gitter.im/home-assistant/home-assistant