Merge branch 'next'

This commit is contained in:
Paulus Schoutsen 2016-02-27 14:58:08 -08:00
commit 16bf1e5838
47 changed files with 820 additions and 66 deletions

View File

@ -77,13 +77,14 @@ task :watch do
end
desc "preview the site in a web browser"
task :preview do
task :preview, :listen do |t, args|
listen_addr = args[:listen] || '127.0.0.1'
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
puts "Starting to watch source with Jekyll and Compass. Starting Rack on port #{server_port}"
system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css")
jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll build --watch --incremental")
compassPid = Process.spawn("compass watch")
rackupPid = Process.spawn("rackup --port #{server_port}")
rackupPid = Process.spawn("rackup --port #{server_port} --host #{listen_addr}")
trap("INT") {
[jekyllPid, compassPid, rackupPid].each { |pid| Process.kill(9, pid) rescue Errno::ESRCH }

View File

@ -11,25 +11,19 @@ logo: apcupsd.png
ha_category: Hub
---
[APCUPSd](http://www.apcupsd.org/) status information can be integrated into Home Assistant when the Network Information Server (NIS) [is configured](http://www.apcupsd.org/manual/manual.html#nis-server-client-configuration-using-the-net-driver).
[APCUPSd](http://www.apcupsd.org/) status information can be integrated into Home Assistant when the Network Information Server (NIS) [is configured](http://www.apcupsd.org/manual/manual.html#nis-server-client-configuration-using-the-net-driver) is enabled on the APC device.
Create an `apcupsd` section in your configuration, optionally containing the following parameters:
- **host**: The hostname/IP address on which the APCUPSd NIS is being served. Default: `localhost`
- **port**: The port on which the APCUPSd NIS is listening. Default: `3551`
#### Example
Use defaults:
To enable this sensor, add the following lines to your `configuration.yaml`:
```yaml
# Example configuration.yaml entry
apcupsd:
host: IP_ADDRESS
port: PORT
```
Set parameters:
Configuration variables:
- **host** (*Optional*): The hostname/IP address on which the APCUPSd NIS is being served. Defaults to `localhost`.
- **port** (*Optional*): The port on which the APCUPSd NIS is listening. Defaults to `3551`.
```yaml
apcupsd:
host: 192.168.1.10
port: 1234
```

View File

@ -11,12 +11,18 @@ logo: apcupsd.png
ha_category: Binary Sensor
---
In addition to the [APCUPSd Sensor](/components/sensor.apcupsd/) devices, you may also create a device which is simply `on` when the UPS status is `ONLINE` and `off` at all other times.
In addition to the [APCUPSd Sensor](/components/sensor.apcupsd/) devices, you may also create a device which is simply "on" when the UPS status is online and "off" at all other times.
#### Example
To enable this sensor, add the following lines to your `configuration.yaml` file for a GET request:
```yaml
# Example configuration.yaml entry
binary_sensor:
- name: UPS Online
platform: apcupsd
- platform: apcupsd
name: UPS Online
```
Configuration variables:
- **resource** (*Required*): The resource or endpoint that contains the value.
- **method** (*Optional*): The method of the request. Default is GET.

View File

@ -9,6 +9,7 @@ sharing: true
footer: true
logo: arest.png
ha_category: Binary Sensor
ha_iot_class: "Local Polling"
---

View File

@ -0,0 +1,25 @@
---
layout: page
title: "BloomSky Binary Sensor"
description: "Instructions on how to set up BloomSky binary sensors within Home Assistant."
date: 2016-02-22 07:00
sidebar: true
comments: false
sharing: true
footer: true
logo: bloomsky.png
ha_category: Binary Sensor
---
The `bloomsky` binary sensor platform allows you to get data from your BoomSky device.
To get your BloomSky binary sensors working with Home Assistant, follow the instructions for the [BloomSky component](/components/bloomsky/) first.
To use your BloomSky binary sensor in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
binary_sensor:
- platform: bloomsky
```

View File

@ -0,0 +1,51 @@
---
layout: page
title: NX584 zones
description: "Instructions on how to set up nx584 zones as sensors"
date: 2016-02-18 20:47
sidebar: true
comments: false
sharing: true
footer: true
logo: networx.png
ha_category: Binary Sensor
ha_iot_class: "Local Push"
---
The `nx584` platform provides integration with GE, Caddx, Interlogix (and other brands) alarm panels that support the NX584 interface module (or have it built in). Supported panels include NX4/6/8/8E. Actual integration is done through [pynx584](http://github.com/kk7ds/pynx584) which is required for this to work.
Enabling this sensor platform exposes all of your zones as binary sensors, which provides visibility through the UI as well as the ability to trigger automation actions instantly when something happens like a door opening, or a motion sensor trigger.
To enable this, add the following lines to your `configuration.yaml`:
```yaml
binary_sensor:
platform: nx584
host: ADDRESS
exclude_zones:
- ZONE ...
zone_types:
ZONE: TYPE
```
Configuration variables:
- **host** (*Optional*): This is the host connection string (host:port) for the nx584 server process. If unset, it is assumed to be `localhost:5007`, which will work if the server process is running on the same system as home-assistant.
- **exclude_zones** (*Optional*): This is a list of zone numbers that should be excluded. Use this to avoid exposing a zone that is of no interest, unconnected, etc.
- **zone_types** (*Optional*): This is a list of zone numbers mapped to zone types. Use this to designate zones as doors, motion sensors, smoke detectors, etc. The list of available zone types relevant to alarm zones are: `opening`, `motion`, `gas`, `smoke`, `moisture`, `safety`.
Example configuration:
```yaml
binary_sensor:
platform: nx584
host: 192.168.1.10:5007
exclude_zones:
- 3
- 5
zone_types:
1: opening
2: opening
4: motion
6: moisture
```

View File

@ -0,0 +1,43 @@
---
layout: page
title: TCP Binary Sensor
description: "Instructions on how to set up TCP binary sensors within Home Assistant."
date: 2016-02-22 11:05
sidebar: true
comments: false
sharing: true
footer: true
ha_category: Binary Sensor
---
The TCP Binary Sensor is a type of [TCP Sensor](/components/sensor.tcp/) which is either "off" or "on". In order to use this sensor type, in addition to the configuration for the TCP Sensor, you must supply a `value_on` value to represent what is returned when the device is turned on.
To enable this sensor, add the following lines to your `configuration.yaml`:
```yaml
sensor:
# Example configuration.yaml entry
- platform: tcp
name: TCP Binary Sensor
host: IP_ADDRESS
port: PORT
payload: "r State\n"
value_on: 1
timeout: 5
value_template: "{% raw %}{{ value.split(';')[0] }}{% endraw %}"
unit: UNIT_OF_MEASUREMENT
```
Configuration options for the a TCP Sensor:
- **name** (*Required*): The name you'd like to give the sensor in Home Assistant.
- **host** (*Required*): The hostname/IP address to connect to.
- **port** (*Required*): The port to connect to the host on.
- **payload** (*Required*): What to send to the host in order to get the response we're interested in.
- **value_on** (*Required*): The value returned when the device is "on".
- **timeout** (*Optional*): How long in seconds to wait for a response from the service before giving up and disconnecting. Defaults to 10.
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract the value. By default it's assumed that the entire response is the value.
- **unit** (*Optional*): The unit of measurement to use for the value.
- **buffer_size** (*Optional*): The size of the receive buffer in bytes. Set this to a larger value if you expect to receive a response larger than the default. Defaults to 1024.

View File

@ -0,0 +1,51 @@
---
layout: page
title: "Template Binary Sensor"
description: "Instructions how to integrate Template binary sensors into Home Assistant."
date: 2016-02-25 15:00
sidebar: true
comments: false
sharing: true
footer: true
ha_category: Binary Sensor
---
The `template` platform supports sensors which breaks out the state and `state_attributes` from other entities.
To enable Template sensors in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
binary_sensor:
platform: template
sensors:
sun_up:
value_template: {% raw %}'{{ states.sun.sun.attributes.elevation > 0}}'{% endraw %}
friendly_name: 'Sun is up'
```
Configuration variables:
- **sensors** array (*Required*): List of your sensors.
- **friendly_name** (*Optional*): Name to use in the Frontend.
- **sensor_class** (*Optional*): Defines the class of the sensor (motion, heat, moisture, etc)
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload.
## {% linkable_title Examples %}
In this section you find some real life examples of how to use this sensor.
### {% linkable_title Sensor threshold %}
This example indicates true if a sensor is above a given threshold. Assuming a sensor of `furnace` that provides a current reading for the fan motor, we can determine if the furnace is running by checking that it is over some threshold:
```yaml
sensor:
platform: template
sensors:
furnace_on:
value_template: {{ states.sensor.furnace.state > 2.5 }}
friendly_name: 'Furnace Running
sensor_class: heat
```

View File

@ -11,9 +11,21 @@ logo: zigbee.png
ha_category: Binary Sensor
---
A ZigBee binary sensor in this context is a device connected to one of the digital input pins on a ZigBee module. The states reported by such a device are limited to 'on' or 'off'. By default, a binary sensor is considered 'on' when the ZigBee device's digital input pin is held 'high' and considered 'off' when it is held 'low'. This behaviour can be inverted by setting the `on_state` configuration variable to `low`.
A `zigbee` binary sensor in this context is a device connected to one of the digital input pins on a [ZigBee](http://www.zigbee.org/) module. The states reported by such a device are limited to 'on' or 'off'. By default, a binary sensor is considered 'on' when the ZigBee device's digital input pin is held 'high' and considered 'off' when it is held 'low'. This behaviour can be inverted by setting the `on_state` configuration variable to `low`.
To configure a digital input as a binary sensor, use the following variables:
To enable the ZigBee binary sensors in your installation, add the following lines to your `configuration.yaml`:
```yaml
# Example configuration.yaml entry
binary_sensor:
- platform: zigbee
name: Hallway PIR Sensor
pin: 0
address: 0013A20040892FA2
on_state: low
```
Configuration variables:
- **name** (*Required*): The name you'd like to give the binary sensor in Home Assistant.
- **platform** (*Required*): Set to `zigbee`.
@ -21,13 +33,3 @@ To configure a digital input as a binary sensor, use the following variables:
- **address**: The long 64bit address of the remote ZigBee device whose digital input pin you'd like to sample. Do not include this variable if you want to sample the local ZigBee device's pins.
- **on_state**: Either `high` (default) or `low`, depicting whether the binary sensor is considered 'on' when the pin is 'high' or 'low'.
#### Example
```yaml
binary_sensor:
- name: Hallway PIR Sensor
platform: zigbee
pin: 0
address: 0013A20040892FA2
on_state: low
```

View File

@ -0,0 +1,14 @@
---
layout: page
title: "Z-Wave Binary Sensor"
description: "Instructions how to setup the Z-Wave binary sensors within Home Assistant."
date: 2016-02-22 07:00
sidebar: true
comments: false
sharing: true
footer: true
logo: z-wave.png
ha_category: Sensor
---
To get your Z-Wave binary sensors working with Home Assistant, follow the instructions for the general [Z-Wave component](/components/zwave/).

View File

@ -9,6 +9,7 @@ sharing: true
footer: true
logo: netgear.png
ha_category: Presence Detection
ha_iot_class: "Local Polling"
---

View File

@ -0,0 +1,36 @@
---
layout: page
title: "Ubiquiti Unifi WAP"
description: "Instructions how to use a Unifi WAP controller as a device tracker module."
date: 2016-02-19 20:59
sidebar: true
comments: false
sharing: true
footer: true
logo: ubiquiti.png
ha_category: Presence Detection
---
This platform allows you to detect presence by looking at connected devices to a [Ubiquiti](http://ubnt.com/) [Unifi](https://www.ubnt.com/enterprise/#unifi) controller.
To use this device tracker in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
device_tracker:
platform: unifi
host: CONTROLLER
port: PORT
username: YOUR_ADMIN_USERNAME
password: YOUR_ADMIN_PASSWORD
```
Configuration variables:
- **host** (*Optional*): The hostname or IP address of your controller. Defaults to localhost.
- **port** (*Optional*): The port of your controller's web interface. Defaults to 8443.
- **username** (*Required*: The username of an user with administrative privileges, usually *admin*.
- **password** (*Required*): The password for your given admin account.
See the [device tracker component page](/components/device_tracker/) for instructions how to configure the people to be tracked.

View File

@ -18,6 +18,7 @@ To enable RFXtrx lights in your installation, add the following to your `configu
# Example configuration.yaml entry
light:
platform: rfxtrx
signal_repetitions: 3
devices:
living_room:
name: Living Room
@ -29,3 +30,4 @@ Configuration variables:
- **devices** (*Required*): A list of devices with their name to use in the frontend.
- **automatic_add** (*Optional*): To enable the automatic addition of new lights.
- **signal_repetitions** *Optional*: Because the rxftrx device sends its actions via radio and from most receivers it's impossible to know if the signal was received or not. Therefore you can configure the switch to try to send each signal repeatedly.

View File

@ -7,6 +7,7 @@ sidebar: true
comments: false
sharing: true
footer: true
logo: bus_scs.png
ha_category: Light
---

View File

@ -20,5 +20,10 @@ To use your TellStick device in your installation, add the following to your `co
# Example configuration.yaml entry
light:
platform: tellstick
signal_repetitions: 3
```
Configuration variables:
- **signal_repetitions** *Optional*: Because the tellstick sends its actions via radio and from most receivers it's impossible to know if the signal was received or not. Therefore you can configure the switch to try to send each signal repeatedly.

View File

@ -0,0 +1,21 @@
---
layout: page
title: "Belkin WeMo Lights"
description: "Instructions how to integrate Belkin WeMo LED lights into Home Assistant."
date: 2016-02-20 00:45
sidebar: true
comments: false
sharing: true
footer: true
logo: belkin_wemo.png
ha_category: Light
ha_iot_class: "Local Polling"
---
The `wemo` platform allows you to control your [Belkin WeMo](http://www.belkin.com/us/p/P-F5Z0489/) LED lights from within Home Assistant.
They will be automatically discovered if the discovery component is enabled.
For more configuration information see the [WeMo component](/components/wemo/) documentation.

View File

@ -0,0 +1,33 @@
---
layout: page
title: "Command line"
description: "Instructions how to add command line notifications to Home Assistant."
date: 2016-02-22 20:00
sidebar: true
comments: false
sharing: true
footer: true
logo: command_line.png
ha_category: Notifications
---
The `command_line` platform allows you to use external tools for notifications from Home Assistant.
To enable those notifications in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
notify:
name: NOTIFIER_NAME
platform: command_line
command: "espeak -vmb/mb-us1"
```
Configuration variables:
- **name** (*Optional*): Setting the optional parameter `name` allows multiple notifiers to be created. The default value is `notify`. The notifier will bind to the service `notify.NOTIFIER_NAME`.
- **command** (*Required*): The action to take.
To use notifications, please see the [getting started with automation page]({{site_root}}/components/automation/).

View File

@ -34,3 +34,19 @@ Configuration variables:
### Usage
Google Voice is a notify platform and thus can be controlled by calling the notify service [as described here](/components/notify/). It will send a notification to all devices listed in the notification **target**.
```yaml
# Example automation notification entry
automation:
- alias: The sun has set
trigger:
platform: sun
event: sunset
action:
service: notify.googlevoice
data:
message: 'The sun has set'
target:
- 5555555555
- 5555555556
```

View File

@ -0,0 +1,35 @@
---
layout: page
title: "SendGrid"
description: "Instructions how to add email notifications via SendGrid to Home Assistant."
date: 2016-02-27 18:00
sidebar: true
comments: false
sharing: true
footer: true
logo: sendgrid.png
ha_category: Notifications
---
The `sendgrid` notification platform sends email notifications via [SendGrid](https://sendgrid.com/), a proven cloud-based email platform.
To enable notification emails via SendGrid in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
notify:
name: NOTIFIER_NAME
platform: sendgrid
api_key: API_KEY
sender: SENDER_EMAIL_ADDRESS
recipient: YOUR_RECIPIENT
```
Configuration variables:
- **name** (*Optional*): Setting the optional parameter `name` allows multiple notifiers to be created. The default value is `notify`. The notifier will bind to the service `notify.NOTIFIER_NAME`.
- **api_key** (*Required*): SendGrid API key - https://app.sendgrid.com/settings/api_keys
- **sender** (*Required*): E-mail address of the sender.
- **recipient** (*Required*): Recipient of the notification.
To use notifications, please see the [getting started with automation page]({{site_root}}/components/automation/).

View File

@ -0,0 +1,38 @@
---
layout: page
title: "Command line Rollershutter"
description: "Instructions how to have rollershutters call command line commands."
date: 2016-02-22 13:45
sidebar: true
comments: false
sharing: true
footer: true
logo: command_line.png
ha_category: Rollershutter
---
A rollershutter platform that issues specific commands when it is moved up, down and stopped. This might very well become our most powerful platform as it allows anyone to integrate any type of rollershutter into Home Assistant that can be controlled from the command line, including calling other scripts!
To enable command_rollershutter in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
rollershutter:
- platform: command_rollershutter
rollershutters:
Kitchen Rollershutter:
upcmd: move_command up kitchen
downcmd: move_command down kitchen
stopcmd: move_command stop kitchen
statecmd: state_command kitchen
value_template: '{% raw %}{{ value }}{% endraw %}'
```
Configuration variables:
- **rollershutters** (*Required*): The array that contains all command rollershutters.
- **entry** (*Required*): Name of the command rollershutter. Multiple entries are possible.
- **upcmd** (*Required*): The action to take for move up.
- **downcmd** (*Required*): The action to take for move down.
- **stopcmd** (*Required*): The action to take for stop.
- **statecmd** (*Optional*): If given, this command will be run. Returning a result code `0` will indicate that the rollershutter is fully closed, returning a result code `100` will indicate that the rollershutter is fully open.
- **value_template** (*Optional - default: '{% raw %}{{ value }}{% endraw %}'*): If specified, statecmd will ignore the result code of the command but the template evaluating will indicate the position of the rollershutter.

View File

@ -7,6 +7,7 @@ sidebar: true
comments: false
sharing: true
footer: true
logo: bus_scs.png
ha_category: Rollershutter
---
The SCSGate device can control motirized roller shutters connected to the BTicino MyHome system.

View File

@ -7,6 +7,7 @@ sidebar: true
comments: false
sharing: true
footer: true
logo: bus_scs.png
ha_category: Hub
---

View File

@ -9,6 +9,7 @@ sharing: true
footer: true
logo: arest.png
ha_category: Sensor
ha_iot_class: "Local Polling"
---

View File

@ -8,6 +8,7 @@ comments: false
sharing: true
footer: true
ha_category: Sensor
ha_iot_class: "Local Push"
---

View File

@ -9,6 +9,7 @@ sharing: true
footer: true
logo: glances.png
ha_category: Sensor
ha_iot_class: "Local Polling"
---

View File

@ -0,0 +1,40 @@
---
layout: page
title: "Nest Weather Sensor"
description: "Instructions how to integrate Nest sensors within Home Assistant."
date: 2016-01-13 19:59
sidebar: true
comments: false
sharing: true
footer: true
logo: nest_thermostat.png
ha_category: Weather
ha_iot_class: "Cloud Poll"
---
The `nest` weather sensor platform let you monitor current weather conditions based on the location of your [Nest](https://nest.com) thermostat.
To set it up, add the following information to your `configuration.yaml` file:
```yaml
sensor:
platform: nest
monitored_conditions:
- 'weather_temperature'
- 'weather_humidity'
- 'weather_condition'
- 'wind_speed'
- 'wind_direction'
```
Configuration variables:
- **monitored_conditions** array (*Required*): States to monitor.
- 'weather_temperature'
- 'weather_humidity'
- 'weather_condition'
- 'wind_speed'
- 'wind_direction'
<p class='note'>You must have the [Nest component](/components/nest/) configured to use this sensor.</p>

View File

@ -0,0 +1,34 @@
---
layout: page
title: "Neurio"
description: "Instructions how to integrate Neurio within Home Assistant."
date: 2016-02-15 21:50
sidebar: true
comments: false
sharing: true
footer: true
logo: neurio.png
ha_category: Sensor
ha_iot_class: "Cloud Polling"
---
Integrate your [Neurio](http://neur.io/) meter information into Home Assistant. To get an API key and secret, login to your Neurio account at https://my.neur.io/#settings/applications/register and register an application. Note the Homepage URL and Callback URL are optional.
To enable this sensor in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
sensor:
platform: neurio_energy
api_key: API_KEY
api_secret: API_SECRET
sensor_id: "SENSOR_ID"
```
Configuration variables:
- **api_key** (*Required*): The API key for your account/application.
- **api_secret** (*Required*): The API secret for your account/application.
- **sensor_id** (*Optional*): The sensor ID will be auto-detected but can be set if you have more then one sensor.

View File

@ -0,0 +1,50 @@
---
layout: page
title: "Steam"
description: "Instructions on how to set up Steam sensors in Home Assistant."
date: 2015-12-19 09:00
sidebar: true
comments: false
sharing: true
footer: true
logo: steam.png
ha_category: Sensor
---
The Steam component will allow you to track the online status of public [Steam](https://steamcommunity.com) accounts.
You need an API key which is [free](https://steamcommunity.com/dev/apikey) to use the component
To find an account's 64-bit SteamID you can check the URL of the profile page, if it ends with a long string on numbers then that's the 64-bit SteamID. However, if the profile has a custom URL you will have to copy the it and enter it into [STEAMID I/O](https://steamid.io/) to find the 64-bit SteamID.
To use Steam in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
sensor:
platform: steam_online
api_key: YOUR_API_KEY
accounts:
- account1
- account2
```
Configuration variables:
- **api_key** (*Required*): Your API key from [https://steamcommunity.com/dev/apikey](https://steamcommunity.com/dev/apikey).
- **accounts** array (*Required*): Array of accounts.
- **account_id** (*Required*): 64-bit SteamID.
If you want to add the accounts to a group for example you will have to use:
```yaml
# Example configuration.yaml entry
group:
steam:
name: Steam
entities:
- sensor.steam_account1
- sensor.steam_account2
```

View File

@ -8,6 +8,7 @@ comments: false
sharing: true
footer: true
ha_category: Sensor
ha_iot_class: "Local Polling"
---

View File

@ -0,0 +1,68 @@
---
layout: page
title: TCP Sensor
description: "Instructions on how to set up TCP sensors within Home Assistant."
date: 2016-02-22 10:03
sidebar: true
comments: false
sharing: true
footer: true
ha_category: Sensor
---
The TCP component allows the integration of some services for which a specific Home Assistant component does not exist. If the service communicates over a TCP socket with a simple request/reply mechanism then the chances are that this component will allow integration with it.
To enable this sensor, add the following lines to your `configuration.yaml`:
```yaml
sensor:
# Example configuration.yaml entry
- platform: tcp
name: Central Heating Pressure
host: IP_ADDRESS
port: PORT
timeout: 5
payload: PAYLOAD
value_template: "{% raw %}{{ value.split(';')[0] }}{% endraw %}"
unit: UNIT_OF_MEASUREMENT
```
Configuration options for the a TCP Sensor:
- **name** (*Required*): The name you'd like to give the sensor in Home Assistant.
- **host** (*Required*): The hostname/IP address to connect to.
- **port** (*Required*): The port to connect to the host on.
- **payload** (*Required*): What to send to the host in order to get the response we're interested in.
- **timeout** (*Optional*): How long in seconds to wait for a response from the service before giving up and disconnecting. Defaults to `10`
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract the value. By default it's assumed that the entire response is the value.
- **unit** (*Optional*): The unit of measurement to use for the value.
- **buffer_size** (*Optional*): The size of the receive buffer in bytes. Set this to a larger value if you expect to receive a response larger than the default. Defaults to `1024`.
## {% linkable_title Examples %}
In this section you find some real life examples of how to use this sensor.
### {% linkable_title EBUSd %}
The [EBUSd](https://github.com/john30/ebusd/wiki) service enables connection to an EBUS serial bus on some home heating/cooling systems. Using this service it is possible to extract various metrics which may be useful to have within Home Assistant. In order to use EBUSd, you connect to it using a TCP socket and send it a command. The service will respond with the value it has received from EBUS. On the command line, this would look something like:
```bash
$ echo "r WaterPressure" | nc 10.0.0.127 8888
0.903;ok
```
You will notice that the output from the service is not just a single value (it contains ";ok" as well). To grab the value we're interested in, we can use a Jinja2 template. The response received is injected into the template as the `value` variable. To use this value within Home Assistant, use the following configuration:
```yaml
sensor:
# Example configuration.yaml entry
- platform: tcp
name: Central Heating Pressure
host: 10.0.0.127
port: 8888
timeout: 5
payload: "r WaterPressure\n"
value_template: "{{ value.split(';')[0] }}"
unit: Bar
```

View File

@ -9,6 +9,7 @@ sharing: true
footer: true
logo: home-assistant.png
ha_category: Sensor
ha_iot_class: "Local Push"
---

View File

@ -9,6 +9,7 @@ sharing: true
footer: true
logo: home-assistant.png
ha_category: Sensor
ha_iot_class: "Local Push"
---

View File

@ -9,6 +9,7 @@ sharing: true
footer: true
logo: arest.png
ha_category: Switch
ha_iot_class: "Local Polling"
---
The `arest` switch platform allows you to toggle pins of your devices (like Arduino boards with a ethernet/wifi connection, ESP8266 based devices, and the Raspberry Pi) running the [aREST](http://arest.io/) RESTful framework.

View File

@ -0,0 +1,40 @@
---
layout: page
title: "D-Link Switch"
description: "Instructions how to integrate D-Link switches into Home Assistant."
date: 2016-02-21 09:00
sidebar: true
comments: false
sharing: true
footer: true
logo: dlink.png
ha_category: Switch
ha_iot_class: "Local Polling"
---
The `dlink` switch platform allows you to control the state of your [D-Link Wi-Fi Smart Plugs](http://us.dlink.com/product-category/home-solutions/connected-home/smart-plugs/).
Supported devices (tested):
- DSP-W215
To use your D-Link smart plugs in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
switch:
platform: dlink
host: IP_ADRRESS
name: D-Link plug
username: YOUR_USERNAME
password: YOUR_PASSWORD
```
Configuration variables:
- **host** (*Required*): The IP address of your D-Link plug, eg. http://192.168.1.32
- **name** (*Optional*): The name to use when displaying this switch.
- **username** (*Required*): The username for your plug. Defaults to `admin`.
- **password** (*Required*): The password for your plug.

View File

@ -18,6 +18,7 @@ To enable RFXtrx switches in your installation, add the following to your `confi
# Example configuration.yaml entry
switch:
platform: rfxtrx
signal_repetitions: 3
devices:
living_room:
name: Living Room
@ -29,4 +30,4 @@ Configuration variables:
- **devices** (*Required*): A list of devices with their name to use in the frontend.
- **automatic_add** (*Optional*): To enable the automatic addition of new switches.
- **signal_repetitions** *Optional*: Because the rxftrx device sends its actions via radio and from most receivers it's impossible to know if the signal was received or not. Therefore you can configure the switch to try to send each signal repeatedly.

View File

@ -7,6 +7,7 @@ sidebar: true
comments: false
sharing: true
footer: true
logo: bus_scs.png
ha_category: Switch
---

View File

@ -2,13 +2,14 @@
layout: page
title: "Belkin WeMo Switch"
description: "Instructions how to integrate Belkin WeMo switches into Home Assistant."
date: 2015-03-23 19:59
date: 2016-02-20 00:47
sidebar: true
comments: false
sharing: true
footer: true
logo: belkin_wemo.png
ha_category: Switch
ha_iot_class: "Local Push"
---
@ -16,22 +17,4 @@ The `wemo` platform allows you to control your [Belkin WeMo](http://www.belkin.c
They will be automatically discovered if the discovery component is enabled.
```yaml
# Example configuration.yaml entry
switch:
platform: wemo
```
Alternately, wemos that are not discoverable can be statically configured. If you have WeMo devices on subnets other than where Home Assistant is running, and/or devices in a remote location reachable over a VPN, you will need to manually configure them. This is also useful if you wish to disable discovery for some wemos, even if they are local. Example static configuration:
```yaml
switch:
platform: wemo
static:
- 192.168.1.23
- 192.168.52.172
```
Any WeMo devices that are not statically configured but reachable via discovery will still be added automatically.
Note that if you use this, you may want to configure your router (or whatever runs your DHCP server) to force your WeMo devices to use a static IP address. Check the DHCP section of your router configuration for this ability.
For more configuration information see the [WeMo component](/components/wemo/) documentation.

View File

@ -0,0 +1,34 @@
---
layout: page
title: "Belkin WeMo devices"
description: "Instructions how to integrate Belkin WeMo devices into Home Assistant."
date: 2016-02-20 00:41
sidebar: true
comments: false
sharing: true
footer: true
logo: belkin_wemo.png
ha_category: Hub
---
The `wemo` component is the main component to integrate various [Belkin WeMo](http://www.belkin.com/us/Products/home-automation/c/wemo-home-automation/) devices with Home Assistant.
Supported devices will be automatically discovered if the discovery component is enabled. If you are not using the discovery component, loading the `wemo` component will scan for WeMo devices on the local network.
```yaml
# Example configuration.yaml entry
wemo:
```
Alternately, WeMo devices that are not discoverable can be statically configured. If you have WeMo devices on subnets other than where Home Assistant is running, and/or devices in a remote location reachable over a VPN, you will need to manually configure them. This is also useful if you wish to disable discovery for some wemos, even if they are local. Example static configuration:
```yaml
wemo:
static:
- 192.168.1.23
- 192.168.52.172
```
Any WeMo devices that are not statically configured but reachable via discovery will still be added automatically.
Note that if you use this, you may want to configure your router (or whatever runs your DHCP server) to force your WeMo devices to use a static IP address. Check the DHCP section of your router configuration for this ability.

View File

@ -0,0 +1,48 @@
---
layout: page
title: "Send notification based on sensor"
description: "Basic example of how to send a templated notification if a sensor is over a given threshold"
date: 2016-02-25 15:00
sidebar: true
comments: false
sharing: true
footer: true
ha_category: Automation Examples
---
The following example sends a notification via pushbullet if a sensor is over a critical value:
```yaml
notify me:
platform: pushbullet
api_key: "API_KEY_HERE"
name: mypushbullet
automation:
- alias: FanOn
trigger:
platform: numeric_state
entity_id: sensor.furnace
above: 2
action:
service: notify.mypushbullet
data:
title: "Furnace fan is running"
message: "Fan running because current is {% raw %}{{ states.sensor.furnace.state }}{% endraw %} amps"
```
If you also want a notification when it drops back down below that limit, you could add this as well:
```yaml
- alias: FanOff
trigger:
platform: numeric_state
entity_id: sensor.furnace
below: 2
action:
service: notify.mypushbullet
data:
title: "Furnace fan is stopped"
message: "Fan stopped because current is {% raw %}{{ states.sensor.furnace.state }}{% endraw %} amps"
```

View File

@ -389,6 +389,14 @@ Returns the rendered template in plain text.
Paulus is at work!
```
Sample `curl` command:
```bash
$ curl -X POST -H "x-ha-access: YOUR_PASSWORD" \
-d '{"template": "It is {{ now }}!"}' \
http://localhost:8123/api/template
```
#### {% linkable_title POST /api/event_forwarding %}
Setup event forwarding to another Home Assistant instance.

View File

@ -52,36 +52,54 @@ script:
{% endif %}{% endraw %}
```
### {% linkable_title Home Assistant template extensions %}
## {% linkable_title Home Assistant template extensions %}
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 the state object for `sensor.temperature`
- 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 `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.
- `now` will be rendered as current time in your time zone.
- `utcnow` will be rendered as UTC time.
- `distance()` will measure the distance in meters between home, entity, coordinates.
- `closest()` will find the closest entity.
#### {% linkable_title Examples %}
## {% linkable_title Examples %}
### {% linkable_title States %}
Next two statements result in same value if state exists. Second one will result in an error if state does not exist.
```jinja2
{% raw %}
# Next two statements result in same value if state exists
# Second one will result in an error if state does not exist
{{ states('device_tracker.paulus') }}
{{ states.device_tracker.paulus.state }}
{{ states.device_tracker.paulus.state }}{% endraw %}
```
# Print an attribute if state is defined
### {% linkable_title Attributes %}
Print an attribute if state is defined
```jinja2
{% raw %}
{% if states.device_tracker.paulus %}
{{ states.device_tracker.paulus.attributes.battery }}
{% else %}
??
{% endif %}
{% endif %}{% endraw %}
```
# Print out a list of all the sensor states
### {% linkable_title Sensor states %}
Print out a list of all the sensor states.
```jinja2
{% raw %}
{% for state in states.sensor %}
{{ state.entity_id }}={{ state.state }},
{% endfor %}
@ -99,6 +117,50 @@ Home Assistant adds extensions to allow templates to access all of the current s
{%endif %}{% endraw %}
```
### {% linkable_title Distance examples %}
If only 1 location is passed in will measure the distance from home.
```jinja2
{% raw %}
Using Lat Lng coordinates: {{ distance(123.45, 123.45) }}
Using State: {{ distance(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 %}
```
### {% linkable_title Closest examples %}
Find entities closest to the Home Assistant location:
```jinja2
{% raw %}
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 %}
```
Find entities closest to a coordinate or another entity. All previous arguments still apply for 2nd argument.
```jinja2
{% raw %}
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 %}
```
### {% linkable_title Combined %}
Since closest returns a state, we can combine it with distance too
```jinja2
{% raw %}
{{ closest(states).name }} is {{ distance(closest(states)) }} meters away.{% endraw %}
```
## {% 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 you care about. This will work only for platforms and components that mentioned support for this in their documentation.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB