Created
December 24, 2016 11:29
-
-
Save schollz/c37177fb118c47a42f3b9f1e09485c5f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
homeassistant: | |
# Name of the location where Home Assistant is running | |
name: Home | |
# Location required to calculate the time the sun rises and sets | |
latitude: 36.0378 | |
longitude: -78.9858 | |
# Impacts weather/sunrise data (altitude above sea level in meters) | |
elevation: 143 | |
# metric for Metric, imperial for Imperial | |
unit_system: imperial | |
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones | |
time_zone: America/New_York | |
customize: | |
script.timed_office_on: | |
hidden: true | |
script.timed_office_off: | |
hidden: true | |
automation.in_office: | |
hidden: true | |
automation.leave_office: | |
hidden: true | |
automation.in_bedroom: | |
hidden: true | |
automation.leave_bedroom: | |
hidden: true | |
# Enables the frontend | |
frontend: | |
http: | |
# Uncomment this to add a password (recommended!) | |
# api_password: PASSWORD | |
# Uncomment this if you are using SSL or running in Docker etc | |
server_port: 8124 | |
# Checks for available updates | |
updater: | |
# # Discover some devices automatically | |
# discovery: | |
# # Allows you to issue voice commands from the frontend in enabled browsers | |
# conversation: | |
# Enables support for tracking state changes over time. | |
history: | |
# View all events in a logbook | |
logbook: | |
# Track the sun | |
sun: | |
mqtt: | |
broker: ml.internalpositioning.com | |
port: 1883 | |
keepalive: 60 | |
username: YOURGROUP | |
password: YOURMQTTPASSWORD | |
protocol: 3.1 | |
logger: | |
default: debug | |
sensor: | |
- platform: yr # Weather Prediction | |
- platform: mqtt | |
state_topic: 'YOURGROUP/location/YOURUSER' | |
name: zack_location | |
value_template: '{{ value_json.location }}' | |
- platform: mqtt | |
state_topic: 'YOURGROUP/location/YOURANOTHERUSER' | |
name: zack2_location | |
value_template: '{{ value_json.location }}' | |
automation: | |
- alias: 'In office' | |
trigger: | |
- platform: state | |
entity_id: sensor.zack_location | |
to: "office" | |
- platform: state | |
entity_id: sensor.zack2_location | |
to: "office" | |
action: | |
- service: switch.turn_on | |
data: | |
entity_id: switch.office | |
- alias: 'Leave office' | |
trigger: | |
- platform: state | |
entity_id: sensor.zack_location | |
from: "office" | |
- platform: state | |
entity_id: sensor.zack2_location | |
from: "office" | |
action: | |
- service: switch.turn_off | |
data: | |
entity_id: switch.office | |
- alias: 'In bedroom' | |
trigger: | |
- platform: state | |
entity_id: sensor.zack_location | |
to: "bedroom" | |
- platform: state | |
entity_id: sensor.zack2_location | |
to: "bedroom" | |
action: | |
- service: switch.turn_on | |
data: | |
entity_id: switch.bedroom | |
- alias: 'Leave bedroom' | |
trigger: | |
- platform: state | |
entity_id: sensor.zack_location | |
from: "bedroom" | |
- platform: state | |
entity_id: sensor.zack2_location | |
from: "bedroom" | |
action: | |
- service: switch.turn_off | |
data: | |
entity_id: switch.bedroom | |
group: | |
Switches: | |
- switch.office | |
- switch.bedroom | |
switch: | |
- platform: command_line | |
switches: | |
office: | |
command_on: "echo 'office on' > test.txt" | |
command_off: "echo 'office off' > test.txt" | |
bedroom: | |
command_on: "echo 'bedroom on' > test.txt" | |
command_off: "echo 'bedroom off' > test.txt" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment