Merge pull request #495 from home-assistant/next

0.20 release
This commit is contained in:
Paulus Schoutsen 2016-05-21 14:58:46 -07:00
commit 5ac2d84ce7
38 changed files with 869 additions and 13 deletions

View File

@ -15,10 +15,6 @@ ha_release: pre 0.7
The `asuswrt` platform offers presence detection by looking at connected devices to a [ASUSWRT](http://event.asus.com/2013/nw/ASUSWRT/) based router.
<p class='note warning'>
This device tracker needs telnet to be enabled on the router.
</p>
To use an ASUSWRT router in your installation, add the following to your `configuration.yaml` file:
```yaml
@ -26,14 +22,20 @@ To use an ASUSWRT router in your installation, add the following to your `config
device_tracker:
platform: asuswrt
host: YOUR_ROUTER_IP
protocol: telnet
username: YOUR_ADMIN_USERNAME
password: YOUR_ADMIN_PASSWORD
```
Configuration variables:
- **host** (*Required*): The IP address of your router, e.g. 192.168.1.1.
- **host** (*Required*): The IP address of your router, eg. 192.168.1.1.
- **protocol** (*Optional*): The protocol (`ssh` or `telnet`) to use. Defaults to `ssh`.
- **username** (*Required*: The username of an user with administrative privileges, usually *admin*.
- **password** (*Required*): The password for your given admin account.
<p class='note warning'>
You need to enable telnet on your router if you choose to use `protocol: telnet`.
</p>
See the [device tracker component page](/components/device_tracker/) for instructions how to configure the people to be tracked.

View File

@ -9,10 +9,11 @@ sharing: true
footer: true
logo: home-assistant.png
ha_category: "History"
ha_release: pre 0.7
---
This component will track everything that is going on within Home Assistant and allows the user to browse through it.
The `history` component will track everything that is going on within Home Assistant and allows the user to browse through it.
To enable the history option in your installation, add the following to your `configuration.yaml` file:

View File

@ -37,7 +37,8 @@ Turns one light on or multiple lights on using [groups]({{site_root}}/components
| `profile` | yes | String with the name of one of the built-in profiles (relax, energize, concentrate, reading) or one of the custom profiles defined in `light_profiles.csv` in the current working directory. Light profiles define a xy color and a brightness. If a profile is given and a brightness or xy color then the profile values will be overwritten.
| `xy_color` | yes | A list containing two floats representing the xy color you want the light to be. Two comma seperated floats that represent the color in XY.
| `rgb_color` | yes | A list containing three integers representing the xy color you want the light to be. Three comma seperated integers that represent the color in RGB
| `color_temp` | yes | An INT in mireds represending the color temperature you want the light to be.
| `color_temp` | yes | An INT in mireds representing the color temperature you want the light to be.
| `color_name` | yes | A human readable string of a color name, such as `blue` or `goldenrod` or [`chucknorris`](http://stackoverflow.com/questions/8318911/why-does-html-think-chucknorris-is-a-color). If your browser can display it, so can Home Assistant.
| `brightness` | yes | Integer between 0 and 255 for how bright the color should be.
| `flash` | yes | Tell light to flash, can be either value `short` or `long`. *not supported by Wink

View File

@ -0,0 +1,22 @@
---
layout: page
title: "QwikSwitch Light"
description: "Instructions how to integrate Qwikswitch dimmers and relays as lights into Home Assistant."
date: 2016-05-04 00:00
sidebar: true
comments: false
sharing: true
footer: true
logo: qwikswitch.png
ha_category: Light
ha_iot_class: "Local Push"
ha_release: "0.20"
---
The `qwikswitch` light platform allows you to control your [QwikSwitch](http://www.qwikswitch.co.za/) relays and dimmers as lights from within Home Assistant.
They will be automatically discovered if the discovery component is enabled.
For more configuration information see the [QwikSwitch component](/components/qwikswitch/) documentation.

View File

@ -0,0 +1,25 @@
---
layout: page
title: "Logentries"
description: "Send events to Logentries."
date: 2016-04-29 16:50
sidebar: true
comments: false
sharing: true
footer: true
ha_category: "History"
---
The `logentries` component makes it possible to log all state changes to [your Logentries account](http://logentries.com/) using Logentries Webhook endpoint and a token based log
To use the `logentries` component in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
logentries:
token: your-log-token-here
```
Configuration variables:
- **token** (*Required*): Your Logentries log token

View File

@ -0,0 +1,35 @@
---
layout: page
title: "Google Play Music Desktop Player (GPMDP)"
description: "Instructions how to integrate GPMDP into Home Assistant."
date: 2016-05-09 08:00
sidebar: true
comments: false
sharing: true
footer: true
logo: gpmdp.png
ha_category: Media Player
ha_iot_class: "Local Polling"
ha_release: "0.20"
---
The `gpmdp` media player platform allows you to control a [GPMDP](http://www.googleplaymusicdesktopplayer.com/) instance running on a computer from Home Assistant.
You will have first have to check "Enable playback API" in GPMDP's settings and then add an inbound rule to the firewall to allow access to port 5672 on the computer running GPMDP.
Then just add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
media_player:
platform: gpmdp
address: IP_ADDRESS
name: NAME
```
Configuration variables:
- **address** (*Required*): IP address of the computer running GPMDP
- **name** (*Optional*): Name of the player

View File

@ -0,0 +1,42 @@
---
layout: page
title: "LG Netcast TV"
description: "Instructions how to integrate a LG TV (Netcast 3.0 & 4.0) within Home Assistant."
date: 2016-05-12 23:22
sidebar: true
comments: false
sharing: true
footer: true
logo: lg.png
ha_category: Media Player
ha_iot_class: "Local Poll"
ha_release: "0.20"
---
The `lg_netcast` platform allows you to control a LG Smart TV running NetCast 3.0 (LG Smart TV models released in 2012) and NetCast 4.0 (LG Smart TV models released in 2013). For the new LG WebOS TV's use the [webostv](/components/mediaplayer.webostv) platform.
To add a LG TV to your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
media_player:
platform: lg_netcast
host: 192.168.0.20
access_token: 889955
name: Living Room TV
```
Configuration variables:
- **host** (*Required*): The IP address of the LG Smart TV, eg. 192.168.0.20
- **access_token** (*Optional*): The access token needed to connect.
- **name** (*Optional*): The name you would like to give to the LG Smart TV. The default is "LG TV Remote".
To get the access token for your TV configure the `lg_netcast` platform in Home Assistant without the `access_token`.
After starting Home Assistant the TV will display the access token on screen.
Just add the token to your configuration and restart Home Assistant and the media player component for your LG TV will show up.
<p class='note'>
The access token will not change until you factory reset your TV.
</p>

View File

@ -0,0 +1,28 @@
---
layout: page
title: "Roku"
description: "Instructions how to integrate Roku into Home Assistant."
date: 2016-05-16 20:0+0000
sidebar: true
comments: false
sharing: true
footer: true
logo: roku.png
ha_category: Media Player
ha_release: "0.20"
---
The [Roku](http://www.roku.com/) media players will be automatically discovered if you enable the [discovery component](/components/discovery/).
The `roku` media player platform can also be forced to load by adding the following lines to your `configuration.yaml`:
```yaml
# Example configuration.yaml entry
media_player:
platform: roku
host: 192.168.1.10
```
Configuration variables:
- **host** *Optional*: Use only if you don't want to scan for devices.

View File

@ -171,6 +171,18 @@ The MQTT component will register the service `publish` which allows publishing m
}
```
### {% linkable_title Logging %}
The [logger](/components/logger/) component allow the logging of received MQTT messages.
```yaml
# Example configuration.yaml entry
logger:
default: warning
logs:
homeassistant.components.device_tracker.mqtt: debug
```
## {% linkable_title Testing your setup %}
The `mosquitto` broker package is shipping commandline tools to send and recieve MQTT messages. As an alternative have a look at [hbmqtt_pub](http://hbmqtt.readthedocs.org/en/latest/references/hbmqtt_pub.html) and [hbmqtt_sub](http://hbmqtt.readthedocs.org/en/latest/references/hbmqtt_sub.html) which are provied by HBMQTT. For sending test messages to a broker running on localhost check the example below:

View File

@ -0,0 +1,78 @@
---
layout: page
title: "AWS Lambda"
description: "Instructions how to invoke AWS Lambda functions from Home Assistant."
date: 2016-05-14 16:35
sidebar: true
comments: false
sharing: true
footer: true
logo: aws_lambda.png
ha_category: Notifications
ha_release: "0.20"
---
The `aws_lambda` notification platform enables invoking [AWS Lambda](https://aws.amazon.com/lambda/) functions.
To use this notification platform in your installation, add the following to your `configuration.yaml` file:
### Configuration
```yaml
# Example configuration.yaml entry
notify:
platform: aws_lambda
name: NOTIFIER_NAME
aws_access_key_id: AWS_ACCESS_KEY_ID
aws_secret_access_key: AWS_SECRET_ACCESS_KEY
profile_name: AWS_PROFILE
region_name: 'us-east-1'
context:
...
```
Configuration variables:
- **aws_access_key_id** (*Required if aws_secret_access_key is provided*): Your AWS Access Key ID. For more information, please read the [AWS General Reference regarding Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html). If provided, you must also provide an `aws_secret_access_key` and must **not** provide a `profile_name`.
- **aws_secret_access_key** (*Required if aws_access_key_id is provided*): Your AWS Secret Access Key. For more information, please read the [AWS General Reference regarding Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html). If provided, you must also provide an `aws_access_key_id` and must **not** provide a `profile_name`.
- **profile_name** (*Optional*): A credentials profile name. For more information, please see the [boto3 documentation section about credentials](http://boto3.readthedocs.io/en/latest/guide/configuration.html#shared-credentials-file).
- **region_name** (*Required*): The region identifier to connect to. The default is `us-east-1`.
- **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`.
- **context** (*Optional*): An optional dictionary you can provide to pass custom context through to the Lambda function. The `context` dictionary (if any) is combined with the same data available at the `/api/config` HTTP API route.
### {% linkable_title Usage %}
AWS Lambda is a notify platform and thus can be controlled by calling the notify service [as described here](/components/notify/). It will invoke a Lambda for all targets given in the notification payload. A target can be formatted as a function name, an entire ARN ([Amazon Resource Name](http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) or a partial ARN. For more information, please see the [boto3 docs](http://boto3.readthedocs.io/en/latest/reference/services/lambda.html#Lambda.Client.invoke).
The Lambda event payload will contain everything passed in the service call payload. Here is an example payload that would be sent to Lambda:
```json
{
"title": "Test message!",
"target": "arn:aws:lambda:us-east-1:123456789012:function:ProcessKinesisRecords",
"data": {
"test": "okay"
},
"message": "Hello world!"
}
```
The context will look like this:
```json
{
"hass": {
"components": ["recorder", "logger", "http", "logbook", "api", "frontend"],
"latitude": 44.1234,
"location_name": "Home",
"longitude": 5.5678,
"temperature_unit": "°C",
"time_zone": "Europe/Zurich",
"version": "0.20.0.dev0"
},
"custom": {
"two": "three",
"test": "one"
}
}
```

View File

@ -0,0 +1,42 @@
---
layout: page
title: "AWS SNS"
description: "Instructions how to publish messages to AWS SNS from Home Assistant."
date: 2016-05-14 16:35
sidebar: true
comments: false
sharing: true
footer: true
logo: aws_sns.png
ha_category: Notifications
ha_release: "0.20"
---
The `aws_sns` notification platform enables publishing to an [AWS SNS](https://aws.amazon.com/sns/) topic or application.
To use this notification platform in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
notify:
platform: aws_sns
name: NOTIFIER_NAME
aws_access_key_id: AWS_ACCESS_KEY_ID
aws_secret_access_key: AWS_SECRET_ACCESS_KEY
profile_name: AWS_PROFILE
region_name: 'us-east-1'
```
Configuration variables:
- **aws_access_key_id** (*Required if aws_secret_access_key is provided*): Your AWS Access Key ID. For more information, please read the [AWS General Reference regarding Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html). If provided, you must also provide an `aws_secret_access_key` and must **not** provide a `profile_name`.
- **aws_secret_access_key** (*Required if aws_access_key_id is provided*): Your AWS Secret Access Key. For more information, please read the [AWS General Reference regarding Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html). If provided, you must also provide an `aws_access_key_id` and must **not** provide a `profile_name`.
- **profile_name** (*Optional*): A credentials profile name. For more information, please see the [boto3 documentation section about credentials](http://boto3.readthedocs.io/en/latest/guide/configuration.html#shared-credentials-file).
- **region_name** (*Required*): The region identifier to connect to. The default is `us-east-1`.
- **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`.
### {% linkable_title Usage %}
AWS SNS is a notify platform and thus can be controlled by calling the notify service [as described here](/components/notify/). It will publish a message to all targets given in the notification payload. A target must be a SNS topic or endpoint ARN ([Amazon Resource Name](http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)). For more information, please see the [boto3 docs](http://boto3.readthedocs.io/en/latest/reference/services/sns.html#SNS.Client.publish).
If one exists, the SNS Subject will be set to the title. All attributes from the payload except message will be sent as stringified message attributes.

View File

@ -0,0 +1,53 @@
---
layout: page
title: "AWS SQS"
description: "Instructions how to publish messages to AWS SQS from Home Assistant."
date: 2016-05-14 16:35
sidebar: true
comments: false
sharing: true
footer: true
logo: aws_sqs.png
ha_category: Notifications
ha_release: "0.20"
---
The `aws_sqs` notification platform enables publishing to an [AWS SQS](https://aws.amazon.com/sqs/) message queue.
To use this notification platform in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
notify:
platform: aws_sqs
name: NOTIFIER_NAME
aws_access_key_id: AWS_ACCESS_KEY_ID
aws_secret_access_key: AWS_SECRET_ACCESS_KEY
profile_name: AWS_PROFILE
region_name: 'us-east-1'
```
Configuration variables:
- **aws_access_key_id** (*Required if aws_secret_access_key is provided*): Your AWS Access Key ID. For more information, please read the [AWS General Reference regarding Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html). If provided, you must also provide an `aws_secret_access_key` and must **not** provide a `profile_name`.
- **aws_secret_access_key** (*Required if aws_access_key_id is provided*): Your AWS Secret Access Key. For more information, please read the [AWS General Reference regarding Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html). If provided, you must also provide an `aws_access_key_id` and must **not** provide a `profile_name`.
- **profile_name** (*Optional*): A credentials profile name. For more information, please see the [boto3 documentation section about credentials](http://boto3.readthedocs.io/en/latest/guide/configuration.html#shared-credentials-file).
- **region_name** (*Required*): The region identifier to connect to. The default is `us-east-1`.
- **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`.
### {% linkable_title Usage %}
AWS SQS is a notify platform and thus can be controlled by calling the notify service [as described here](/components/notify/). It will publish a message to the queue for all targets given in the notification payload. A target must be a SQS topic URL. For more information, please see the [SQS docs](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/ImportantIdentifiers.html).
The SQS event payload will contain everything passed in the service call payload. SQS payloads will be published as stringified JSON. All attributes from the payload except message will also be sent as stringified message attributes. Here is an example message that would be published to the SQS queue:
```json
{
"title": "Test message!",
"target": "http://sqs.us-east-1.amazonaws.com/123456789012/queue2",
"data": {
"test": "okay"
},
"message": "Hello world!"
}
```

View File

@ -0,0 +1,31 @@
---
layout: page
title: "Ecobee Notify"
description: "Instructions how to setup the Ecobee notification component within Home Assistant."
date: 2016-05-12 09:00
sidebar: true
comments: false
sharing: true
footer: true
logo: ecobee.png
ha_category: Notify
ha_release: "0.20"
---
To get your Ecobee notifications working with Home Assistant, you must first have the main [Ecobee component](/components/ecobee/) loaded and running. Once you have that configured, you can setup this component to send messages to your Ecobee device.
To use this notification platform in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
notify:
name: NOTIFIER_NAME
platform: ecobee
```
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`.
To use notifications, please see the [getting started with automation page](/getting-started/automation/).

View File

@ -0,0 +1,54 @@
---
layout: page
title: "Twilio SMS"
description: "Instructions how to add user notifications to Home Assistant."
date: 2016-05-14 14:14
sidebar: true
comments: false
sharing: true
footer: true
logo: twilio.png
ha_category: Notifications
ha_release: "0.20"
---
The `twilio` notification platform enables sending notifications via SMS, powered by [Twilio](https://twilio.com).
To use this notification platform in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
notify:
platform: twilio_sms
name: NOTIFIER_NAME
account_sid: ACCOUNT_SID_FROM_TWILIO
auth_token: AUTH_TOKEN_FROM_TWILIO
from_number: E164_PHONE_NUMBER
```
Configuration variables:
- **account_sid** (*Required*): Your Twilio Account SID which can be found in your [console](https://www.twilio.com/console). It starts with the letters `AC`.
- **auth_token** (*Required*): Your Twilio Account SID which can be found in your [console](https://www.twilio.com/console). It should be directly under where you found the `account_sid`.
- **from_number** (*Required*): An [E.164](https://en.wikipedia.org/wiki/E.164) formatted phone number, like +14151234567. See [Twilio's guide to formatting phone numbers](https://www.twilio.com/help/faq/phone-numbers/how-do-i-format-phone-numbers-to-work-internationally) for more information.
- **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`.
### {% linkable_title Usage %}
Twilio 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 E.164 phone numbers in the notification **target**. See the notes above regarding the `from_number` configuration variable for information about formatting phone numbers.
```yaml
# Example automation notification entry
automation:
- alias: The sun has set
trigger:
platform: sun
event: sunset
action:
service: notify.twilio_sms
data:
message: 'The sun has set'
target:
- +14151234567
- +15105555555
```

View File

@ -0,0 +1,54 @@
---
layout: page
title: "QwikSwitch QSUSB Hub"
description: "Instructions how to integrate the QwikSwitch QSUSB Hub into Home Assistant."
date: 2016-05-04 00:00
sidebar: true
comments: false
sharing: true
footer: true
logo: qwikswitch.png
ha_category: Hub
featured: false
ha_release: "0.20"
---
The `qwikswitch` component is the main component to integrate various [QwikSwitch](http://www.qwikswitch.co.za/) devices with Home Assistant.
Loading the `qwikswitch` component will automatically adds all devices from the QS Mobile application. QS Mobile controls the QSUSB Modem device.
Currently QwikSwitch relays and LED dimmers are supported (tested). QwikSwitch relay devices can be [switches](/components/switch.qwikswitch/) or [lights](/components/light.qwikswitch/) in Home-Assistant. If the device name in the QSUSB app ends with ` Switch` it will be created as a switch, otherwise as a light.
Example configuration:
```yaml
# Example configuration.yaml entry
qwikswitch:
url: 'http://127.0.0.1:2020'
```
Configuration variables:
- **url** (*Required*): The URL including the port of your QwikSwitch hub.
### {% linkable_title QwikSwitch Buttons %}
QwikSwitch devices (i.e. transmitter buttons) will fire events on the Home Assistant bus. These events can then be used as triggers for any `automation` action, as follows:
```yaml
automation:
- alias: Action - Respond to button press
trigger:
platform: event
event_type: qwikswitch.button.@12df34
```
`event_type` names should be in the format **qwikswitch.button.@__ID__**. where **@__ID__** will be captured in the Home Assistant log when pressing the button. Alternatively, you can also access the listen API call by going to 'http://127.0.0.1:2020/&listen' and then pressing the button.
Currently Event will be created for the following commands (cmd) value in the Listen packet:
- `TOGGLE` - Normal QwikSwitch Transmitter button
- `SCENE EXE` - QwikSwitch Scene Transmitter buttons
- `LEVEL` - QwikSwitch OFF Transmitter buttons
Technically this could work for Keyfobs, door sensors, and PIR transmitters as well.

View File

@ -0,0 +1,29 @@
---
layout: page
title: "Recorder"
description: "Instructions how to configure the data recorder for Home Assistant."
date: 2016-05-21 09:00
sidebar: true
comments: false
sharing: true
footer: true
logo: home-assistant.png
ha_category: "History"
featured: false
ha_release: "0.20"
---
The `recorder` component is storing details in the local database which then are handled by the [`history` component](/component/history/).
To setup the `recorder` component in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
recorder:
purge_days: 14
```
Configuration variables:
- **purge_days** (*Optional*): Delete events and states older than x days.

View File

@ -7,22 +7,36 @@ sidebar: true
comments: false
sharing: true
footer: true
logo:
logo: google_maps.png
ha_category: Sensor
ha_iot_class: "Cloud Polling"
ha_release: 0.19
---
Sensor to provide travel time from Google maps api.
Sensor to provide travel time from the [Google Distance Matrix API](https://developers.google.com/maps/documentation/distance-matrix/).
Get an api key [here](https://github.com/googlemaps/google-maps-services-python#api-keys).
You need to register for an API key by following the instructions [here](https://github.com/googlemaps/google-maps-services-python#api-keys). You only need to turn on the Distance Matrix API.
A free API Key allows 2500 requests per day. The sensor will update the travel time every 5 minutes.
```yaml
# Example entry for configuration.yaml
sensor:
platform: google_travel_time
name: Google Travel Time
api_key: XXXX_XXXXX_XXXXX
origin: Trondheim, Norway
destination: Paris, France
travel_mode: bicycling # can be ["driving", "walking", "bicycling", "transit"]
options:
...
```
Configuration variables:
- **api_key** (*Required*): Your application's API key (get one by following the instructions above). This key identifies your application for purposes of quota management.
- **origin** (*Required*): The starting point for calculating travel distance and time. You can supply one or more locations separated by the pipe character, in the form of an address, latitude/longitude coordinates, or a Google place ID.
- **destination** (*Required*): One or more locations to use as the finishing point for calculating travel distance and time. The options for the destinations parameter are the same as for the origins parameter, described above.
- **name** (*Optional*): A name to display on the sensor. The default is "Google Travel Time - <Transit Mode>" where transit mode is the mode set in options for the sensor (if no mode is set, the default is driving).
- **options** (*Optional*): A dictionary containing parameters to add to all requests to the Distance Matrix API. A full listing of available options can be found [here](https://developers.google.com/maps/documentation/distance-matrix/intro#RequestParameters).
- **departure_time** (*Optional*): Can be `now`, a Unix timestamp, or a 24 hour time string like `08:00:00`. If you provide a time string, it will be combined with the current date to get travel time for that moment.
- **arrival_time** (*Optional*): See notes above for `departure_time`. `arrival_time` can not be `now`, only a Unix timestamp or time string. You can not provide both `departure_time` and `arrival_time`. If you do provide both, `arrival_time` will be removed from the request.

View File

@ -0,0 +1,38 @@
---
layout: page
title: "Last.fm"
description: "Instructions how to integrate Last.fm sensors into Home Assistant."
date: 2016-05-18 09:00
sidebar: true
comments: false
sharing: true
footer: true
logo: lastfm.png
ha_category: Sensor
ha_iot_class: "Cloud Polling"
ha_release: "0.20"
---
The `lastfm` sensor platform will allow you to see whenever a user starts scrobbling, their play count, last song played, and top song played on [Last.fm](http://www.last.fm).
To get an API key you need to create an [API account](http://www.last.fm/api/account/create).
To use Last.fm with your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
sensor:
platform: lastfm
api_key: YOUR_API_KEY
users:
- user1
- user2
```
Configuration variables:
- **api_key** (*Required*): Your API key.
- **users** array (*Required*): Array of users.
- **username** (*Required*): Username of the user.

View File

@ -0,0 +1,36 @@
---
layout: page
title: "Mold Indicator"
description: "How to use the mold growth indication component in Home Assistant"
date: 2016-02-11 22:00
sidebar: true
comments: false
sharing: true
footer: true
ha_category: Sensor
ha_release: '0.20'
---
The Mold Indicator sensor component consumes information of two temperature sensors and a humidity sensor to give an indication for possible mold growth in your home. In case of bad ventilation and insulation, the indoor humidity may lead to condensation on cold surfaces as the windows or even walls. Condensation or a high relative humidity near those cold surfaces leads to a higher risk for mold growth. This sensor component estimates the temperature at a pre-calibrated critical point in the room (the coldest surface) and calculates the relative humidity of the air at that point. If the sensor value rises above approximately 70 percent, mold growth might occur and the room should be ventilated. At 100%, the air humidity condensates at the critical point.
The sensor data may be used e.g. to signal bad air quality (too high air humidity) or to automate operation of indoor air humidifiers to keep the indoor humidity at an optimum. To use the Mold Indicator sensor in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
sensor:
platform: mold_indicator
indoor_temp_sensor: sensor.temp
indoor_humidity_sensor: sensor.humidity
outdoor_temp_sensor: sensor.weather_temperature
calibration_factor: 2.0 # Needs to be calibrated to the critical point in the room
```
In this case, the weather forecast temperature sensor is used for the outside temperature.
## {% linkable_title Calibration %}
The Mold Indicator sensor component needs to be calibrated in order to estimate the temperature at the critical point from the outdoor and indoor temperature. First find the coldest surface in the room (critical point), which is typically near the window frames, but depends on the insulation of your home. For calibration you need to measure the temperature at this critical point and simultaneously write down the values for the indoor- and outdoor temperature sensors used for the Mold Indicator. Be sure that there is a significant indoor to outdoor temperature difference to get the best calibration results.
With the three measured temperatures (in Celsius or Fahrenheit), the calibration_factor for your configuration file is given by:
```text
calibration_factor = (temp_indoor - temp_outdoor) / (temp_criticalpoint - temp_outdoor)
```

View File

@ -9,10 +9,11 @@ sharing: true
footer: true
logo: nest_thermostat.png
ha_category: Sensor
ha_release: pre 0.7
---
The `nest` sensor platform let you monitor sensors connected to your [Nest](https://nest.com) thermostat.
The `nest` sensor platform let you monitor sensors connected to your [Nest](https://nest.com) thermostat and/or your Nest Protect Smoke Alarm.
To set it up, add the following information to your `configuration.yaml` file:
@ -35,6 +36,8 @@ sensor:
- 'weather_humidity'
- 'wind_speed'
- 'wind_direction'
- 'co_status'
- 'smoke_status'
```
Configuration variables:
@ -55,5 +58,9 @@ Configuration variables:
- 'weather_humidity'
- 'wind_speed'
- 'wind_direction'
- 'co_status' # Nest Protect only
- 'smoke_status' # Nest Protect only
<p class='note'>You must have the [Nest component](/components/nest/) configured to use this sensor.</p>
<p class='note'>
You must have the [Nest component](/components/nest/) configured to use this sensor.
</p>

View File

@ -0,0 +1,28 @@
---
layout: page
title: "Supervisord"
description: "Instructions how to integrate Supervisord within Home Assistant."
date: 2016-05-13 22:00
sidebar: true
comments: false
sharing: true
footer: true
ha_category: Sensor
ha_release: "0.20"
---
The `supervisord` platform allows you to track the states of [Supervisor](http://supervisord.org/).
To use this sensor in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
sensor:
platform: supervisord
url: http://192.168.1.1:9001/RPC2
```
Configuration variables:
- **url** (*Optional*): The URL to track. Default to `http://localhost:9001/RPC2`.

View File

@ -0,0 +1,23 @@
---
layout: page
title: "QwikSwitch Switch"
description: "Instructions how to integrate QwikSwitch relays into Home Assistant."
date: 2016-05-04 00:00
sidebar: true
comments: false
sharing: true
footer: true
logo: qwikswitch.png
ha_category: Switch
ha_iot_class: "Local Push"
ha_release: "0.20"
---
The `qwikswitch` platform allows you to control your [QwikSwitch](http://www.qwikswitch.co.za/) relays as switches from within Home Assistant.
If the device name in the QSUSB app ends with `Switch` it will be created as a switch, otherwise as a [light](/components/light.qwikswitch/).
They will be automatically discovered from the QSUSB API if the discovery component is enabled.
For more configuration information see the [QwikSwitch component](/components/qwikswitch/) documentation.

View File

@ -26,6 +26,7 @@
<li>{% active_link /developers/component_deps_and_reqs/ Requirements & Dependencies %}</li>
<li>{% active_link /developers/component_initialization/ Initialization %}</li>
<li>{% active_link /developers/component_events/ Handling events %}</li>
<li>{% active_link /developers/component_generic_discovery/ Loading Platforms %}</li>
<li>{% active_link /developers/component_discovery/ Component Discovery %}</li>
</ul>
</li>

View File

@ -0,0 +1,84 @@
---
layout: post
title: "0.20: Roku, Last.FM, AWS, Twilio"
description: "New release of Home Assistant is bringing a lot of great goodies for everyone. New media players, template optoins and a lot more."
date: 2016-05-21 11:06:00 -0700
date_formatted: "May 21, 2016"
author: Paulus Schoutsen
author_twitter: balloob
comments: true
categories: Release-Notes
---
<img src='/images/supported_brands/roku.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' /><img src='/images/supported_brands/lastfm.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' /><img src='/images/supported_brands/gpmdp.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='100' /><img src='/images/supported_brands/twilio.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='100' /><img src='/images/supported_brands/aws_lambda.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='100' /><img src='/images/supported_brands/aws_sns.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='100' /><img src='/images/supported_brands/aws_sqs.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='100' />
Tons of new supported things in 0.20.
- Restarting now supported without forking ([@jaharkes])
- Add [purge days option] to recorder component ([@justyns], [@infamy])
- Generic load_platform mechanism for entity components ([@kellerza])
- Template: new [`relative_time`] function to render ie. `7 seconds ago` ([@robbiet480])
- Sensor: [supervisord] now supported ([@happyleavesaoc])
- Docker: we should no longer get SSL errors with requests ([@lwis])
- Media Player: [Google Play Music Desktop Player] now supported ([@GreenTurtwig])
- Notify: [Twilio SMS] platform added ([@robbiet480])
- Device Tracker: [Asus WRT] will now default to SSH (but telnet is still an option) ([@froz])
- Support [Nest Protect] smoke alarms ([@khabi])
- Configurator: allow supplying a link to the user ([@mnestor])
- Media Player: [Roku] now supported ([@bah2830])
- Sensor: [Last.FM] now supported ([@darookee], [@GreenTurtwig])
- Notify: Amazon [Lambda], [SNS], [SQS] now supported ([@robbiet480])
- Light: allow human readable colors in turn_on command ([@robbiet480])
- YAML: new include dir options [`!include_dir_merge_list`] and [`!include_dir_merge_named`] ([@happyleavesaoc])
- Media Player: [LG Netcast TVs] now supported ([@wokar])
- Media Player: Allow enqueuing media on Sonos ([@shaftoe])
- Notify: [Ecobee thermostats] now supported ([@nkgilley])
- Sensor: [mold indicator] added ([@xifle])
- Export to [Logentries] support added ([@omgapuppy])
- Group more info dialog allows control of group domain if available ([@fignuts])
### {% linkable_title Breaking changes %}
- Asus WRT will now default to SSH with Telnet being an option
```yaml
device_tracker:
platform: asuswrt
protocol: telnet
```
[@bah2830]: https://github.com/bah2830
[@darookee]: https://github.com/darookee
[@fignuts]: https://github.com/fignuts
[@froz]: https://github.com/froz
[@GreenTurtwig]: https://github.com/GreenTurtwig
[@happyleavesaoc]: https://github.com/happyleavesaoc
[@infamy]: https://github.com/infamy
[@jaharkes]: https://github.com/jaharkes
[@justyns]: https://github.com/justyns
[@kellerza]: https://github.com/kellerza
[@khabi]: https://github.com/khabi
[@lwis]: https://github.com/lwis
[@mnestor]: https://github.com/mnestor
[@nkgilley]: https://github.com/nkgilley
[@omgapuppy]: https://github.com/omgapuppy
[@robbiet480]: https://github.com/robbiet480
[@shaftoe]: https://github.com/shaftoe
[@wokar]: https://github.com/wokar
[@xifle]: https://github.com/xifle
[`!include_dir_merge_list`]: /topics/splitting_configuration/#advanced-usage
[`!include_dir_merge_named`]: /topics/splitting_configuration/#advanced-usage
[`relative_time`]: /topics/templating/#home-assistant-template-extensions
[Asus WRT]: /components/device_tracker.asuswrt/
[Ecobee thermostats]: /components/notify.ecobee/
[Google Play Music Desktop Player]: /components/media_player.gpmdp/
[Lambda]: /components/notify.aws_lambda/
[LG Netcast TVs]: /components/media_player.lg_netcast/
[Logentries]: /components/logentries/
[mold indicator]: /components/sensor.moldindicator/
[Nest Protect]: /components/sensor.nest/
[purge days option]: /components/recorder/
[Roku]: /components/media_player.roku/
[SNS]: /components/notify.aws_sns/
[SQS]: /components/notify.aws_sqs/
[supervisord]: /components/sensor.supervisord/
[Twilio SMS]: /components/notify.twilio_sms/
[Last.FM]: /components/sensor.lastfm/

View File

@ -179,3 +179,14 @@ That about wraps it up.
If you have issues checkout `home-assistant.log` in the configuration directory as well as your indentations. If all else fails, head over to the [Gitter Chatroom](https://gitter.im/balloob/home-assistant) and ask away.
### {% linkable_title Advanced usage %}
We offer four advanced options to include whole directories at once.
`!include_dir_list` will return content of a directory as a list with each file content being an entry in the list.
`!include_dir_named` will return content of a directory as a dictionary which maps filename => content of file.
`!include_dir_merge_list` will return content of a directory as a list by merging all files (which should contain a list) into 1 big list.
`!include_dir_merge_named` will return content of a directory as a dictionary by loading each file and merging it into 1 big dictionary.

View File

@ -72,6 +72,7 @@ Home Assistant adds extensions to allow templates to access all of the current s
- `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.
- `relative_time(timestamp)` will format the date time as relative time vs now (ie 7 seconds)
## {% linkable_title Examples %}

View File

@ -0,0 +1,83 @@
---
layout: page
title: "Generic Platform Discovery"
description: "Using generic platform discovery."
date: 2016-05-12 22:00 -02:00
sidebar: true
comments: false
sharing: true
footer: true
---
New controller or hub components often need to add platforms in sub-components (i.e. Lights & Switches) without additional configuration.
This can be achieved using the `homeassistant.components.discovery.load_platform` method:
```python
def load_platform(hass, component, platform, info=None, hass_config=None)
```
From more info on how this works, refer to the [load_platform](https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/discovery.py#L78) method.
### {% linkable_title Example %}
Say you need to implement your new MyFlashyHub that controls both Switches & Lights, you can follow these steps:
Configuration required for your new hub component:
```yaml
myflashyhub:
example: setting
```
The source for your component can be located in your configuration directory for now:
```bash
~/.homeassistant/custom_components/myflashyhub.py
~/.homeassistant/custom_components/light/myflashyhub.py
~/.homeassistant/custom_components/switch/myflashyhub.py
```
In the hub component `myflashyhub.py` you can call your light and switch components. To pass any non-serializable information to the platforms in the sub-component, you can use a global variable.
```python
from homeassistant.components.discovery import load_platform
DOMAIN = 'myflashyhub'
MFH_GLOBAL = None
def setup(hass, config):
"""Your controller/hub specific code."""
global MFH_GLOBAL
if MFH_GLOBAL is None:
MFH_GLOBAL = SomeObjectToInitialiseGlobal
#--- snip ---
load_platform(hass, 'light', DOMAIN)
load_platform(hass, 'switch', DOMAIN, {'optional': 'arguments'})
```
Add your custom device specific code to the `setup_platform` method in `light/myflashyhub.py` and `switch/myflashyhub`.
```python
import homeassistant.components.myflashyhub as myflashyhub
# 'switch' will receive discovery_info={'optional': 'arguments'}
# as passed in above. 'light' will receive discovery_info=None
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Your switch/light specific code."""
# You can now use myflashyhub.MFH_GLOBAL
```
The `load_platform` method allows the platforms to be loaded with the need for any additional platform entries in your `configuration.yaml` file, which normally would have been:
```yaml
#light:
# platform: myflashyhub
#switch:
# platform: myflashyhub
```
<p class='note '>
In the past, this was achieved by adding your component to the `DISCOVERY_PLATFORMS` in the target sub-component. Generic discovery through `load_platform()` allows you to load any sub-component, including custom components, without changing the sub-component.
</p>

View File

@ -47,3 +47,24 @@ automation 2:
data:
message: Oh wow you really missed something great.
```
Conditions can also be part of an action:
```yaml
automation:
- alias: 'Enciende Despacho'
trigger:
platform: state
entity_id: sensor.mini_despacho
to: 'ON'
action:
- condition: or
conditions:
- condition: template
value_template: '{{ states.sun.sun.attributes.elevation < 4 }}'
- condition: template
value_template: '{{ states.sensor.sensorluz_7_0.state < 10 }}'
- service: scene.turn_on
entity_id: scene.DespiertaDespacho
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB