roles/homeassistant: Deploy Home Assistant

This commit introduces a *homeassistant* role that installs and sets up
Home Assistant using `pip`.
This commit is contained in:
2019-03-05 18:27:37 -06:00
parent f002da86ef
commit 960528c001
7 changed files with 142 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: 38.9568
longitude: -94.6832
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 0
# 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/Chicago
# Customization file
customize: !include customize.yaml
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Show the introduction message on startup.
introduction:
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
# base_url: example.duckdns.org:8123
http:
server_host: '::1'
# Sensors
sensor: !include sensors.yaml
# Text to speech
tts:
- platform: google
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

View File

@@ -0,0 +1,13 @@
ProxyPreserveHost On
ProxyRequests Off
ProxyPass /api/websocket ws://localhost:8123/api/websocket
ProxyPassReverse /api/websocket ws://localhost:8123/api/websocket
ProxyPass / http://localhost:8123/
ProxyPassReverse / http://localhost:8123/
RewriteEngine on
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://localhost:8123/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*) http://localhost:8123/$1 [P,L]