Skip to content

Commit 28fd511

Browse files
committed
Merge branch 'current' into next
2 parents 964b622 + 6456f64 commit 28fd511

File tree

54 files changed

+553
-83
lines changed

Some content is hidden

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

54 files changed

+553
-83
lines changed

_config.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ social:
140140
# Home Assistant release details
141141
current_major_version: 0
142142
current_minor_version: 52
143-
current_patch_version: 0
144-
date_released: 2017-08-26
143+
current_patch_version: 1
144+
date_released: 2017-08-28
145145

146146
# Either # or the anchor link to latest release notes in the blog post.
147147
# Must be prefixed with a # and have double quotes around it.
148148
# Major release:
149-
patch_version_notes: "#"
149+
patch_version_notes: "#release-0521---august-28"
150150
# Minor release (Example #release-0431---april-25):

plugins/filters.rb

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
module Jekyll
2+
module AssetFilter
3+
# Octopress filters
4+
# Copyright (c) 2014 Brandon Mathis
5+
6+
# MIT License
7+
8+
# Permission is hereby granted, free of charge, to any person obtaining
9+
# a copy of this software and associated documentation files (the
10+
# "Software"), to deal in the Software without restriction, including
11+
# without limitation the rights to use, copy, modify, merge, publish,
12+
# distribute, sublicense, and/or sell copies of the Software, and to
13+
# permit persons to whom the Software is furnished to do so, subject to
14+
# the following conditions:
15+
16+
# The above copyright notice and this permission notice shall be
17+
# included in all copies or substantial portions of the Software.
18+
19+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
23+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
24+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
25+
26+
def site_url
27+
'https://home-assistant.io'
28+
end
29+
30+
# Prepend a url with the full site url
31+
#
32+
# input - a url
33+
#
34+
# Returns input with all urls expanded to include the full site url
35+
# e.g. /images/awesome.gif => http://example.com/images/awesome.gif
36+
#
37+
def full_url(input)
38+
expand_url(input, site_url)
39+
end
40+
41+
# Prepends input with a url fragment
42+
#
43+
# input - An absolute url, e.g. /images/awesome.gif
44+
# url - The fragment to prepend the input, e.g. /blog
45+
#
46+
# Returns the modified url, e.g /blog
47+
#
48+
def expand_url(input, url=nil)
49+
url ||= root
50+
51+
url = if input.start_with?("http", url)
52+
input
53+
else
54+
File.join(url, input)
55+
end
56+
57+
smart_slash(url)
58+
end
59+
60+
# Ensure a trailing slash if a url ends with a directory
61+
def smart_slash(input)
62+
if !(input =~ /\.\w+$/)
63+
input = File.join(input, '/')
64+
end
65+
input
66+
end
67+
68+
# Convert url input into a standard canonical url by expanding urls and
69+
# removing url fragments ending with `index.[ext]`
70+
def canonical_url(input)
71+
full_url(input).sub(/index\.\w+$/i, '')
72+
end
73+
end
74+
end
75+
76+
Liquid::Template.register_filter(Jekyll::AssetFilter)

source/_components/binary_sensor.rpi_gpio.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ binary_sensor:
2929
Configuration variables:
3030
3131
- **ports** array (*Required*): Array of used ports.
32-
- **port: name** (*Required*): Port numbers and corresponding names.
32+
- **port: name** (*Required*): Port numbers (BCM mode pin numbers) and corresponding names.
3333
- **pull_mode** (*Optional*): The internal pull to use (UP or DOWN). Default is UP.
3434
- **bouncetime** (*Optional*): The time in milliseconds for port debouncing. Default is 50ms.
3535
- **invert_logic** (*Optional*): If true, inverts the output logic to ACTIVE LOW. Default is false (ACTIVE HIGH).

source/_components/binary_sensor.template.markdown

-13
Original file line numberDiff line numberDiff line change
@@ -98,19 +98,6 @@ binary_sensor:
9898
- sensor.kitchen_co_status
9999
- sensor.wardrobe_co_status
100100
```
101-
### {% linkable_title Change the icon %}
102-
103-
This example shows how to change the icon based on the day/night cycle.
104-
105-
```yaml
106-
sensor:
107-
- platform: template
108-
sensors:
109-
day_night:
110-
friendly_name: 'Day/Night'
111-
value_template: {% raw %}'{% if is_state("sun.sun", "above_horizon") %}Day{% else %}Night{% endif %}'{% endraw %}
112-
icon_template: {% raw %}'{% if is_state("sun.sun", "above_horizon") %}mdi:weather-sunny{% else %}mdi:weather-night{% endif %}'{% endraw %}
113-
```
114101

115102
### {% linkable_title Washing Machine Running %}
116103

source/_components/cover.template.markdown

+107-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ cover:
2424
covers:
2525
garage_door:
2626
friendly_name: "Garage Door"
27-
value_template: "{% raw %}{{is_state('sensor.garage_door > 0'}}{% endraw %}"
27+
value_template: "{% raw %}'{{is_state('sensor.garage_door > 0'}}'{% endraw %}"
2828
open_cover:
2929
service: script.open_garage_door
3030
close_cover:
@@ -63,12 +63,13 @@ In this section you will find some real life examples of how to use this cover.
6363
This example converts a garage door with a controllable switch and position sensor into a cover.
6464

6565
```yaml
66+
{% raw %}
6667
cover:
6768
- platform: template
6869
covers:
6970
garage_door:
7071
friendly_name: 'Garage Door'
71-
value_template: "{% raw %}{{ sensor.garage_door }}{% endraw %}"
72+
value_template: "{{ sensor.garage_door }}"
7273
open_cover:
7374
service: switch.turn_on
7475
entity_id: switch.garage_door
@@ -78,6 +79,109 @@ cover:
7879
stop_cover:
7980
service: switch.turn_on
8081
entity_id: switch.garage_door
81-
icon_template: "{% raw %}{% if not is_state('sensor.garage_door', 'on') %}mdi:garage-open{% else %}mdi:garage{% endif %}{% endraw %}"
82+
icon_template: "{% if not is_state('sensor.garage_door', 'on') %}mdi:garage-open{% else %}mdi:garage{% endif %}"{% endraw %}
83+
```
84+
85+
### {% linkable_title Multi Covers %}
86+
87+
This example allows you to control two or more covers at once.
88+
89+
```yaml
90+
{% raw %}
91+
homeassistant:
92+
customize:
93+
all_covers:
94+
assume_state: true
95+
96+
cover:
97+
- platform: template
98+
covers:
99+
all_covers:
100+
friendly_name: 'All Covers'
101+
open_cover:
102+
service: script.cover_all_open
103+
close_cover:
104+
service: script.cover_all_close
105+
stop_cover:
106+
service: script.cover_all_stop
107+
set_cover_position:
108+
service: script.cover_all_set_position
109+
data_template:
110+
position: "{{ position }}"
111+
value_template: >
112+
{% if is_state('sensor.all_covers', 'open') %}
113+
open
114+
{% else %}
115+
closed
116+
{% endif %}
117+
118+
icon_template: >
119+
{% if is_state('sensor.all_covers', 'open') %}
120+
mdi:window-open
121+
{% else %}
122+
mdi:window-closed
123+
{% endif %}
124+
125+
entity_id:
126+
- cover.bedroom
127+
- cover.livingroom
128+
129+
sensor:
130+
- platform: template
131+
sensors:
132+
all_covers:
133+
value_template: >
134+
{% if is_state('cover.bedroom', 'open') %}
135+
open
136+
{% elif is_state('cover.livingroom', 'open') %}
137+
open
138+
{% else %}
139+
closed
140+
{% endif %}
141+
142+
entity_id:
143+
- cover.bedroom
144+
- cover.livingroom
145+
146+
script:
147+
cover_all_open:
148+
sequence:
149+
- service: cover.open_cover
150+
entity_id: cover.bedroom
151+
- service: cover.open_cover
152+
entity_id: cover.livingroom
153+
cover_all_stop:
154+
sequence:
155+
- service: cover.stop_cover
156+
entity_id: cover.bedroom
157+
- service: cover.stop_cover
158+
entity_id: cover.livingroom
159+
cover_all_close:
160+
sequence:
161+
- service: cover.close_cover
162+
entity_id: cover.bedroom
163+
- service: cover.close_cover
164+
entity_id: cover.livingroom
165+
cover_all_set_position:
166+
sequence:
167+
- service: cover.set_cover_position
168+
entity_id: cover.bedroom
169+
data_template:
170+
position: "{{ position }}"
171+
- service: cover.set_cover_position
172+
entity_id: cover.livingroom
173+
data_template:
174+
position: "{{ position }}"
82175
176+
automation:
177+
- alias: 'Close covers at night'
178+
trigger:
179+
- platform: sun
180+
event: sunset
181+
offset: '+00:30:00'
182+
action:
183+
service: cover.set_cover_position
184+
entity_id: cover.all_covers
185+
data_template:
186+
position: 25{% endraw %}
83187
```

source/_components/group.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Configuration variables:
5858
5959
- **view** (*Optional*): If yes then the entry will be shown as a view (tab) at the top.
6060
- **name** (*Optional*): Name of the group.
61-
- **icon** (*Optional*): If the group is a view, this icon will show at the top in the frontend instead of the name. If it's not a view, then the icon shows when this group is used in another group.
61+
- **icon** (*Optional*): If the group is a view, this icon will show at the top in the frontend instead of the name. If the group is a view and both name and icon have been specified, the icon will appear at the top of the fronted and the name will be displayed as the mouse-over text. If it's not a view, then the icon shows when this group is used in another group.
6262
- **control** (*Optional*): Set value to `hidden`. If hidden then the group switch will be hidden.
6363
- **entities** (*Required*): array or comma delimited string, list of entities to group.
6464

source/_components/input_boolean.markdown

+5-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ ha_category: Automation
1313

1414
The `input_boolean` component allows the user to define boolean values that can be controlled via the frontend and can be used within conditions of automation. This can for example be used to disable or enable certain automations.
1515

16+
To enable input booleans in your installation, add the following lines to your `configuration.yaml`:
17+
1618
```yaml
1719
# Example configuration.yaml entry
1820
input_boolean:
@@ -25,9 +27,9 @@ input_boolean:
2527
Configuration variables:
2628
2729
- **[alias]** (*Required*): Alias for the input.
28-
- **name** (*Optional*): Friendly name of the input.
29-
- **initial** (*Optional*): Initial value when Home Assistant starts.
30-
- **icon** (*Optional*): Icon for entry.
30+
- **name** (*Optional*): Friendly name of the input.
31+
- **initial** (*Optional*): Initial value when Home Assistant starts. Defaults to `False`.
32+
- **icon** (*Optional*): Icon for entry.
3133

3234
Pick an icon that you can find on [materialdesignicons.com](https://materialdesignicons.com/) to use for your input and prefix the name with `mdi:`. For example `mdi:car`, `mdi:ambulance`, or `mdi:motorbike`.
3335

source/_components/input_select.markdown

+22-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ha_release: 0.13
1414

1515
The `input_select` component allows the user to define a list of values that can be selected via the frontend and can be used within conditions of automation. When a user selects a new item, a state transition event is generated. This state event can be used in an `automation` trigger.
1616

17-
To enable this platform, add the following lines to your `configuration.yaml`:
17+
To enable this platform in your installation, add the following lines to your `configuration.yaml`:
1818

1919
```yaml
2020
# Example configuration.yaml entry
@@ -35,11 +35,11 @@ input_select:
3535
3636
Configuration variables:
3737
38-
- **[alias]** (*Required*): Alias for the input.
39-
- **name** (*Optional*): Friendly name of the input.
40-
- **options** array: List of options to choose from
41-
- **initial** (*Optional*): Initial value when Home Assistant starts.
42-
- **icon** (*Optional*): Icon for entry.
38+
- **[alias]** array (*Required*): Alias for the input. Multiple entries are allowed..
39+
- **name** (*Optional*): Friendly name of the input.
40+
- **options** array (*Required*): List of options to choose from.
41+
- **initial** (*Optional*): Initial value when Home Assistant starts.
42+
- **icon** (*Optional*): Icon for entry.
4343
4444
Pick an icon that you can find on [materialdesignicons.com](https://materialdesignicons.com/) to use for your input and prefix the name with `mdi:`. For example `mdi:car`, `mdi:ambulance`, or `mdi:motorbike`.
4545

@@ -71,6 +71,22 @@ automation:
7171
option: Paulus
7272
```
7373

74+
To dynamically set the `input_select` options you can call `input_select.set_options`. The following example can be used in an automation rule:
75+
76+
```yaml
77+
# Example configuration.yaml entry
78+
automation:
79+
- alias: example automation
80+
trigger:
81+
platform: event
82+
event_type: MY_CUSTOM_EVENT
83+
action:
84+
- service: input_select.set_options
85+
data:
86+
entity_id: input_select.who_cooks
87+
options: ["Item A", "Item B", "Item C"]
88+
```
89+
7490
### {% linkable_title Scenes %}
7591

7692
To specify a target option in a [Scene](/components/scene/) you have to specify the target as `option` attribute:

source/_components/input_slider.markdown

+8-6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ ha_release: 0.16
1414

1515
The `input_slider` component allows the user to define values that can be controlled via the frontend and can be used within conditions of automation. Changes to the slider generate state events. These state events can be utilized as `automation` triggers as well.
1616

17+
To enable this input sliders in your installation, add the following lines to your `configuration.yaml`:
18+
1719
```yaml
1820
# Example configuration.yaml entry
1921
input_slider:
@@ -27,12 +29,12 @@ input_slider:
2729
2830
Configuration variables:
2931
30-
- **[alias]** (*Required*): Alias for the slider input.
31-
- **min** (*Required*): Minimum value for the slider.
32-
- **max** (*Required*): Maximum value for the slider.
33-
- **name** (*Optional*): Friendly name of the slider input.
34-
- **initial** (*Optional*): Initial value when Home Assistant starts.
35-
- **step** (*Optional*): Step value for the slider.
32+
- **[alias]** (*Required*): Alias for the slider input. Multiple entries are allowed.
33+
- **min** (*Required*): Minimum value for the slider.
34+
- **max** (*Required*): Maximum value for the slider.
35+
- **name** (*Optional*): Friendly name of the slider input.
36+
- **initial** (*Optional*): Initial value when Home Assistant starts. Defaults to 0.
37+
- **step** (*Optional*): Step value for the slider. Defaults to 1.
3638
3739
## {% linkable_title Automation Examples %}
3840

source/_components/isy994.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ A device is created by creating a directory, with the name for the device, under
8888
* *HA.lock* will create a lock
8989
* *HA.switch* will create a switch
9090

91-
A program, named *status*, is required under the program device directory. A program, named *actions*, is required for all program devices except for binary_sensor. Any other programs in these device directories will be ignored.
91+
A program, named *status*, is required under the program device directory. A program, named *actions*, is required for all program devices except for binary_sensor. Any other programs in these device directories will be ignored. The *status* program requires that you create a variable with the name of your choice. This variable will store the actual status of the new device and will be updated by the *action* program.
9292

9393
<p class='img'>
9494
<img src='{{site_root}}/images/isy994/isy994_CoverExample.png' />

source/_components/media_player.bluesound.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sharing: true
99
footer: true
1010
logo: bluesound.png
1111
ha_category: Media Player
12-
featured: true
12+
featured: false
1313
ha_release: 0.51
1414
ha_iot_class: "Local Polling"
1515
---

0 commit comments

Comments
 (0)