- 2015-02-25T18:05:00-08:00
+ 2015-03-01T11:49:20-08:00https://home-assistant.io/
@@ -13,6 +13,22 @@
Octopress
+
+
+
+ 2015-03-01T11:38:00-08:00
+ https://home-assistant.io/blog/2015/03/01/home-assistant-migrating-to-yaml
+ Home Assistant is now using YAML for it’s configuration file.
+YAML allows the use of lists, which should make the configuration file a bit more flexible and useful. The new configuration file format is backwards compatible with existing components. Because of this, there is no need for component developers to update their components.
+
+
The new file is named configuration.yaml and if it can’t be found in your config directory, Home Assistant will instead try to find the old configuration file, home-assistant.conf.
diff --git a/blog/2014/12/26/home-control-home-automation-and-the-smart-home/index.html b/blog/2014/12/26/home-control-home-automation-and-the-smart-home/index.html
index c621b75540..45ca72b707 100644
--- a/blog/2014/12/26/home-control-home-automation-and-the-smart-home/index.html
+++ b/blog/2014/12/26/home-control-home-automation-and-the-smart-home/index.html
@@ -265,6 +265,12 @@ This article will try to explain how they all relate.
diff --git a/blog/2015/02/08/looking-at-the-past/index.html b/blog/2015/02/08/looking-at-the-past/index.html
index 9e23e10a76..ff88d61188 100644
--- a/blog/2015/02/08/looking-at-the-past/index.html
+++ b/blog/2015/02/08/looking-at-the-past/index.html
@@ -245,6 +245,12 @@ Events are saved in a local database. Google Graphs is used to draw the graph. D
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Theodor Lindquist
+
+ less than one minute reading time
+
+
+
+ Comments
+
+
+
+
+
+
+
+
+
Home Assistant is now using YAML for it’s configuration file.
+YAML allows the use of lists, which should make the configuration file a bit more flexible and useful. The new configuration file format is backwards compatible with existing components. Because of this, there is no need for component developers to update their components.
+
+
The new file is named configuration.yaml and if it can’t be found in your config directory, Home Assistant will instead try to find the old configuration file, home-assistant.conf.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Theodor Lindquist
+
+ less than one minute reading time
+
+
+
+ Comments
+
+
+
+
+
+
+
+
+
Home Assistant is now using YAML for it’s configuration file.
+YAML allows the use of lists, which should make the configuration file a bit more flexible and useful. The new configuration file format is backwards compatible with existing components. Because of this, there is no need for component developers to update their components.
+
+
The new file is named configuration.yaml and if it can’t be found in your config directory, Home Assistant will instead try to find the old configuration file, home-assistant.conf.
[automation]
-# Optional alias that the logs will use to refer to the entry
-alias=Sunset notification
+
automation:
+ # Optional alias that the logs will use to refer to the entry
+ alias: Sunset notification
-# Type of trigger and informatino for the trigger
-platform=state
-state_entity_id=sun.sun
-state_from=above_horizon
-state_to=below_horizon
+ # Type of trigger and informatino for the trigger
+ platform: state
+ state_entity_id: sun.sun
+ state_from: above_horizon
+ state_to: below_horizon
-# Action to be done when trigger activated
-execute_service=notify.notify
-service_data={"message":"The sun has set"}
+ # Action to be done when trigger activated
+ execute_service: notify.notify
+ service_data: {"message":"The sun has set"}
Setting up triggers
@@ -145,17 +145,16 @@
8910
-
# Match at the start of every hour
-platform=time
-time_minutes=0
-time_seconds=0
+
# Match at the start of every hour
+ platform: time
+ time_minutes: 0
+ time_seconds: 0
-# Match at 4pm
-platform=time
-time_hours=16
-time_minutes=0
-time_seconds=0
-
+ # Match at 4pm
+ platform: time
+ time_hours: 16
+ time_minutes: 0
+ time_seconds: 0
State-based automation
@@ -180,22 +179,22 @@
1617
# Match when the sun sets
-platform=state
-state_entity_id=sun.sun
-state_from=above_horizon
-state_to=below_horizon
+ platform: state
+ state_entity_id: sun.sun
+ state_from: above_horizon
+ state_to: below_horizon
-# Match when a person comes home
-platform=state
-state_entity_id=device_tracker.Paulus_OnePlus_One
-state_from=not_home
-state_to=home
+ # Match when a person comes home
+ platform: state
+ state_entity_id: device_tracker.Paulus_OnePlus_One
+ state_from: not_home
+ state_to: home
-# Match when a light turns on
-platform=state
-state_entity_id=light.Ceiling
-state_from=off
-state_to=on
+ # Match when a light turns on
+ platform: state
+ state_entity_id: light.Ceiling
+ state_from: off
+ state_to: on
Setting up the action
@@ -214,23 +213,23 @@
101112
-
# Turn the lights Ceiling and Wall on.
-execute_service=light.turn_on
-service_entity_id=light.Ceiling,light.Wall
+
# Turn the lights Ceiling and Wall on.
+ execute_service: light.turn_on
+ service_entity_id: light.Ceiling,light.Wall
-# Turn the lights Ceiling and Wall on and turn them red.
-execute_service=light.turn_on
-service_entity_id=light.Ceiling,light.Wall
-service_data={"rgb_color": [255, 0, 0]}
+ # Turn the lights Ceiling and Wall on and turn them red.
+ execute_service: light.turn_on
+ service_entity_id: light.Ceiling,light.Wall
+ service_data: {"rgb_color": [255, 0, 0]}
-# Notify the user
-execute_service=notify.notify
-service_data={"message":"YAY"}
+ # Notify the user
+ execute_service: notify.notify
+ service_data: {"message":"YAY"}
Putting it all together
-
For every combination of a trigger and an action we will have to combine the configuration lines and add it to an automation component entry in home-assistant.conf. You can add an optional alias key to the configuration to make the logs more understandable. To setup multiple entries, append 2, 3 etc to the section name. An example of a home-assistant.conf file:
+
For every combination of a trigger and an action we will have to combine the configuration lines and add it to an automation component entry in configuration.yaml. You can add an optional alias key to the configuration to make the logs more understandable. To setup multiple entries, append 2, 3 etc to the section name. An example of a configuration.yaml file:
12
@@ -263,43 +262,43 @@
293031
-
[automation]
-alias=Sunset notification
+
automation:
+ alias: Sunset notification
-platform=state
-state_entity_id=sun.sun
-state_from=above_horizon
-state_to=below_horizon
+ platform: state
+ state_entity_id: sun.sun
+ state_from: above_horizon
+ state_to: below_horizon
-execute_service=notify.notify
-service_data={"message":"The sun has set"}
+ execute_service: notify.notify
+ service_data: {"message":"The sun has set"}
-[automation 2]
-alias=Turn lights off at 8am in the morning
+automation 2:
+ alias: Turn lights off at 8am in the morning
-platform=time
-time_hours=8
-time_minutes=0
-time_seconds=0
+ platform: time
+ time_hours: 8
+ time_minutes: 0
+ time_seconds: 0
-execute_service=light.turn_off
+ execute_service: light.turn_off
-[automation 3]
-alias=Turn lights in study room on when Paulus comes home
+automation 3:
+ alias: Turn lights in study room on when Paulus comes home
-platform=state
-state_entity_id=device_tracker.Paulus_OnePlus
-state_from=not_home
-state_to=home
+ platform: state
+ state_entity_id: device_tracker.Paulus_OnePlus
+ state_from: not_home
+ state_to: home
-execute_service=homeassistant.turn_on
-service_entity_id=group.Study_Room
-All configuration entries have to be sequential. If you have [automation], [automation 2] and [automation 4] then the last one will not be processed.
+All configuration entries have to be sequential. If you have automation:, automation 2: and automation 4: then the last one will not be processed.
The browser component provides a service to open urls in the default browser on the host machine.
-
To load this component, add the following lines to your home-assistant.conf:
+
To load this component, add the following lines to your configuration.yaml:
1
-
[browser]
+
browser:
Service browser/browse_url
diff --git a/components/chromecast.html b/components/chromecast.html
index 5e050485fc..072cc6f9d4 100644
--- a/components/chromecast.html
+++ b/components/chromecast.html
@@ -102,10 +102,10 @@ Chromecasts have recently received a new API which is not yet supported by Home
-
Interacts with Chromecasts on your network. Will be automatically discovered if you setup the discovery component. Can also be forced to load by adding the following lines to your home-assistant.conf:
+
Interacts with Chromecasts on your network. Will be automatically discovered if you setup the discovery component. Can also be forced to load by adding the following lines to your configuration.yaml:
To enable this component, add the following lines to your home-assistant.conf:
+
To enable this component, add the following lines to your configuration.yaml:
12
@@ -115,13 +115,13 @@
567
-
[device_sun_light_trigger]
-# Specify a specific light/group of lights that has to be turned on
-light_group=group.living_room
-# Specify which light profile to use when turning lights on
-light_profile=relax
-# Disable lights being turned off when everybody leaves the house
-disable_turn_off=1
+
device_sun_light_trigger:
+ # Specify a specific light/group of lights that has to be turned on
+ light_group: group.living_room
+ # Specify which light profile to use when turning lights on
+ light_profile: relax
+ # Disable lights being turned off when everybody leaves the house
+ disable_turn_off: 1
The options light_group, light_profile and disable_turn_off are optional.
Home Assistant can get information from your wireless router to track which devices are connected. There are three different types of supported wireless routers: tomato, netgear and luci (OpenWRT). To get started add the following lines to your home-assistant.conf (example for Netgear):
+
Home Assistant can get information from your wireless router to track which devices are connected. There are three different types of supported wireless routers: tomato, netgear and luci (OpenWRT). To get started add the following lines to your configuration.yaml (example for Netgear):
The downloader component provides a service to download files. It will raise an error and not continue to set itself up when the download directory does not exist.
-
To enable it, add the following lines to your home-assistant.conf:
+
To enable it, add the following lines to your configuration.yaml:
If you really feel like enabling the light component directly, add the following lines to your home-assistant.conf:
+
If you want to enable the light component directly, add the following lines to your configuration.yaml:
12
-
[light]
-platform=hue
+
light:
+ platform: hue
-The light component supports multiple entries in home-assistant.conf by appending a sequential number to the section: [light 2], [light 3] etc.
+The light component supports multiple entries in configuration.yaml by appending a sequential number to the section: light 2:, light 3: etc.
Notifications are great to be used within Home Automation. Below is a an example configuration that you can add to your home-assistant.conf to be notified when the sun sets.
+
Notifications are great to be used within Home Automation. Below is a an example configuration that you can add to your configuration.yaml to be notified when the sun sets.
12
@@ -123,16 +123,16 @@
8910
-
[automation]
-alias=Sun set notification
+
automation:
+ alias: Sun set notification
-platform=state
-state_entity_id=sun.sun
-state_from=above_horizon
-state_to=below_horizon
+ platform: state
+ state_entity_id: sun.sun
+ state_from: above_horizon
+ state_to: below_horizon
-execute_service=notify.notify
-service_data={"message":"YAY"}
This component depends on the compoments device_tracker and light being setup.
-
To set it up, add the following lines to your home-assistant.conf:
+
To set it up, add the following lines to your configuration.yaml:
12345
-
[simple_alarm]
-# Which light/light group has to flash when a known device comes home
-known_light=light.Bowl
-# Which light/light group has to flash red when light turns on while no one home
-unknown_light=group.living_room
+
simple_alarm:
+ # Which light/light group has to flash when a known device comes home
+ known_light: light.Bowl
+ # Which light/light group has to flash red when light turns on while no one home
+ unknown_light: group.living_room
The sun component will use your current location to track if the sun is above or below the horizon. This is a common ingredient within Home Automation.
-
To set it up, add the following lines to your home-assistant.conf:
+
To set it up, add the following lines to your configuration.yaml:
Thermostats offer Home Assistant a peek into the current and target temperature in a house. Some thermostats will also offer an away mode that will lower use of heating/cooling. The only supported thermostat right now is the Nest thermostat.
-
To set it up, add the following information to your home-assistant.conf file:
+
To set it up, add the following information to your configuration.yaml file:
In the package homeassistant.remote a Python API on top of the HTTP API can be found.
-
The API accepts and returns only JSON encoded objects. All API calls have to be accompanied by the header X-HA-Access: YOUR_PASSWORD (as specified in your home-assistant.conf).
+
The API accepts and returns only JSON encoded objects. All API calls have to be accompanied by the header X-HA-Access: YOUR_PASSWORD (YOUR_PASSWORD as specified in your configuration.yaml).
You can append ?api_password=YOUR_PASSWORD to any url to log in automatically.
diff --git a/developers/creating_components.html b/developers/creating_components.html
index 4371b26e36..54a7498cf8 100644
--- a/developers/creating_components.html
+++ b/developers/creating_components.html
@@ -100,16 +100,16 @@ is easy to built your own. If you are the kind of person that likes to learn fro
The first is hello_world.py, which is the classic Hello World example for Home Assistant. The second one is example.py which showcases various ways you can tap into Home Assistant to be notified when certain events occur.
-
If you want to load these components in Home Assistant, add the following lines to your home-assistant.conf file:
+
If you want to load these components in Home Assistant, add the following lines to your configuration.yaml file:
1234
-
[hello_world]
+
hello_world:
-[example]
-target=TARGET_ENTITY
+example:
+ target: TARGET_ENTITY
TARGET_ENTITY should be one of your devices that can be turned on and off, ie a light or a switch. Example value could be light.Ceiling or switch.AC (if you have these devices with those names).
@@ -196,8 +196,8 @@ Home Assistant will use the directory that contains your config file as the dire
12
-
[example]
-host=paulusschoutsen.nl
+
example:
+ host: paulusschoutsen.nl
Then in the setup-method of your component you will be able to refer to config['example']['host'] to get the value paulusschoutsen.nl.
Home Assistant will by default serve the compiled version of the frontend. To change it so that the components are served separately, update your home-assistant.conf to have these lines:
+
Home Assistant will by default serve the compiled version of the frontend. To change it so that the components are served separately, update your configuration.yaml to have these lines:
12
-3
-
[http]
-api_password=YOUR_PASSWORD
-development=1
+
http:
+ development: 1
After turning on development mode, you will have to install the webcomponents that the frontend depends on. You can do this by running the build_frontend script.
diff --git a/getting-started/index.html b/getting-started/index.html
index b8e1d45128..17d53337a9 100644
--- a/getting-started/index.html
+++ b/getting-started/index.html
@@ -239,27 +239,23 @@ NOTE: the rest of the commands are not being run as sudo and will install python
Configuring Home Assistant
-
The configuration for Home Assistant lives by default in the config folder. The file home-assistant.conf is the main file that contains which components will be loaded and what their configuration is. An example configuration file is located at config/home-assistant.conf.example.
+
The configuration for Home Assistant lives by default in the config folder. The file configuration.yaml is the main file that contains which components will be loaded and what their configuration is. An example configuration file is located at config/configuration.yaml.example.
When launched for the first time, Home Assistant will write a default configuration enabling the web interface and device discovery. It can take up to a minute for your devices to be discovered and show up in the interface.
- You will have to restart Home Assistant for changes in home-assistant.conf to take effect.
+ You will have to restart Home Assistant for changes in configuration.yaml to take effect.
Password protecting the web interface
-
The first thing you want to add is a password for the web interface. Use your favourite text editor to open the file /config/home-assistant.conf. Look for the line that says [http] and add the line api_password=YOUR_PASSWORD below. Your configuration should now look like this:
+
The first thing you want to add is a password for the web interface. Use your favourite text editor to open the file /config/configuration.yaml and add the following to the bottom: