Merge branch 'current' into next

This commit is contained in:
Fabian Affolter 2017-10-20 23:28:47 +02:00
commit c3237a57ac
No known key found for this signature in database
GPG key ID: DDF3D6F44AAB1336
81 changed files with 803 additions and 177 deletions

View file

@ -69,7 +69,9 @@ Home Assistant adds extensions to allow templates to access all of the current s
- `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.
- `now()` will be rendered as current time in your time zone.
- For specific values: `now().second`, `now().minute`, `now().hour`, `now().day`, `now().month`, `now().year`, `now().weekday()` and `now().isoweekday()`
- `utcnow()` will be rendered as UTC time.
- For specific values: `utcnow().second`, `utcnow().minute`, `utcnow().hour`, `utcnow().day`, `utcnow().month`, `utcnow().year`, `utcnow().weekday()` and `utcnow().isoweekday()`.
- `as_timestamp()` will convert datetime object or string to UNIX timestamp
- `distance()` will measure the distance in meters between home, entity, coordinates.
- `closest()` will find the closest entity.
@ -89,6 +91,10 @@ Home Assistant adds extensions to allow templates to access all of the current s
If your template uses an `entity_id` that begins with a number (example: `states.device_tracker.2008_gmc`) you must use a bracket syntax to avoid errors caused by rendering the `entity_id` improperly. In the example given, the correct syntax for the device tracker would be: `states.device_tracker['2008_gmc']`
</p>
<p class='note warning'>
Rendering templates with time is dangerous as updates only trigger templates in sensors based on entity state changes.
</p>
## {% linkable_title Home Assistant template extensions %}
In templates, besides the normal [state object methods and properties](/topics/state_object/), there are also some extra things available:

View file

@ -87,3 +87,13 @@ Contents of `sensors.yaml`:
<p class='note'>
Whenever you report an issue, be aware that we are volunteers who do not have access to every single device in the world nor unlimited time to fix every problem out there.
</p>
### {% linkable_title Entity names %}
The only characters valid in entity names are:
* Lowercase letters
* Numbers
* Underscores
If you create an entity with other characters then Home Assistant may not generate an error for that entity. However you will find that attempts to use that entity will generate errors (or possibly fail silently).

View file

@ -83,3 +83,13 @@ If an environment variable is not set, you can fallback to a default value.
http:
api_password: !env_var PASSWORD default_password
```
### {% linkable_title Including Separate Files %}
To improve readability, you can source out certain domains from your main configuration file with the `!include`-syntax.
```yaml
lights: !include lights.yaml
```
More information about this feature can also be found at [splitting configuration](/docs/configuration/splitting_configuration/).