Skip to content

Commit 00d7d91

Browse files
committed
2 parents 7bc8afc + af4e746 commit 00d7d91

File tree

134 files changed

+3495
-663
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+3495
-663
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ end
2020

2121
group :jekyll_plugins do
2222
gem 'jekyll-paginate'
23+
gem 'jekyll-redirect-from'
2324
gem 'jekyll-sitemap'
2425
gem 'jekyll-time-to-read'
2526
gem 'octopress', '~> 3.0'

Gemfile.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ GEM
2727
rouge (~> 1.7)
2828
safe_yaml (~> 1.0)
2929
jekyll-paginate (1.1.0)
30+
jekyll-redirect-from (0.11.0)
31+
jekyll (>= 2.0)
3032
jekyll-sass-converter (1.3.0)
3133
sass (~> 3.2)
3234
jekyll-sitemap (0.11.0)
@@ -118,6 +120,7 @@ DEPENDENCIES
118120
haml (~> 4.0)
119121
jekyll (~> 3.0)
120122
jekyll-paginate
123+
jekyll-redirect-from
121124
jekyll-sitemap
122125
jekyll-time-to-read
123126
octopress (~> 3.0)

_config.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ kramdown:
4949
highlighter: rouge
5050

5151
gems:
52+
- jekyll-redirect-from
5253
- jekyll-time-to-read
5354
- octopress-filters
5455
- octopress-include-tag
@@ -130,10 +131,10 @@ social:
130131

131132
# Home Assistant release details
132133
current_major_version: 0
133-
current_minor_version: 37
134+
current_minor_version: 38
134135
current_patch_version: 0
135-
date_released: 2017-01-29
136+
date_released: 2017-02-11
136137

137138
# Either # or the anchor link to latest release notes in the blog post.
138139
# Must be prefixed with a # and have double quotes around it.
139-
patch_version_notes: ""
140+
patch_version_notes: "#"

sass/custom/_paulus.scss

Lines changed: 53 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,6 @@
1515
display: inline-block;
1616
font-weight: 500;
1717
}
18-
19-
.front-install {
20-
border: none;
21-
font-size: 1em;
22-
background-color: #333;
23-
margin-bottom: 16px;
24-
display: inline-block;
25-
padding: 8px;
26-
color: #DDD;
27-
28-
div:before {
29-
content: '$';
30-
color: #c82829;
31-
margin-right: 6px;
32-
}
33-
}
3418
}
3519

3620
.material-card {
@@ -320,56 +304,6 @@ p.note {
320304
-moz-transition-property: -moz-transform, opacity;
321305
transition-property: transform, opacity;
322306
}
323-
324-
#componentContainer {
325-
a {
326-
display: inline-block;
327-
width: 202px;
328-
height: 142px;
329-
background-color: #fefefe;
330-
margin-right: 4px;
331-
margin-bottom: 8px;
332-
border-radius: 2px;
333-
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
334-
padding: 8px;
335-
text-align: center;
336-
text-decoration: none;
337-
338-
.img-container {
339-
height: 50px;
340-
margin: 8px 0;
341-
font: 0/0 a;
342-
343-
&:before { /* create a full-height inline block pseudo=element */
344-
content: ' ';
345-
display: inline-block;
346-
vertical-align: middle; /* vertical alignment of the inline element */
347-
height: 100%;
348-
}
349-
350-
img {
351-
max-width: 100%;
352-
max-height: 50px;
353-
box-shadow: none;
354-
border: none;
355-
vertical-align: middle;
356-
}
357-
}
358-
359-
.title {
360-
text-decoration: none;
361-
font-size: 18px;
362-
color: #000;
363-
line-height: 1.3em;
364-
height: 2.6em;
365-
}
366-
367-
.category {
368-
font-size: 14px;
369-
color: #AAA;
370-
}
371-
}
372-
}
373307
}
374308

375309
@media only screen and (max-width: $lap-end) {
@@ -422,6 +356,55 @@ p.note {
422356
}
423357
}
424358

359+
.hass-option-cards {
360+
.option-card {
361+
display: inline-block;
362+
width: 202px;
363+
height: 142px;
364+
background-color: #fefefe;
365+
margin-right: 4px;
366+
margin-bottom: 8px;
367+
border-radius: 2px;
368+
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
369+
padding: 8px;
370+
text-align: center;
371+
text-decoration: none;
372+
373+
.img-container {
374+
height: 50px;
375+
margin: 8px 0;
376+
font: 0/0 a;
377+
378+
&:before { /* create a full-height inline block pseudo=element */
379+
content: ' ';
380+
display: inline-block;
381+
vertical-align: middle; /* vertical alignment of the inline element */
382+
height: 100%;
383+
}
384+
385+
img {
386+
max-width: 100%;
387+
max-height: 50px;
388+
box-shadow: none;
389+
border: none;
390+
vertical-align: middle;
391+
}
392+
}
393+
394+
.title {
395+
text-decoration: none;
396+
font-size: 18px;
397+
color: #000;
398+
line-height: 1.3em;
399+
height: 2.6em;
400+
}
401+
402+
.category {
403+
font-size: 14px;
404+
color: #AAA;
405+
}
406+
}
407+
}
425408

426409
.aside-module {
427410
.section {
@@ -481,3 +464,7 @@ twitterwidget {
481464
margin-left: auto;
482465
margin-right: auto;
483466
}
467+
468+
.text-center {
469+
text-align: center;
470+
}

source/_components/apiai.markdown

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
layout: page
3+
title: "Api.AI"
4+
description: "Instructions how integrate api.ai with Home Assistant."
5+
date: 2017-01-27 11:28
6+
sidebar: true
7+
comments: false
8+
sharing: true
9+
footer: true
10+
logo: apiai.png
11+
ha_category: Voice
12+
featured: true
13+
ha_release: 0.37
14+
---
15+
16+
This component is designed to be used with the "webhook" integration in api.ai. When a conversation ends with an user, api.ai sends an action and parameters to the webhook.
17+
18+
Api.ai requires a public endpoint (HTTPS recommended), so your Home Assistant should be exposed to Internet. Api.ai will return fall back answers if your server do not answer, or takes too long (more than 5 seconds).
19+
20+
Api.ai could be integrated with many popular messaging, virtual assistant and IoT platforms, eg.: Google Assistant (Google Actions), Skype, Messenger. [See here](https://docs.api.ai/docs/integrations) the complete list.
21+
22+
Using Api.ai will be easy to create conversations like:
23+
> User: Which is the temperature at home?
24+
>
25+
> Bot: The temperature is 34 degrees
26+
27+
> User: Turn on the light
28+
>
29+
> Bot: In which room?
30+
>
31+
> User: In the kitchen
32+
>
33+
> Bot: Turning on kitchen light
34+
35+
To use this integration you should define a conversation (intent) in Api.ai, configure Home Assistant with the speech to return and, optionally, the action to execute.
36+
37+
### {% linkable_title Configuring your api.ai account %}
38+
- [Login][apiai-web] with your Google account.
39+
- Click on "Create Agent"
40+
- Select name, language (if you are planning to use it with Google Actions check [here](https://support.google.com/assistant/answer/7108196?hl=en) supported languages) and time zone
41+
- Click "Save"
42+
- Go to "Fullfiment" (in the left menu)
43+
- Enable Webhook and set your HA url with the apiai endpoint. Eg.: ``https://myhome.duckdns.org/api/apiai?api_password=HA_PASSWORD``
44+
- Click "Save"
45+
- Create a new intent
46+
- Below "User says" write one phrase that you, the user, will tell Api.ai. Eg.: Which is the temperature at home?
47+
- In "Action" set some key (this will be the bind with HA config), eg.: GetTemperature
48+
- In "Response" set "Cannot connect to HA or it is taking to long" (fall back response)
49+
- At the end of the page, click on "Fulfillment" and check "Use webhook"
50+
- Click "Save"
51+
- On the top right, where is written "Try it now...", write, or say, the phrase you have previously defined and hit enter
52+
- Api.ai has send a request to your HA server
53+
54+
Take a look to "Integrations", in the left menu, to configure third parties.
55+
56+
57+
### {% linkable_title Configuring Home Assistant %}
58+
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.
59+
60+
You can use [templates] for setting `speech`.
61+
62+
Actions are using the [Home Assistant Script Syntax] and also have access to the variables from the intent.
63+
64+
[Home Assistant Script Syntax]: /getting-started/scripts/
65+
66+
Example of an Api.ai for the above configuration:
67+
68+
```yaml
69+
{% raw %}# Example configuration.yaml entry
70+
apiai:
71+
intents:
72+
GetTemperature:
73+
speech: We have {{ states.sensor.temperature }} degrees
74+
async_action: False
75+
action:
76+
service: notify.notify
77+
data_template:
78+
message: Api.ai has send a request
79+
{% endraw %}
80+
```
81+
82+
Inside an intent we can define this variables:
83+
- **speech** (*Optional*): Text or template to return to Api.ai
84+
- **action** (*Optional*): Script definition
85+
- **async_action** (*Optional*): If HA should execute the action asynchronously (returning response to Api.ai without waiting the action to finish). Should be set to `True` if Api.ai is returning the "Cannot connect to HA or it is taking to long" message, but then you will not be able to use values based on the result of the action. Defaults to `False`.
86+
87+
88+
## {% linkable_title Examples %}
89+
90+
Download [this zip](http://filebin.ca/3AZSHoXPnbEv/HomeAssistant_APIAI.zip) and load it in your Api.ai agent (Settings -> Export and Import) for examples intents to use with this configuration:
91+
92+
```yaml
93+
{% raw %}# Example configuration.yaml entry
94+
apiai:
95+
intents:
96+
Temperature:
97+
speech: The temperature at home is {{ states('sensor.home_temp') }} degrees
98+
LocateIntent:
99+
speech: >
100+
{%- for state in states.device_tracker -%}
101+
{%- if state.name.lower() == User.lower() -%}
102+
{{ state.name }} is at {{ state.state }}
103+
{%- elif loop.last -%}
104+
I am sorry, I do not know where {{ User }} is.
105+
{%- endif -%}
106+
{%- else -%}
107+
Sorry, I don't have any trackers registered.
108+
{%- endfor -%}
109+
WhereAreWeIntent:
110+
speech: >
111+
{%- if is_state('device_tracker.adri', 'home') and
112+
is_state('device_tracker.bea', 'home') -%}
113+
You are both home, you silly
114+
{%- else -%}
115+
Bea is at {{ states("device_tracker.bea") }}
116+
and Adri is at {{ states("device_tracker.adri") }}
117+
{% endif %}
118+
TurnLights:
119+
speech: Turning {{ Room }} lights {{ OnOff }}
120+
action:
121+
- service: notify.pushbullet
122+
data_template:
123+
message: Someone asked via apiai to turn {{ Room }} lights {{ OnOff }}
124+
- service_template: >
125+
{%- if OnOff == "on" -%}
126+
switch.turn_on
127+
{%- else -%}
128+
switch.turn_off
129+
{%- endif -%}
130+
data_template:
131+
entity_id: "switch.light_{{ Room | replace(' ', '_') }}"
132+
```
133+
134+
[apiai-web]: https://api.ai/
135+
[templates]: /topics/templating/
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
layout: page
3+
title: "Aurora sensor"
4+
description: "Know when auroras might be visible at your location"
5+
date: 2017-02-14 10:00
6+
sidebar: true
7+
comments: false
8+
sharing: true
9+
footer: true
10+
ha_category: Binary Sensor
11+
ha_release: 0.39
12+
---
13+
The `aurora` platform uses the [NOAA aurora forecast](http://www.swpc.noaa.gov/products/aurora-30-minute-forecast) service to let you know if an aurora might be visible at your home location in the next 30 minutes, based off of current solar flare activity.
14+
15+
This service gives a number 0-100 representing the current likelihood of visible auroras at your latitude/longitude. By default this sensor is set up to trigger when the reported likelihood for your location is > 75. It updates every 5 minutes.
16+
17+
You can check the attributes of the sensor to see your exact forecast.
18+
19+
To add the aurora binary sensor to your installation, add the following to your `configuration.yaml` file:
20+
21+
```yaml
22+
# Example configuration.yaml entry
23+
binary_sensor:
24+
- platform: aurora
25+
```
26+
27+
#### Configuration variables:
28+
29+
- **forecast_threshold** (*Optional*): Provide your own threshold number above which the sensor will trigger. Defaults to 75.
30+
31+
```yaml
32+
binary_sensor:
33+
- platform: aurora
34+
forecast_threshold: 50
35+
```

source/_components/binary_sensor.command_line.markdown

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Configuration variables:
2929
3030
- **command** (*Required*): The action to take to get the value.
3131
- **name** (*Optional*): Let you overwrite the the name of the device. By default *name* from the device is used.
32-
- **sensor_class** (*Optional*): The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend.
32+
- **device_class** (*Optional*): The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend.
3333
- **payload_on** (*Optional*): The payload that represents enabled state. Default is "ON".
3434
- **payload_off** (*Optional*): The payload that represents disabled state. Default is "OFF".
3535
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
@@ -48,7 +48,7 @@ binary_sensor:
4848
- platform: command_line
4949
command: netstat -na | find "33322" | find /c "LISTENING" > nul && (echo "Running") || (echo "Not running")
5050
name: 'sickragerunning'
51-
sensor_class: moving
51+
device_class: moving
5252
payload_on: "Running"
5353
payload_off: "Not running"
5454
```
@@ -62,7 +62,7 @@ binary_sensor:
6262
- platform: command_line
6363
command: 'ping -c 1 rasplex.local | grep "1 received" | wc -l'
6464
name: 'is_rasplex_online'
65-
sensor_class: connectivity
65+
device_class: connectivity
6666
payload_on: 1
6767
payload_off: 0
6868
```
@@ -74,7 +74,7 @@ binary_sensor:
7474
platform: command_line
7575
name: Printer
7676
command: ping -W 1 -c 1 192.168.1.10 > /dev/null 2>&1 && echo success || echo fail
77-
sensor_class: connectivity
77+
device_class: connectivity
7878
payload_on: "success"
7979
payload_off: "fail"
8080
```

0 commit comments

Comments
 (0)