Merge branch 'current' into next

Conflicts:
	Gemfile.lock
This commit is contained in:
Paulus Schoutsen 2016-08-22 01:01:55 -07:00
commit e73ce3766d
38 changed files with 335 additions and 961 deletions

View file

@ -20,7 +20,7 @@ Amazon has released [Echosim], a website that simulates the Alexa service in you
[Echosim]: https://echosim.io/
### {% linkable_title I just want to turn devices on and off using Echo %}
## {% linkable_title I just want to turn devices on and off using Echo %}
If you just want to be able to turn anything with a switch (like lights, switches, media players, etc) on and off, check out Michael Auchter's [Haaska][haaska-github-link] which integrates the [Alexa Lighting API][alexa-lighting-api] into Home Assistant.
@ -47,7 +47,7 @@ In addition, you would need to build custom intents for each device and on/off c
Please note that you can use Haaska and the built-in Alexa component side-by-side without issue if you wish.
### {% linkable_title I want to build custom commands to use with Echo %}
## {% linkable_title I want to build custom commands to use with Echo %}
The built-in Alexa component allows you to integrate Home Assistant into Alexa/Amazon Echo. This component will allow you to query information and call services within Home Assistant by using your voice. Home Assistant offers no built-in sentences but offers a framework for you to define your own.
@ -55,7 +55,8 @@ The built-in Alexa component allows you to integrate Home Assistant into Alexa/A
<iframe width="560" height="315" src="https://www.youtube.com/embed/1Ke3mtWd_cQ" frameborder="0" allowfullscreen></iframe>
</div>
#### {% linkable_title Requirements before using %}
### {% linkable_title Requirements %}
Amazon requires the endpoint of a skill to be hosted via SSL. Self-signed certificates are ok because our skills will only run in development mode. Read more on [our blog][blog-lets-encrypt] about how to set up encryption for Home Assistant. If you are unable to get HTTPS up and running, consider using [this AWS Lambda proxy for Alexa skills](https://forums.developer.amazon.com/forums/thread.jspa?messageID=18604).
[blog-lets-encrypt]: https://home-assistant.io/blog/2015/12/13/setup-encryption-using-lets-encrypt/
@ -72,7 +73,7 @@ To get started with Alexa skills:
- https
- https://YOUR_HOST/api/alexa?api_password=YOUR_API_PASSWORD
#### {% linkable_title Configuring your Amazon Alexa skill %}
### {% linkable_title Configuring your Amazon Alexa skill %}
Alexa works based on intents. Each intent has a name and variable slots. For example, a `LocateIntent` with a slot that contains a `User`. Example intent schema:
@ -111,7 +112,7 @@ This means that we can now ask Alexa things like:
- Alexa, ask Home Assistant where Paul is
- Alexa, ask Home Assistant where we are
### {% linkable_title Configuring Home Assistant %}
## {% linkable_title Configuring Home Assistant %}
Out of the box, the component will do nothing. You have to teach it about all intents you want it to answer to. The way it works is that the answer for each intent is based on [templates] that you define. Each template will have access to the existing states via the `states` variable but will also have access to all variables defined in the intent.
@ -125,8 +126,7 @@ Actions are using the [Home Assistant Script Syntax] and also have access to the
Configuring the Alexa component for the above intents would look like this:
```yaml
{% raw %}
# Example configuration.yaml entry
{% raw %}# Example configuration.yaml entry
alexa:
intents:
WhereAreWeIntent:
@ -137,8 +137,8 @@ alexa:
is_state('device_tracker.anne_therese', 'home') -%}
You are both home, you silly
{%- else -%}
Anne Therese is at {{ states("device_tracker.anne_therese") }} and
Paulus is at {{ states("device_tracker.paulus") }}
Anne Therese is at {{ states("device_tracker.anne_therese") }}
and Paulus is at {{ states("device_tracker.paulus") }}
{% endif %}
LocateIntent:
@ -198,15 +198,14 @@ ActivateSceneIntent activate {Scene}
Then add the intent to your Alexa Section in your HA config file:
```yaml
{% raw %}
ActivateSceneIntent:
action:
service: scene.turn_on
data_template:
entity_id: scene.{{ Scene | replace(" ", "_") }}
entity_id: scene.{% raw %}{{ Scene | replace(" ", "_") }}{% endraw %}
speech:
type: plaintext
text: OK{% endraw %}
text: OK
```
Here we are using [templates] to take the name we gave to Alexa e.g. `downstairs on` and replace the space with an underscore so it becomes `downstairs_on` as Home Assistant expects.
@ -246,29 +245,26 @@ RunScriptIntent run {Script}
Then add the intent to your Alexa Section in your HA config file:
```yaml
{% raw %}
RunScriptIntent:
action:
service: script.turn_on
data_template:
entity_id: script.{{ Script | replace(" ", "_") }}
entity_id: script.{% raw %}{{ Script | replace(" ", "_") }}{% endraw %}
speech:
type: plaintext
text: OK{% endraw %}
text: OK
```
Now say `Alexa ask homeassistant to run <some script>` and Alexa will run that script for you.
### {% linkable_title Giving Alexa Some Personality%}
## {% linkable_title Giving Alexa Some Personality%}
In the examples above, we told Alexa to say `OK` when she succesfully completed the task. This is effective but a little dull! We can again use [templates] to spice things up a little.
First create a file called `alexa_confirm.yaml` with something like the following in it (go on, be creative!):
```text
{% raw %}
>
{% raw %} >
{{ [
"OK",
"Sure",

View file

@ -16,7 +16,7 @@ Integrates MySensors binary sensors into Home Assistant. See the [main component
The following sensor types are supported:
##### MySensors version 1.4 and higher
#### MySensors version 1.4 and higher
S_TYPE | V_TYPE
-------------------|---------------------------------------
@ -24,7 +24,7 @@ S_DOOR | V_TRIPPED
S_MOTION | V_TRIPPED
S_SMOKE | V_TRIPPED
##### MySensors version 1.5 and higher
#### MySensors version 1.5 and higher
S_TYPE | V_TYPE
---------------|----------------------------------

View file

@ -18,8 +18,6 @@ Home Assistant uses [SQLAlchemy](http://www.sqlalchemy.org/) as Object Relationa
The default database engine is [SQLite](https://www.sqlite.org/) which doesn't require any configuration. The database is stored in your Home Assistant configuration directory (`.homeassistant`) and called `home-assistant.db`.
```bash
To setup the `recorder` component in your installation, add the following to your `configuration.yaml` file:
```yaml