From eb6acd46482cfe8871fe1e723eb8047957952145 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Thu, 14 Jul 2016 07:38:39 +0000 Subject: [PATCH] Site updated at 2016-07-14 07:38:39 UTC --- atom.xml | 2 +- blog/categories/community/atom.xml | 2 +- blog/categories/device-tracking/atom.xml | 2 +- blog/categories/esp8266/atom.xml | 2 +- blog/categories/how-to/atom.xml | 2 +- blog/categories/ibeacons/atom.xml | 2 +- blog/categories/internet-of-things/atom.xml | 2 +- blog/categories/mqtt/atom.xml | 2 +- blog/categories/organisation/atom.xml | 2 +- blog/categories/owntracks/atom.xml | 2 +- blog/categories/presence-detection/atom.xml | 2 +- .../public-service-announcement/atom.xml | 2 +- blog/categories/release-notes/atom.xml | 2 +- blog/categories/survey/atom.xml | 2 +- blog/categories/talks/atom.xml | 2 +- blog/categories/technology/atom.xml | 2 +- blog/categories/user-stories/atom.xml | 2 +- blog/categories/video/atom.xml | 2 +- blog/categories/website/atom.xml | 2 +- components/sensor.template/index.html | 65 ++++++++++++------- developers/releasing/index.html | 10 +-- developers/server_sent_events/index.html | 28 +++++++- sitemap.xml | 16 ++--- 23 files changed, 99 insertions(+), 58 deletions(-) diff --git a/atom.xml b/atom.xml index 02efc1e7e7..9ec2eb640d 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Home Assistant]]> - 2016-07-14T06:51:05+00:00 + 2016-07-14T07:38:00+00:00 https://home-assistant.io/ diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml index cf50570b17..841f7d7a2c 100644 --- a/blog/categories/community/atom.xml +++ b/blog/categories/community/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Community | Home Assistant]]> - 2016-07-14T06:51:05+00:00 + 2016-07-14T07:38:00+00:00 https://home-assistant.io/ diff --git a/blog/categories/device-tracking/atom.xml b/blog/categories/device-tracking/atom.xml index 90a4ae850d..4fcf9126df 100644 --- a/blog/categories/device-tracking/atom.xml +++ b/blog/categories/device-tracking/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Device-Tracking | Home Assistant]]> - 2016-07-14T06:51:05+00:00 + 2016-07-14T07:38:00+00:00 https://home-assistant.io/ diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml index 64e65edad1..a94c497e5c 100644 --- a/blog/categories/esp8266/atom.xml +++ b/blog/categories/esp8266/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: ESP8266 | Home Assistant]]> - 2016-07-14T06:51:05+00:00 + 2016-07-14T07:38:00+00:00 https://home-assistant.io/ diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml index ddb71f1342..96c70a6bb9 100644 --- a/blog/categories/how-to/atom.xml +++ b/blog/categories/how-to/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: How-To | Home Assistant]]> - 2016-07-14T06:51:05+00:00 + 2016-07-14T07:38:00+00:00 https://home-assistant.io/ diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml index 239a97c832..28e9fb6672 100644 --- a/blog/categories/ibeacons/atom.xml +++ b/blog/categories/ibeacons/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: iBeacons | Home Assistant]]> - 2016-07-14T06:51:05+00:00 + 2016-07-14T07:38:00+00:00 https://home-assistant.io/ diff --git a/blog/categories/internet-of-things/atom.xml b/blog/categories/internet-of-things/atom.xml index b5bffa645e..13e0306303 100644 --- a/blog/categories/internet-of-things/atom.xml +++ b/blog/categories/internet-of-things/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Internet-of-Things | Home Assistant]]> - 2016-07-14T06:51:05+00:00 + 2016-07-14T07:38:00+00:00 https://home-assistant.io/ diff --git a/blog/categories/mqtt/atom.xml b/blog/categories/mqtt/atom.xml index c895a26de4..c0db603729 100644 --- a/blog/categories/mqtt/atom.xml +++ b/blog/categories/mqtt/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: MQTT | Home Assistant]]> - 2016-07-14T06:51:05+00:00 + 2016-07-14T07:38:00+00:00 https://home-assistant.io/ diff --git a/blog/categories/organisation/atom.xml b/blog/categories/organisation/atom.xml index 2cb8300bef..bc6135ff49 100644 --- a/blog/categories/organisation/atom.xml +++ b/blog/categories/organisation/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Organisation | Home Assistant]]> - 2016-07-14T06:51:05+00:00 + 2016-07-14T07:38:00+00:00 https://home-assistant.io/ diff --git a/blog/categories/owntracks/atom.xml b/blog/categories/owntracks/atom.xml index 42c2ae95bf..5a1c31cd4b 100644 --- a/blog/categories/owntracks/atom.xml +++ b/blog/categories/owntracks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: OwnTracks | Home Assistant]]> - 2016-07-14T06:51:05+00:00 + 2016-07-14T07:38:00+00:00 https://home-assistant.io/ diff --git a/blog/categories/presence-detection/atom.xml b/blog/categories/presence-detection/atom.xml index c91c9dc16d..de6ec786fb 100644 --- a/blog/categories/presence-detection/atom.xml +++ b/blog/categories/presence-detection/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Presence-Detection | Home Assistant]]> - 2016-07-14T06:51:05+00:00 + 2016-07-14T07:38:00+00:00 https://home-assistant.io/ diff --git a/blog/categories/public-service-announcement/atom.xml b/blog/categories/public-service-announcement/atom.xml index 8868bde6e5..ea3e8bf501 100644 --- a/blog/categories/public-service-announcement/atom.xml +++ b/blog/categories/public-service-announcement/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Public-Service-Announcement | Home Assistant]]> - 2016-07-14T06:51:05+00:00 + 2016-07-14T07:38:00+00:00 https://home-assistant.io/ diff --git a/blog/categories/release-notes/atom.xml b/blog/categories/release-notes/atom.xml index 1e2935d9c2..7ae0b27f29 100644 --- a/blog/categories/release-notes/atom.xml +++ b/blog/categories/release-notes/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Release-Notes | Home Assistant]]> - 2016-07-14T06:51:05+00:00 + 2016-07-14T07:38:00+00:00 https://home-assistant.io/ diff --git a/blog/categories/survey/atom.xml b/blog/categories/survey/atom.xml index 213dbf0b18..832d13ebfa 100644 --- a/blog/categories/survey/atom.xml +++ b/blog/categories/survey/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Survey | Home Assistant]]> - 2016-07-14T06:51:05+00:00 + 2016-07-14T07:38:00+00:00 https://home-assistant.io/ diff --git a/blog/categories/talks/atom.xml b/blog/categories/talks/atom.xml index 61fa14ac9f..f019c89cb5 100644 --- a/blog/categories/talks/atom.xml +++ b/blog/categories/talks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Talks | Home Assistant]]> - 2016-07-14T06:51:05+00:00 + 2016-07-14T07:38:00+00:00 https://home-assistant.io/ diff --git a/blog/categories/technology/atom.xml b/blog/categories/technology/atom.xml index 4b94c7a87d..08f5add92b 100644 --- a/blog/categories/technology/atom.xml +++ b/blog/categories/technology/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Technology | Home Assistant]]> - 2016-07-14T06:51:05+00:00 + 2016-07-14T07:38:00+00:00 https://home-assistant.io/ diff --git a/blog/categories/user-stories/atom.xml b/blog/categories/user-stories/atom.xml index c8861d2f9e..64fa5e02a0 100644 --- a/blog/categories/user-stories/atom.xml +++ b/blog/categories/user-stories/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: User-Stories | Home Assistant]]> - 2016-07-14T06:51:05+00:00 + 2016-07-14T07:38:00+00:00 https://home-assistant.io/ diff --git a/blog/categories/video/atom.xml b/blog/categories/video/atom.xml index e303b987aa..b423ba5e5f 100644 --- a/blog/categories/video/atom.xml +++ b/blog/categories/video/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Video | Home Assistant]]> - 2016-07-14T06:51:05+00:00 + 2016-07-14T07:38:00+00:00 https://home-assistant.io/ diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml index 5d2eb88b69..ba3f0e5f36 100644 --- a/blog/categories/website/atom.xml +++ b/blog/categories/website/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Website | Home Assistant]]> - 2016-07-14T06:51:05+00:00 + 2016-07-14T07:38:00+00:00 https://home-assistant.io/ diff --git a/components/sensor.template/index.html b/components/sensor.template/index.html index 9f78b7272e..cc68ed3254 100644 --- a/components/sensor.template/index.html +++ b/components/sensor.template/index.html @@ -134,15 +134,30 @@
sensor:
   platform: template
   sensors:
-      solar_angle:
-        value_template: '{{ "%+.1f"|format(states.sun.sun.attributes.elevation) }}'
-        friendly_name: 'Sun Angle'
-        unit_of_measurement: '°'
+    solar_angle:
+      value_template: '{{ "%+.1f"|format(states.sun.sun.attributes.elevation) }}'
+      friendly_name: 'Sun Angle'
+      unit_of_measurement: '°'
 
-

Multi line example with an if test (and warnings disabled)

+

Renaming sensor output

+ +

If you don’t like the wording of a sensor output then the template sensor can help too. Processes monitored by the System Monitor sensor show on or off if they are running or not. This example shows how the output of a monitored glances process can be renamed.

+ +
+
sensor:
+  platform: template
+  sensors:
+    glances:
+      value_template: 'running'
+      friendly_name: 'Glances'
+
+
+
+ +

Multiline example with an if test (and warnings disabled)

This example shows a multiple line template with and if test. It looks at a sensing switch and shows on/off in the frontend. It disables warnings to avoid log messages where the switch it depends on isn’t loaded yet.

@@ -150,23 +165,24 @@
sensor:
   platform: template
   sensors:
-      kettle:
-        friendly_name: 'Kettle'
-        value_template: >-
-            {%- if is_state("switch.kettle", "off") %}
-                off
-            {%  elif states.switch.kettle.attributes.kwh < 1000 %}
-                standby
-            {% elif is_state("switch.kettle", "on") %}
-                on
-            {% else %}
-                failed
-            {%- endif %}
+    kettle:
+      friendly_name: 'Kettle'
+      value_template: >-
+          {%- if is_state("switch.kettle", "off") %}
+              off
+          {%  elif states.switch.kettle.attributes.kwh < 1000 %}
+              standby
+          {% elif is_state("switch.kettle", "on") %}
+              on
+          {% else %}
+              failed
+          {%- endif %}
 
-       warnings: Off
+     warnings: Off
 
+

(please note the blank line to close the multi-line template)

Change the unit of measurment

@@ -178,18 +194,19 @@ platform: template sensors: transmission_down_speed_kbps: - value_template: '{{ states.sensor.transmission_down_speed.state | multiply(1024) }}' - friendly_name: 'Transmission Down Speed' - unit_of_measurement: 'kB/s' + value_template: '{{ states.sensor.transmission_down_speed.state | multiply(1024) }}' + friendly_name: 'Transmission Down Speed' + unit_of_measurement: 'kB/s' transmission_up_speed_kbps: - value_template: '{{ states.sensor.transmission_up_speed.state | multiply(1024) }}' - friendly_name: 'Transmission Up Speed' - unit_of_measurement: 'kB/s' + value_template: '{{ states.sensor.transmission_up_speed.state | multiply(1024) }}' + friendly_name: 'Transmission Up Speed' + unit_of_measurement: 'kB/s' + diff --git a/developers/releasing/index.html b/developers/releasing/index.html index 3052954fe1..28b1c8731b 100644 --- a/developers/releasing/index.html +++ b/developers/releasing/index.html @@ -103,12 +103,12 @@

Website

    -
  1. Create a blog post and base it on the PR text. Add images, additional text, links, etc. if it adds value. Tag each platform/component in message to documentation.
  2. -
  3. Create missing documentation as stumbs.
  4. -
  5. Create a pull request from next to master with the upcoming release number as title.
  6. -
  7. Merge master into next (git checkout next && git merge master) to make the PR mergable.
  8. +
  9. Create a blog post in next and base it on the text of the PR in the main repository. Add images, additional text, links, etc. if it adds value. Tag each platform/component in message to documentation.
  10. +
  11. Create missing documentation as stumbs in next.
  12. Update the link on the frontpage (source/index.html) to link to the new release blog post and version number.
  13. -
  14. Merge blog post and updated frontpage to master (git merge next).
  15. +
  16. Create a pull request from next to master with the upcoming release number as title.
  17. +
  18. Merge master into next ($ git checkout next && git merge master) to make the PR mergable.
  19. +
  20. Merge pull request (blog post, updated frontpage, and all new documentation) to master.

Python Package Index

diff --git a/developers/server_sent_events/index.html b/developers/server_sent_events/index.html index 455f19e891..5c017b854a 100644 --- a/developers/server_sent_events/index.html +++ b/developers/server_sent_events/index.html @@ -98,7 +98,7 @@

There are various ways to access the stream. One is curl:

-
$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \
+  
$ curl -X GET -H "x-ha-access: 12345" \
        -H "Content-Type: application/json" http://localhost:8123/api/stream
 
@@ -126,10 +126,34 @@

Visit http://localhost:8123/local/sse.html to see the stream of events.

-

Example

+

Examples

+ +

Website

The home-assistant-sse repository contains an more advanced example.

+

Python

+ +

If you want test the server-sent events without creating a website then the Python module sseclient can help. Install it first:

+ +
+
$ pip3 install sseclient
+
+
+
+ +

The simplest script to consume the SSE looks like the following snipplet.

+ +
+
from sseclient import SSEClient
+
+messages = SSEClient('http://localhost:8123/api/stream?api_password=MYPASS')
+for msg in messages:
+    print(msg)
+
+
+
+ diff --git a/sitemap.xml b/sitemap.xml index 27e953504d..c129e9b73d 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1914,34 +1914,34 @@ https://home-assistant.io/demo/dev-tools.html - 2016-07-14T06:50:13+00:00 + 2016-07-14T07:37:17+00:00 https://home-assistant.io/demo/frontend.html - 2016-07-14T06:50:13+00:00 + 2016-07-14T07:37:17+00:00 https://home-assistant.io/demo/index.html - 2016-07-14T06:50:13+00:00 + 2016-07-14T07:37:17+00:00 https://home-assistant.io/demo/partial-map.html - 2016-07-14T06:50:13+00:00 + 2016-07-14T07:37:17+00:00 https://home-assistant.io/googlef4f3693c209fe788.html - 2016-07-14T06:50:13+00:00 + 2016-07-14T07:37:17+00:00 https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html - 2016-07-14T06:50:13+00:00 + 2016-07-14T07:37:17+00:00 https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html - 2016-07-14T06:50:13+00:00 + 2016-07-14T07:37:17+00:00 https://home-assistant.io/static/mdi-demo.html - 2016-07-14T06:50:13+00:00 + 2016-07-14T07:37:17+00:00