Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/_components/media_player.webostv.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ Avoid using `[ ]` in the `name:` of your device.

Home Assistant is able to turn on a LG webOS Smart TV if you specify an action, like HDMI-CEC or WakeOnLan.

Common for webOS 3.0 and higher would be to use WakeOnLan feature.
To use this feature your TV should be connected to your network via Ethernet rather than Wireless and you should enable *LG Connect Apps* feature in *Network* settings of the TV [instructions](http://www.lg.com/uk/support/product-help/CT00008334-1437131798537-others) (or *Mobile App* in *General* settings for older models).
Common for webOS 3.0 and higher would be to use WakeOnLan feature.
To use this feature your TV should be connected to your network via Ethernet rather than Wireless and you should enable *LG Connect Apps* feature in *Network* settings of the TV [instructions](http://www.lg.com/uk/support/product-help/CT00008334-1437131798537-others) (or *Mobile App* in *General* settings for older models) (*may vary by version). On newer models (2017+), WakeOnLan may need to be enabled in the TV settings by going to Settings > General > Mobile TV On > Turn On Via WiFi [instructions](https://support.quanticapps.com/hc/en-us/articles/115005985729-How-to-turn-on-my-LG-Smart-TV-using-the-App-WebOS-).

```yaml
# Example configuration.yaml entry
Expand Down
13 changes: 10 additions & 3 deletions source/_components/sensor.trafikverket_weatherstation.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ ha_category: Sensor
ha_release: 0.66.0
---

Showing weather information for air and road temperature provided by [Trafikverket](https://www.trafikverket.se/) in Sweden.
Showing weather information for air and road temperature as well as precipitation provided by [Trafikverket](https://www.trafikverket.se/) in Sweden.
Precipitation is returned as a string of text in Swedish.

Potential use cases:
- Get weather data in general
- You live near a weather station and want to know the current temperature at home
- You live near a weather station and want to know the current temperature or precipitation at home
- Setup automations for your car heating system. If the road is frozen along the way to work, you might want the car heating system to start earlier.

##### {% linkable_title Configuration %}
Expand Down Expand Up @@ -46,7 +47,7 @@ station:
required: true
type: string
type:
description: Defines which temperature you want (`air` or `road`).
description: Defines which data you want (`air`, `road` or `precipitation`).
required: true
type: string
scan_interval:
Expand Down Expand Up @@ -83,4 +84,10 @@ sensor:
station: Lanna
type: air
scan_interval: 600
- platform: trafikverket_weatherstation
name: Trafikverket Precipitation WeatherStation Nöbbele
api_key: eXXcbXXXacXXXXc39XX3aXXX4aXX46XX
station: Nöbbele
type: precipitation
scan_interval: 600
```
4 changes: 4 additions & 0 deletions source/_docs/automation/trigger.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ automation:
```
{% endraw %}

<p class='note warning'>
Rendering templates with time (`now()`) is dangerous as trigger templates only update based on entity state changes.
</p>

### {% linkable_title Time trigger %}

Time can be triggered in many ways. The most common is to specify `at` and trigger at a specific point in time each day. Alternatively, you can also match if the hour, minute or second of the current time has a specific value. You can prefix the value with a `/` to match whenever the value is divisible by that number. You cannot use `at` together with hour, minute or second.
Expand Down
29 changes: 9 additions & 20 deletions source/_docs/configuration/entity-registry.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,18 @@ sharing: true
footer: true
---

<p class='note'>
This is a new and experimental feature of Home Assistant.
</p>
Starting with version 0.63, Home Assistant keeps a registry of known entities. The entity registry makes sure that entities get unique identifiers and allow customizing the identifiers and names of these entities.

Starting with version 0.63, Home Assistant keeps a registry of known entities.
The entity registry makes sure that entities get unique identifiers and allow
customizing the identifiers and names of these entities.

As this is still a very new part of Home Assistant, changes will require a
restart of Home Assistant to take effect. A config user interface will be added
in a future version.
Changes require that Home Assistant is shut down when you edit the file, otherwise Home Assistant may over-write your changes, and a restart of Home Assistant is required for your changes to take effect. Version 0.75 introduced a configuration user interface.

<p class='note'>
An entity needs to have a unique ID to be registered in the entity registry.
Not all integrations currently provide a unique id for their entities.
</p>

The entity registry is stored in `<config>/entity_registry.yaml`. As a user,
you are unable to add entries, only update them. Here is an example file:
The entity registry is stored in `<config>/entity_registry.yaml`. As a user, you are unable to add entries, only update them. Here is an example file:

```
```yaml
climate.downstairs_virtual:
platform: nest
unique_id: EPoMyWkpNyoYu3pGlmGxabcdefghijkl
Expand All @@ -40,20 +31,18 @@ light.study_ceiling:
disabled_by: user
```

As a user, you can change the `entity_id` and add the `name` and `disabled_by`
value to each entry.
- Changing the _first line_ of each entry will change the `entity_id` of the entity throughout Home Assistant.
As a user, you can change the `entity_id` and add the `name` and `disabled_by`value to each entry.

- Changing the _first line_ of each entry will change the `entity_id` of the entity throughout Home Assistant.
- The value of `name` will override the _friendly name_ of the entity as given by the integration.

_Added in Home Assistant 0.64._
- The key `disabled_by` can either be `hass` or `user`. This functionality
is even more experimental than the whole entity registry itself and might
cause integrations to fail and might be removed in the future.
- The key `disabled_by` can either be `hass` or `user`. This functionality is even more experimental than the whole entity registry itself and might cause integrations to fail and might be removed in the future.

_Added in Home Assistant 0.64._

{% linkable_title Supported Components %}

At the moment, only the following components are supported: Z-Wave, Hue, Nest, LIFX, Sonos, Apple TV, Weather Underground
Only components that provide a unique ID for entities will are supported.

Note that for Weather Underground, second and subsequent Personal Weather Station ID (pws_id) will have their monitored conditions suffixed with an index number.
87 changes: 53 additions & 34 deletions source/_docs/configuration/templating.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,9 @@ This is an advanced feature of Home Assistant. You'll need a basic understanding

Templating is a powerful feature in Home Assistant that allows the user control over information that is going into and out of the system. It is used for:

- Formatting outgoing messages in, for example, the [notify] and [alexa] components.
- Process incoming data from sources that provide raw data, like [MQTT], [REST sensor], or the [command line sensor].
- [Automation Templating].

[notify]: /components/notify/
[alexa]: /components/alexa/
[MQTT]: /components/mqtt/
[REST sensor]: /components/sensor.rest/
[command line sensor]: /components/sensor.command_line/
[Automation Templating]: /docs/automation/templating/
- Formatting outgoing messages in, for example, the [notify](/components/notify/) platforms and [alexa](/components/alexa/) component.
- Process incoming data from sources that provide raw data, like [MQTT](/components/mqtt/), [`rest` sensor](/components/sensor.rest/) or the [`command_line` sensor](/components/sensor.command_line/).
- [Automation Templating](/docs/automation/templating/).

## {% linkable_title Building templates %}

Expand All @@ -38,19 +31,21 @@ The frontend has a template editor developer tool to help develop and debug temp

Templates can get big pretty fast. To keep a clear overview, consider using YAML multiline strings to define your templates:

{% raw %}
```yaml
script:
msg_who_is_home:
sequence:
- service: notify.notify
data_template:
message: >
{% raw %}{% if is_state('device_tracker.paulus', 'home') %}
{% if is_state('device_tracker.paulus', 'home') %}
Ha, Paulus is home!
{% else %}
Paulus is at {{ states('device_tracker.paulus') }}.
{% endif %}{% endraw %}
{% endif %}
```
{% endraw %}

[Jinja2](http://jinja.pocoo.org/) supports a wide variety of operations:

Expand Down Expand Up @@ -104,8 +99,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>

## {% linkable_title Templates using `now()` %}

<p class='note warning'>
Rendering templates with time is dangerous as updates only trigger templates in sensors based on entity state changes.
Rendering templates with time (`now()`) is dangerous as updates only trigger templates in sensors based on entity state changes.
</p>

## {% linkable_title Home Assistant template extensions %}
Expand All @@ -117,43 +114,51 @@ In templates, besides the normal [state object methods and properties](/topics/s
## {% linkable_title Examples %}

### {% linkable_title States %}

The next two statements result in same value if state exists. The second one will result in an error if state does not exist.

{% raw %}
```text
{% raw %}{{ states('device_tracker.paulus') }}
{{ states.device_tracker.paulus.state }}{% endraw %}
{{ states('device_tracker.paulus') }}
{{ states.device_tracker.paulus.state }}
```
{% endraw %}

### {% linkable_title Attributes %}

Print an attribute if state is defined. Both will return the same thing but the last one you can specify entity_id from a variable.

{% raw %}
```text
{% raw %}{% if states.device_tracker.paulus %}
{% if states.device_tracker.paulus %}
{{ states.device_tracker.paulus.attributes.battery }}
{% else %}
??
{% endif %}{% endraw %}
{% endif %}
```
{% endraw %}

With strings

{% raw %}
```text
{% raw %}{% set tracker_name = "paulus"%}
{% set tracker_name = "paulus"%}

{% if states("device_tracker." + tracker_name) != "unknown" %}
{{ state_attr("device_tracker." + tracker_name, "battery")}}
{% else %}
??
{% endif %}{% endraw %}
{% endif %}
```
{% endraw %}

### {% linkable_title Sensor states %}

Print out a list of all the sensor states.

{% raw %}
```text
{% raw %}{% for state in states.sensor %}
{% for state in states.sensor %}
{{ state.entity_id }}={{ state.state }},
{% endfor %}

Expand All @@ -173,48 +178,58 @@ Print out a list of all the sensor states.

{{ as_timestamp(states.binary_sensor.garage_door.last_changed) }}

{{ as_timestamp(now()) - as_timestamp(states.binary_sensor.garage_door.last_changed) }}{% endraw %}
{{ as_timestamp(now()) - as_timestamp(states.binary_sensor.garage_door.last_changed) }}
```
{% endraw %}

### {% linkable_title Distance examples %}

If only 1 location is passed in, Home Assistant will measure the distance from home.

{% raw %}
```text
{% raw %}Using Lat Lng coordinates: {{ distance(123.45, 123.45) }}
Using Lat Lng coordinates: {{ distance(123.45, 123.45) }}

Using State: {{ distance(states.device_tracker.paulus) }}

These can also be combined in any combination:
{{ distance(123.45, 123.45, 'device_tracker.paulus') }}
{{ distance('device_tracker.anne_therese', 'device_tracker.paulus') }}{% endraw %}
{{ distance('device_tracker.anne_therese', 'device_tracker.paulus') }}
```
{% endraw %}

### {% linkable_title Closest examples %}

Find entities closest to the Home Assistant location:

{% raw %}
```text
{% raw %}Query all entities: {{ closest(states) }}
Query all entities: {{ closest(states) }}
Query all entities of a specific domain: {{ closest('states.device_tracker') }}
Query all entities in group.children: {{ closest('group.children') }}
Query all entities in group.children: {{ closest(states.group.children) }}{% endraw %}
Query all entities in group.children: {{ closest(states.group.children) }}
```
{% endraw %}

Find entities closest to a coordinate or another entity. All previous arguments still apply for 2nd argument.

{% raw %}
```text
{% raw %}Closest to a coordinate: {{ closest(23.456, 23.456, 'group.children') }}
Closest to a coordinate: {{ closest(23.456, 23.456, 'group.children') }}
Closest to an entity: {{ closest('zone.school', 'group.children') }}
Closest to an entity: {{ closest(states.zone.school, 'group.children') }}{% endraw %}
Closest to an entity: {{ closest(states.zone.school, 'group.children') }}
```
{% endraw %}

### {% linkable_title Combined %}

Since closest returns a state, we can combine it with distance too.

{% raw %}
```text
{% raw %}{{ closest(states).name }} is {{ distance(closest(states)) }} kilometers away.{% endraw %}
{{ closest(states).name }} is {{ distance(closest(states)) }} kilometers away.
```
{% endraw %}

## {% linkable_title Processing incoming data %}

Expand All @@ -238,11 +253,13 @@ This means that if the incoming values looks like the sample below:

The template for `on` would be:

{% raw %}
```yaml
'{% raw %}{{value_json.on}}{% endraw %}'
'{{value_json.on}}'
```
{% endraw %}

Nested JSON in a response is supported as well
Nested JSON in a response is supported as well:

```json
{
Expand All @@ -259,10 +276,11 @@ Nested JSON in a response is supported as well

Just use the "Square bracket notation" to get the value.

{% raw %}
```yaml
'{% raw %}{{ value_json["values"]["temp"] }}{% endraw %}'
'{{ value_json["values"]["temp"] }}'
```

{% endraw %}

The following overview contains a couple of options to get the needed values:

Expand Down Expand Up @@ -294,8 +312,8 @@ The following overview contains a couple of options to get the needed values:

To evaluate a response, go to the <img src='/images/screenshots/developer-tool-templates-icon.png' alt='template developer tool icon' class="no-shadow" height="38" /> template developer tools, create your output into "Template", and check the result.

```yaml
{% raw %}
```yaml
{% set value_json=
{"name":"Outside",
"device":"weather-ha",
Expand All @@ -304,5 +322,6 @@ To evaluate a response, go to the <img src='/images/screenshots/developer-tool-t
"hum":"35%"
} }%}

{{value_json.data.hum[:-1]}}{% endraw %}
{{value_json.data.hum[:-1]}}
```
{% endraw %}
16 changes: 15 additions & 1 deletion source/_docs/z-wave/device-specific.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,20 @@ Triple tap off|2|4
Tap and hold on|1|2
Tap and hold off|2|2

Some installations will see those details:

**Top button ID: 1, Bottom ID: 2**

**Action**|**scene\_data**
:-----:|:-----:
Single Press|7800
Hold Button|7740
2x Tap|7860
3x Tap|7920
4x Tap|7980
5x Tap|8040


### {% linkable_title Fibaro Button FGPB-101-6 v3.2 %}

<!-- from https://hastebin.com/esodiweduq.cs -->
Expand Down Expand Up @@ -353,4 +367,4 @@ Button three hold|Circle|3|2
Button three release|Circle|3|1
Button four tap|Circle with Line|4|0
Button four hold|Circle with Line|4|2
Button four release|Circle with Line|4|1
Button four release|Circle with Line|4|1
2 changes: 2 additions & 0 deletions source/hassio/installation.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Hass.io images are available for:
- [Raspberry Pi 2 Model B][pi2]
- [Raspberry Pi 3 Model B and B+ 32bit][pi3-32] (recommended)
- [Raspberry Pi 3 Model B and B+ 64bit][pi3-64]
- [Tinkerboard (Beta)][tinker]
- As [Virtual Appliance]:
- [VMDK][vmdk]

Expand Down Expand Up @@ -80,6 +81,7 @@ A detailed guide about running Hass.io as a virtual machine is available in the
[pi2]: https://github.com/home-assistant/hassos/releases/download/1.9/hassos_rpi2-1.9.img.gz
[pi3-32]: https://github.com/home-assistant/hassos/releases/download/1.9/hassos_rpi3-1.9.img.gz
[pi3-64]: https://github.com/home-assistant/hassos/releases/download/1.9/hassos_rpi3-64-1.9.img.gz
[tinker]: https://github.com/home-assistant/hassos/releases/download/2.1/hassos_tinker-2.1.img.gz
[vmdk]: https://github.com/home-assistant/hassos/releases/download/1.9/hassos_ova-1.9.vmdk
[linux]: https://github.com/home-assistant/hassio-build/tree/master/install#install-hassio
[local]: http://hassio.local:8123
Expand Down