This commit is contained in:
GreenTurtwig 2016-01-28 10:08:51 +00:00
parent e0e294355d
commit f798983b32
6 changed files with 27 additions and 27 deletions

View File

@ -21,7 +21,7 @@ Actions will call services within Home Assistant. For example, turn a light on,
Conditions are used to prevent actions from firing unless certain conditions are met. For example, it is possible to only turn on the light if someone comes home and it is after a certain point in time.
The difference between a condition and a trigger can be confusing. The difference is that the trigger looks at the event that is happening, ie a car engine turning on. Conditions looks at the current state of the system, ie is the car engine on.
The difference between a condition and a trigger can be confusing. The difference is that the trigger looks at the event that is happening, i.e. a car engine turning on. Conditions looks at the current state of the system, i.e. is the car engine on.
### {% linkable_title Exploring the internal state %}
@ -76,7 +76,7 @@ Now you're happy and all is good. You start to like this automation business and
The first thing you do is to look at the entities in the developer tools (second icon) in the app. You see the names of your lights and you write them down: `light.table_lamp`, `light.bedroom`, `light.ceiling`.
Instead of hard coding the entity ids of the lights in the automation rule, we will set up a group. This will allow us to see the living room separate in the app and be able to address it from automation rules.
Instead of hard coding the entity IDs of the lights in the automation rule, we will set up a group. This will allow us to see the living room separate in the app and be able to address it from automation rules.
So we tweak the config to add the group and have the automation rule only turn on the group.
@ -102,9 +102,9 @@ automation:
entity_id: group.living_room
```
Christmas is coming along and you decide to buy a remote switch to control the christmas lights from Home Assistant. You can't claim to live in the house of the future if you're still manually turn on your christmas lights!
Christmas is coming along and you decide to buy a remote switch to control the Christmas lights from Home Assistant. You can't claim to live in the house of the future if you're still manually turning on your Christmas lights!
We hook the switch up to Home Assistant and grab the entity id from the developer tools: `switch.christmas_lights`. We will update the group to include the switch and will change our action. We are no longer able to call `light.turn_on` because we also want to turn on a switch. This is where `homeassistant.turn_on` comes to the rescue. This service is capable of turning any entity on.
We hook the switch up to Home Assistant and grab the entity ID0 from the developer tools: `switch.christmas_lights`. We will update the group to include the switch and will change our action. We are no longer able to call `light.turn_on` because we also want to turn on a switch. This is where `homeassistant.turn_on` comes to the rescue. This service is capable of turning any entity on.
```yaml
# Example configuration.yaml entry
@ -131,7 +131,7 @@ automation:
### {% linkable_title Further reading %}
We went over the basics of creating a home automation rule. From here no longer any hand holding, go automate!
We went over the basics of creating a home automation rule. Now, go automate!
- Learn about the available [automation triggers](/components/automation/#triggers)
- Learn about the available [automation conditions](/components/automation/#conditions)

View File

@ -9,7 +9,7 @@ sharing: true
footer: true
---
Home Assistant will create a configuration folder when it is run for the first time. The location of the folder depends on operating system: on OS X/Linux it's `~/.homeassistant` and on Windows it's `%APPDATA%/.homeassistant`. If you want to use a different folder for configuration, run `hass --config path/to/config`.
Home Assistant will create a configuration folder when it is run for the first time. The location of the folder differs between operating systems: on OS X/Linux it's `~/.homeassistant` and on Windows it's `%APPDATA%/.homeassistant`. If you want to use a different folder for configuration, run `hass --config path/to/config`.
Inside your configuration folder is the file `configuration.yaml`. This is the main file that contains which components will be loaded and what their configuration is. An example configuration file is located [here](https://github.com/balloob/home-assistant/blob/master/config/configuration.yaml.example).
@ -65,6 +65,6 @@ Home Assistant runs as a self hosted web application and contains support to be
To make Home Assistant accessible while away from home, you will have to setup port forwarding from your router to port 8123 on the computer that is hosting Home Assistant. Instructions on how to do this can be found by searching `<Router model> port forwarding instructions`.
Some internet service providers will only offer dynamic IPs. This can cause you to be unable to access Home Assistant while being remote. You can solve this by using a free Dynamic DNS service like [DuckDNS](https://www.duckdns.org/).
Some internet service providers will only offer dynamic IPs. This can cause you to be unable to access Home Assistant while away. You can solve this by using a free Dynamic DNS service like [DuckDNS](https://www.duckdns.org/).
### [Next step: Setting up devices &raquo;](/getting-started/devices/)

View File

@ -9,11 +9,11 @@ sharing: true
footer: true
---
Home Assistant will be able to automatically discover and configure any Google Chromecasts, Netgear routers, Belkin WeMo switches, Philips Hue bridges and Sonos speakers in your network if you have [the discovery component]({{site_root}}/components/discovery/) enabled (which is by default).
Home Assistant will be able to automatically discover and configure any Google Chromecasts, Netgear routers, Belkin WeMo switches, Philips Hue bridges and Sonos speakers on your network if you have [the discovery component]({{site_root}}/components/discovery/) enabled (which is by default).
See the [components overview page](/components/) to find installation instructions for your devices and services. If you can't find support for your favorite device or service, [consider adding support](/developers/add_new_platform/).
Usually every entity needs its own entry in the `configuration.yaml` file. There are two kind of styles for multiple entries:
Usually every entity needs its own entry in the `configuration.yaml` file. There are two kinds of style for multiple entries:
#### {% linkable_title Style 1 %}
@ -59,7 +59,7 @@ If your devices are not showing up in the frontend then check the entries in you
### {% linkable_title Grouping devices %}
Once you get a bunch of devices set up, it is time to organize them. This can be done using groups. Each group exists of a name and a list of entity IDs. Entity IDs can be retrieved from the web interface by using the Set State page in the Developer Tools (icon in the middle).
Once you have a bunch of devices set up, it is time to organize them. This can be done using groups. Each group exists of a name and a list of entity IDs. Entity IDs can be retrieved from the web interface by using the Set State page in the Developer Tools (icon in the middle).
```yaml
# Example configuration.yaml entry

View File

@ -28,7 +28,7 @@ $ hass --open-ui
Running these commands will:
- Install Home Assistant
- Launch Home Assistant and serve web interface on [http://localhost:8123](http://localhost:8123)
- Launch Home Assistant and serve the web interface on [http://localhost:8123](http://localhost:8123)
</div> <!-- INSTALL-INSTRUCTIONS NORMAL -->
@ -41,7 +41,7 @@ Installation with Docker is straightforward. Adjust the following command so tha
$ docker run -d --name="home-assistant" -v /path/to/your/config:/config -v /etc/localtime:/etc/localtime:ro --net=host balloob/home-assistant
```
This will launch Home Assistant and serve its web interface from port 8123 on your Docker host.
This will launch Home Assistant and serve the web interface from port 8123 on your Docker host.
<p class='note'>
When using boot2docker on OS X you are unable to map the local time to your Docker container. Replace `-v /etc/localtime:/etc/localtime:ro` with `-e "TZ=America/Los_Angeles"` (replacing America/Los_Angeles with [your timezone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones))
@ -64,7 +64,7 @@ $ hass
Running these commands will:
- Install Home Assistant
- Launch Home Assistant and serve web interface on [http://localhost:8123](http://localhost:8123)
- Launch Home Assistant and serve the web interface on [http://localhost:8123](http://localhost:8123)
</div> <!-- INSTALL-INSTRUCTIONS RASPBERRY -->
</div>

View File

@ -16,7 +16,7 @@ We care about privacy. Collected data is <b>only</b> stored in your instance of
Presence detection detects if people are home, an important input for automation. The most important piece of information is to know if anyone is home. But knowing who is home or where they are will open a whole range of other automation options:
- Send me a notification when my child arrives at school
- Turn on AC when I leave work
- Turn on the AC when I leave work
<p class='img'>
<img src='/images/screenshots/map.png' />
@ -27,7 +27,7 @@ Screenshot of Home Assistant showing a school, work and home zone and two people
The device tracker component offers presence detection for Home Assistant. It supports two different methods for presence detection: scan for connected devices on the local network and connect to third party service.
Scanning for connected devices is easy to setup. See the instructions for our [supported routers][routers] or [scan the network using nmap][nmap]. This approach does have its limitations. It will only be able to detect if a device is home. It also struggles with iPhones because they disconnect from the WiFi if idle, marking them as not home while they are not.
Scanning for connected devices is easy to setup. See the instructions for our [supported routers][routers] or [scan the network using nmap][nmap]. This approach does have its limitations however, it will only be able to detect if a device is home. It also struggles with iPhones because they disconnect from WiFi if idle, marking them as not home when they actually are.
Home Assistant currently supports two third party services for presence detection: [OwnTracks][ha-owntracks] and [Locative][ha-locative]. OwnTracks is an app that you install on your iPhone or Android phone that allows you to push the location of your device to Home Assistant using an MQTT broker. An MQTT broker is an Internet of Things communication platform that you can [freely host yourself][mqtt-self] or get [a private instance for free in the cloud](/components/mqtt/#run-your-own).
@ -39,7 +39,7 @@ OwnTracks communicates directly with your MQTT broker, no data will pass through
<img src='/images/screenshots/badges-zone.png' style='float: right; margin-left: 8px; height: 100px;'>
Home Assistant will know about the location for your device if you are using OwnTracks. By [setting up zones][zone] you will be able to add names to locations of your devices. This way you can easily spot on the state page where the people in your house are and use it as [triggers][trigger] and [conditions][condition] for automation.
Home Assistant will know the location of your device if you are using OwnTracks. By [setting up zones][zone] you will be able to add names to the locations of your devices. This way you can easily spot on the state page where the people in your house are and use it as [triggers][trigger] and [conditions][condition] for automation.
### [Next step: Setting up automation &raquo;](/getting-started/automation/)

View File

@ -10,7 +10,7 @@ footer: true
---
<p class='note'>
This is an advanced feature of Home Assistant. You need a basic understanding of the [Home Assistant architecture], especially states.
This is an advanced feature of Home Assistant. You'll need a basic understanding of the [Home Assistant architecture], especially states.
</p>
[Home Assistant architecture]: /developers/architecture/
@ -36,7 +36,7 @@ Templating in Home Assistant is powered by the Jinja2 templating engine. This me
The frontend has a template editor developer tool to help develop and debug templates.
</p>
Templates can get pretty big pretty fast. To keep a clear overview, consider using YAML multiline strings to define your templates:
Templates can get big pretty fast. To keep a clear overview, consider using YAML multiline strings to define your templates:
```yaml
script:
@ -56,14 +56,14 @@ script:
Home Assistant adds extensions to allow templates to access all of the current states:
- Iterating `states` will yield each state sorted alphabetically by entity id
- Iterating `states.domain` will yield each state of that domain sorted alphabetically by entity id
- `states.sensor.temperature` returns state object for `sensor.temperature`
- `states('device_tracker.paulus')` will return the state string (not the object) of given entity or `unknown` if it doesn't exist.
- `is_state('device_tracker.paulus', 'home')` will test if given entity is specified state.
- `is_state_attr('device_tracker.paulus', 'battery', 40)` will test if given entity is specified state.
- Filter `multiply(x)` will convert input to number and multiply it with `x`
- Filter `round(x)` will convert input to number and round it to `x` decimals.
- Iterating `states` will yield each state sorted alphabetically by entity ID
- Iterating `states.domain` will yield each state of that domain sorted alphabetically by entity ID
- `states.sensor.temperature` returns the state object for `sensor.temperature`
- `states('device_tracker.paulus')` will return the state string (not the object) of the given entity or `unknown` if it doesn't exist.
- `is_state('device_tracker.paulus', 'home')` will test if the given entity is specified state.
- `is_state_attr('device_tracker.paulus', 'battery', 40)` will test if the given entity is specified state.
- Filter `multiply(x)` will convert the input to a number and multiply it with `x`
- Filter `round(x)` will convert the input to a number and round it to `x` decimals.
#### {% linkable_title Examples %}
@ -101,7 +101,7 @@ Home Assistant adds extensions to allow templates to access all of the current s
## {% linkable_title Processing incoming data %}
The other part of templating is processing incoming data. It will allow you to modify incoming data and extract only the data that you care about. This will work only for platforms and components that mentioned support for this in their documentation.
The other part of templating is processing incoming data. It will allow you to modify incoming data and extract only the data you care about. This will work only for platforms and components that mentioned support for this in their documentation.
It depends per component or platform but it is common to be able to define a template using the `value_template` configuration key. When a new value arrives, your template will be rendered while having access to the following values on top of the usual Home Assistant extensions: