Skip to content

Commit 00e221b

Browse files
committed
Merge branch 'current' into next
2 parents 5f68226 + 8791e6e commit 00e221b

12 files changed

+727
-136
lines changed

_config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,12 @@ social:
139139

140140
# Home Assistant release details
141141
current_major_version: 0
142-
current_minor_version: 55
143-
current_patch_version: 1
144-
date_released: 2017-10-15
142+
current_minor_version: 56
143+
current_patch_version: 0
144+
date_released: 2017-10-21
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: "#release-0551---october-15"
149+
#patch_version_notes: "#release-0551---october-15"
150150
# Minor release (Example #release-0431---april-25):

source/_components/switch.telnet.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ Configuration variables:
4040
- **command_on** (*Required*): Command to turn device on.
4141
- **command_off** (*Required*): Command to turn device off.
4242
- **command_state** (*Required*): Command to determine the state of the switch. If not defined the switch will assume successful state changes.
43-
- **value_template** (*Required*): The template evaluating to `true` will indicate the switch is on.
43+
- **value_template** (*Required*): The template evaluating to `true` will indicate that the switch is on.
4444
- **name** (*Optional*): The name used to display the switch in the frontend.

source/_docs/autostart/init.d.markdown

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,23 @@ $ sudo chmod +x /etc/init.d/hass-daemon
2626

2727
Create or pick a user that the Home Assistant daemon will run under. Update script to set `RUN_AS` to the username that should be used to execute hass.
2828

29-
### {% linkable_title 3. Register the daemon with Linux %}
29+
### {% linkable_title 3. Change hass executable if required. %}
30+
31+
Some installation environments may require a change in the Home Assistant executable `hass`. Update script to set `HASS_BIN` to the appropriate `hass` executable path.
32+
33+
### {% linkable_title 4. Register the daemon with Linux %}
3034

3135
```bash
3236
$ sudo update-rc.d hass-daemon defaults
3337
```
3438

35-
### {% linkable_title 4. Install this service %}
39+
### {% linkable_title 5. Install this service %}
3640

3741
```bash
3842
$ sudo service hass-daemon install
3943
```
4044

41-
### {% linkable_title 5. Restart Machine %}
45+
### {% linkable_title 6. Restart Machine %}
4246

4347
That's it. Restart your machine and Home Assistant should start automatically.
4448

@@ -64,6 +68,8 @@ If any commands need to run before executing hass (like loading a virtual enviro
6468
# /etc/init.d Service Script for Home Assistant
6569
# Created with: https://gist.github.com/naholyr/4275302#file-new-service-sh
6670
PRE_EXEC=""
71+
# Typically /usr/bin/hass
72+
HASS_BIN="hass"
6773
RUN_AS="USER"
6874
PID_FILE="/var/run/hass.pid"
6975
CONFIG_DIR="/var/opt/homeassistant"
@@ -76,7 +82,7 @@ start() {
7682
return 1
7783
fi
7884
echo 'Starting service…' >&2
79-
local CMD="$PRE_EXEC hass $FLAGS $REDIRECT;"
85+
local CMD="$PRE_EXEC $HASS_BIN $FLAGS $REDIRECT;"
8086
su -c "$CMD" $RUN_AS
8187
echo 'Service started' >&2
8288
}

source/_docs/configuration/secrets.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ http:
2323
api_password: YOUR_PASSWORD
2424
```
2525
26-
Those entries need to be replaced with `!secret` and a identifier.
26+
Those entries need to be replaced with `!secret` and an identifier.
2727

2828
```yaml
2929
http:

source/_docs/z-wave/installation.markdown

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ There is one dependency you will need to have installed ahead of time (included
1818
$ sudo apt-get install libudev-dev
1919
```
2020

21+
When installing on macOS you may have to also run the command below ahead of time, replace "x.x" with the version of Python (`$ python3 --version`) you have installed.
22+
23+
```bash
24+
$ sudo /Applications/Python\ x.x/Install\ Certificates.command
25+
```
26+
2127
<p class='note'>
2228
The installation of python-openzwave can take half an hour or more on a Raspbery Pi.
2329
</p>

source/_posts/2017-10-21-release-56.markdown

Lines changed: 531 additions & 0 deletions
Large diffs are not rendered by default.

source/developers/credits.markdown

Lines changed: 90 additions & 90 deletions
Large diffs are not rendered by default.

source/developers/development_submitting.markdown

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ Submit your improvements, fixes, and new features to Home Assistant one at a tim
2424
`git add .`
2525

2626
`git commit -m "Added some-feature"`
27-
27+
28+
* Write a meaningful commit message and not only `Update` or `Fix`.
29+
* Use a capital letter to start with your commit message.
30+
* Don't prefix your commit message with `[bla.bla]` or `platform:`.
2831
* Consider adding tests to ensure that your code works.
2932

3033
5. Push your committed changes back to your fork on GitHub:

source/developers/frontend_creating_custom_panels.markdown

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -28,38 +28,38 @@ The `hello.html` contains the needed building blocks to create the elements insi
2828
</dom-module>
2929

3030
<script>
31-
Polymer({
32-
is: 'ha-panel-hello',
33-
properties: {
34-
// Home Assistant object
35-
hass: {
36-
type: Object,
37-
},
38-
// If should render in narrow mode
39-
narrow: {
40-
type: Boolean,
41-
value: false,
42-
},
43-
// If sidebar is currently shown
44-
showMenu: {
45-
type: Boolean,
46-
value: false,
47-
},
48-
// Home Assistant panel info
49-
// panel.config contains config passed to register_panel serverside
50-
panel: {
51-
type: Object,
52-
},
53-
who: {
54-
type: String,
55-
computed: 'computeWho(panel)',
56-
}
57-
},
31+
class HaPanelHello extends Polymer.Element {
32+
static get is() { return 'ha-panel-hello'; }
33+
34+
static get properties() {
35+
return {
36+
// Home Assistant object
37+
hass: Object,
38+
// If should render in narrow mode
39+
narrow: {
40+
type: Boolean,
41+
value: false,
42+
},
43+
// If sidebar is currently shown
44+
showMenu: {
45+
type: Boolean,
46+
value: false,
47+
},
48+
// Home Assistant panel info
49+
// panel.config contains config passed to register_panel serverside
50+
panel: Object,
51+
who: {
52+
type: String,
53+
computed: 'computeWho(panel)',
54+
},
55+
};
56+
}
5857

59-
computeWho: function (panel) {
58+
computeWho(panel) {
6059
return panel && panel.config && panel.config.who ? panel.config.who : 'World';
61-
},
62-
});
60+
}
61+
}
62+
customElements.define(HaPanelHello.is, HaPanelHello);
6363
</script>
6464
```
6565

source/developers/frontend_creating_custom_ui.markdown

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ sharing: true
99
footer: true
1010
ha_release: 0.38
1111
---
12+
1213
If you would like to use your own [State card](/developers/frontend_add_card/) without merging your code into [home-assistant-polymer](https://github.com/home-assistant/home-assistant-polymer/) you can create your own implementation.
1314

1415
Put the element source file and its dependencies in `www/custom_ui/` directory under your Home Assistant [configuration](/docs/configuration/) directory.
@@ -21,10 +22,13 @@ In `state-card-my-custom-light.html` you should use `<link rel="import">` to imp
2122
Do not import any dependencies used by the Home Assistant UI.
2223
Importing those will work in `development: 1` mode, but will fail in production mode.
2324

24-
1) In the `customize:` section of the `configuration.yaml` file put `custom_ui_state_card: state-card-my-custom-light`.
25-
2) In the `frontend` section use `extra_html_url` to specify the URL to load.
25+
1. In the `customize:` section of the `configuration.yaml` file put `custom_ui_state_card: state-card-my-custom-light`.
26+
2. In the `frontend` section use `extra_html_url` to specify the URL to load.
27+
28+
Example:
29+
30+
`configuration.yaml`:
2631

27-
For example:
2832
```yaml
2933
homeassistant:
3034
customize:
@@ -36,4 +40,42 @@ frontend:
3640
- /local/custom_ui/state-card-my-custom-light.html
3741
```
3842
43+
`www\custom_ui\state-card-my-custom-light.html`:
44+
45+
```javascript
46+
<dom-module id='state-card-my-custom-light'>
47+
<template>
48+
<style>
49+
50+
</style>
51+
<textarea>[[_toStr(StateObj)]]</textarea>
52+
</template>
53+
</dom-module>
54+
55+
<script>
56+
class StateCardMyCustomLight extends Polymer.Element {
57+
static get is() { return 'state-card-my-custom-light'; }
58+
59+
static get properties() {
60+
return {
61+
// Home Assistant object
62+
hass: Object,
63+
// inDialog is true if shown as more-info-card
64+
inDialog: {
65+
type: Boolean,
66+
value: false,
67+
},
68+
// includes state, config and more information of the entity
69+
stateObj: Object,
70+
};
71+
}
72+
73+
_toStr(obj) {
74+
return JSON.stringify(obj);
75+
}
76+
}
77+
customElements.define(StateCardMyCustomLight.is, StateCardMyCustomLight);
78+
</script>
79+
```
80+
3981
For more possibilities, see the [Custom UI section](/cookbook/#user-interface) on our Examples page.

source/hassio/run_local.markdown

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ footer: true
1111

1212
Hass.io is a managed environment, which means that you can't install applications that can be embedded into Home Assistant using the `command_line` sensor/switch.
1313

14-
There are two options if you need to run a script to read data from a sensor or send commands to other devices on Hass.io.
14+
There are three options if you need to run a script to read data from a sensor or send commands to other devices on Hass.io.
1515

1616
The first option is to write a custom component for Home Assistant. Using Python, you can communicate with your device. For more information about developing a custom component, take a look at the [developer documentation][custom-component].
1717

18-
The second option is to make a local add-on for Hass.io that sends the data to Home Assistant via MQTT. Before we dive into this, read up on [Hass.io add-on development][addons-tutorial] first.
18+
The second option is to use STDIN inside add-on and use the service `hassio.addon_stdin` to send data. More about this options look into [developer documentation][communication] for internal add-on communication. There is also describe how do you can easy access to Home-Assistant Rest API.
19+
20+
The third option is to make a local add-on for Hass.io that sends the data to Home Assistant via MQTT. Before we dive into this, read up on [Hass.io add-on development][addons-tutorial] first.
1921

2022
For security and speed, Hass.io does not provide a way for containers to communicate directly. So the first step is to set up a communication channel. We're going to use MQTT for this using the [MQTT broker add-on][mqtt-addon].
2123

@@ -98,3 +100,4 @@ done < <(mosquitto_sub -h "$MQTT_SERVER" -p "$MQTT_PORT" -u "$USER" -P "$PASSWOR
98100
[MQTT-addon]: /addons/mosquitto/
99101
[custom-component]: /developers/component_loading/
100102
[addons-tutorial]: /developers/hassio/addon_tutorial/
103+
[communication]: /developers/hassio/addon_communication/
88.7 KB
Loading

0 commit comments

Comments
 (0)