@@ -1,9 +1,10 @@ | |||
================================== | |||
Home Assistant | |||
================================== | |||
====================== | |||
Home Assistant formula | |||
====================== | |||
Home Assistant is an open-source home automation platform running on Python 3. Track and control all devices at home and automate control. | |||
Home Assistant is an open-source home automation platform running on Python 3. | |||
Track and control all devices at home and automate control. | |||
Sample pillars | |||
============== | |||
@@ -19,11 +20,28 @@ Single homeassistant service | |||
address: 0.0.0.0 | |||
port: 8123 | |||
Read more | |||
========= | |||
home-assistant service wit git based configuration | |||
.. code-block:: yaml | |||
home_assistant: | |||
server: | |||
enabled: true | |||
bind: | |||
address: 0.0.0.0 | |||
port: 8123 | |||
config: | |||
engine: git | |||
address: '${_param:home_assistant_config_repository}' | |||
branch: ${_param:home_assistant_config_revision} | |||
More information | |||
================ | |||
* https://home-assistant.io/getting-started/ | |||
Documentation and Bugs | |||
====================== | |||
@@ -1,3 +1,5 @@ | |||
{%- set service = salt['pillar.get']('supervisor:server:service:'+service_name) %} | |||
{%- from "home_assistant/map.jinja" import server with context %} | |||
[program:home_assistant_server] | |||
command=/srv/home_assistant/bin/hass --config /etc/home_assistant/ | |||
@@ -11,4 +13,4 @@ redirect_stderr=true | |||
stdout_logfile=/var/log/home_assistant/home_assistant.log | |||
stdout_logfile_maxbytes=1MB | |||
stdout_logfile_backups=10 | |||
user=home_assistant | |||
user={{ server.user }} |
@@ -5,8 +5,14 @@ Debian: | |||
pkgs: | |||
- python3-dev | |||
- python3-pip | |||
bind: | |||
address: 0.0.0.0 | |||
port: 8123 | |||
dir: | |||
base: /srv/home_assistant | |||
config: | |||
engine: local | |||
user: home_assistant | |||
{%- endload %} | |||
{%- set server = salt['grains.filter_by'](base_defaults, merge=salt['pillar.get']('home_assistant:server')) %} |
@@ -32,6 +32,29 @@ home_assistant_dir: | |||
- require: | |||
- virtualenv: {{ server.dir.base }} | |||
{%- if server.config.engine == 'git' %} | |||
home_assistant_config: | |||
git.latest: | |||
- name: {{ server.config.address }} | |||
- target: /etc/home_assistant | |||
- rev: {{ server.config.revision|default(server.config.branch) }} | |||
{%- if grains.saltversion >= "2015.8.0" %} | |||
- branch: {{ server.config.branch|default(server.config.revision) }} | |||
{%- endif %} | |||
- force_reset: {{ server.config.force_reset|default(False) }} | |||
{%- else %} | |||
home_assistant_config_dir: | |||
file.directory: | |||
- name: /etc/home_assistant | |||
- mode: 700 | |||
- makedirs: true | |||
- user: home_assistant | |||
- require: | |||
- virtualenv: {{ server.dir.base }} | |||
home_assistant_config: | |||
file.managed: | |||
- name: /etc/home_assistant/configuration.yaml | |||
@@ -40,7 +63,7 @@ home_assistant_config: | |||
- user: home_assistant | |||
- mode: 600 | |||
- require: | |||
- file: home_assistant_dir | |||
- file: home_assistant_config_dir | |||
{%- if server.known_device is defined %} | |||
@@ -56,4 +79,6 @@ home_assistant_know_devices: | |||
{%- endif %} | |||
{%- endif %} | |||
{%- endif %} |
@@ -0,0 +1,26 @@ | |||
parameters: | |||
home_assistant: | |||
server: | |||
# Name of the location where Home Assistant is running | |||
name: Home | |||
# Location required to calculate the time the sun rises and sets | |||
latitude: 50.0 | |||
longitude: 14.4 | |||
# C for Celcius, F for Fahrenheit | |||
temperature_unit: C | |||
time_zone: Europe/Prague | |||
plugin: | |||
# View all events in a logbook | |||
logbook: | |||
# Discover some devices automatically | |||
discovery: | |||
# Enables support for tracking state changes over time. | |||
history: | |||
# Checks for available updates | |||
updater: | |||
# Enables the frontend | |||
frontend: | |||
# Allows you to issue voice commands from the frontend | |||
conversation: | |||
# Track the sun | |||
sun: |
@@ -9,26 +9,3 @@ parameters: | |||
bind: | |||
address: 0.0.0.0 | |||
port: 8123 | |||
# Name of the location where Home Assistant is running | |||
name: Home | |||
# Location required to calculate the time the sun rises and sets | |||
latitude: 50.0 | |||
longitude: 14.4 | |||
# C for Celcius, F for Fahrenheit | |||
temperature_unit: C | |||
time_zone: Europe/Prague | |||
plugin: | |||
# View all events in a logbook | |||
logbook: | |||
# Discover some devices automatically | |||
discovery: | |||
# Enables support for tracking state changes over time. | |||
history: | |||
# Checks for available updates | |||
updater: | |||
# Enables the frontend | |||
frontend: | |||
# Allows you to issue voice commands from the frontend | |||
conversation: | |||
# Track the sun | |||
sun: |