From 67d9baeb1ece424f92d521f18cf2c0193fdbd028 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Sun, 8 May 2016 10:27:38 +0000 Subject: [PATCH] Site updated at 2016-05-08 10:27:38 UTC --- atom.xml | 2 +- blog/categories/community/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/user-stories/atom.xml | 2 +- blog/categories/website/atom.xml | 2 +- developers/platform_example_light/index.html | 38 ++++++++++++++----- sitemap.xml | 12 +++--- 18 files changed, 51 insertions(+), 31 deletions(-) diff --git a/atom.xml b/atom.xml index dffe842451..bb362048ea 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Home Assistant]]> - 2016-05-08T08:01:29+00:00 + 2016-05-08T10:26:57+00:00 https://home-assistant.io/ diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml index f1b47a5f97..963dad9a61 100644 --- a/blog/categories/community/atom.xml +++ b/blog/categories/community/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Community | Home Assistant]]> - 2016-05-08T08:01:29+00:00 + 2016-05-08T10:26:57+00:00 https://home-assistant.io/ diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml index fbc4606ac4..64aadb2124 100644 --- a/blog/categories/esp8266/atom.xml +++ b/blog/categories/esp8266/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: ESP8266 | Home Assistant]]> - 2016-05-08T08:01:29+00:00 + 2016-05-08T10:26:57+00:00 https://home-assistant.io/ diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml index c419a8c931..5bba3f42ba 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-05-08T08:01:29+00:00 + 2016-05-08T10:26:57+00:00 https://home-assistant.io/ diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml index acbd577896..4f8def76ea 100644 --- a/blog/categories/ibeacons/atom.xml +++ b/blog/categories/ibeacons/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: iBeacons | Home Assistant]]> - 2016-05-08T08:01:29+00:00 + 2016-05-08T10:26:57+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 df5f0ca6e5..1d2f5fed4a 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-05-08T08:01:29+00:00 + 2016-05-08T10:26:57+00:00 https://home-assistant.io/ diff --git a/blog/categories/mqtt/atom.xml b/blog/categories/mqtt/atom.xml index 81258ffe1d..48814f63f0 100644 --- a/blog/categories/mqtt/atom.xml +++ b/blog/categories/mqtt/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: MQTT | Home Assistant]]> - 2016-05-08T08:01:29+00:00 + 2016-05-08T10:26:57+00:00 https://home-assistant.io/ diff --git a/blog/categories/organisation/atom.xml b/blog/categories/organisation/atom.xml index 8666b28ceb..cfedf51b50 100644 --- a/blog/categories/organisation/atom.xml +++ b/blog/categories/organisation/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Organisation | Home Assistant]]> - 2016-05-08T08:01:29+00:00 + 2016-05-08T10:26:57+00:00 https://home-assistant.io/ diff --git a/blog/categories/owntracks/atom.xml b/blog/categories/owntracks/atom.xml index 1168e9d1da..10568c5b20 100644 --- a/blog/categories/owntracks/atom.xml +++ b/blog/categories/owntracks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: OwnTracks | Home Assistant]]> - 2016-05-08T08:01:29+00:00 + 2016-05-08T10:26:57+00:00 https://home-assistant.io/ diff --git a/blog/categories/presence-detection/atom.xml b/blog/categories/presence-detection/atom.xml index 418bd3313b..f79f28deae 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-05-08T08:01:29+00:00 + 2016-05-08T10:26:57+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 898229c229..f7aa9c3673 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-05-08T08:01:29+00:00 + 2016-05-08T10:26:57+00:00 https://home-assistant.io/ diff --git a/blog/categories/release-notes/atom.xml b/blog/categories/release-notes/atom.xml index 1f68130f24..ea257688fe 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-05-08T08:01:29+00:00 + 2016-05-08T10:26:57+00:00 https://home-assistant.io/ diff --git a/blog/categories/survey/atom.xml b/blog/categories/survey/atom.xml index aab98e002e..5f5ab47d7e 100644 --- a/blog/categories/survey/atom.xml +++ b/blog/categories/survey/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Survey | Home Assistant]]> - 2016-05-08T08:01:29+00:00 + 2016-05-08T10:26:57+00:00 https://home-assistant.io/ diff --git a/blog/categories/talks/atom.xml b/blog/categories/talks/atom.xml index d8368ee2b7..a0670d1ad1 100644 --- a/blog/categories/talks/atom.xml +++ b/blog/categories/talks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Talks | Home Assistant]]> - 2016-05-08T08:01:29+00:00 + 2016-05-08T10:26:57+00:00 https://home-assistant.io/ diff --git a/blog/categories/user-stories/atom.xml b/blog/categories/user-stories/atom.xml index 8eb9846360..7337659659 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-05-08T08:01:29+00:00 + 2016-05-08T10:26:57+00:00 https://home-assistant.io/ diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml index 8b2012d35d..8f1371f23c 100644 --- a/blog/categories/website/atom.xml +++ b/blog/categories/website/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Website | Home Assistant]]> - 2016-05-08T08:01:29+00:00 + 2016-05-08T10:26:57+00:00 https://home-assistant.io/ diff --git a/developers/platform_example_light/index.html b/developers/platform_example_light/index.html index 5f783b5326..c176cc48a7 100644 --- a/developers/platform_example_light/index.html +++ b/developers/platform_example_light/index.html @@ -95,7 +95,7 @@
import logging
 
 # Import the device class from the component that you want to support
-from homeassistant.components.light import Light
+from homeassistant.components.light import ATTR_BRIGHTNESS, Light
 from homeassistant.const import CONF_HOST, CONF_USERNAME, CONF_PASSWORD
 
 # Home Assistant depends on 3rd party packages for API specific code.
@@ -104,7 +104,7 @@ REQUIREMENTS = ['None):
+def setup_platform(hass, config, add_devices, discovery_info=None):
     """Initialize Awesome Light platform."""
     import awesomelights
 
@@ -136,24 +136,44 @@ setup_platform(hass, config, add_devices, discovery_info="""Initialize an AwesomeLight."""
         self._light = light
 
-    def update(self):
-        """Fetch new state data for this light.
-
-        This is the only method that should fetch new data for Home Assitant.
-        """
-        self._light.update()
+    @property
+    def name(self):
+        """Return the display name of this light"""
+        return self._light.name
 
+    @property
     def brightness(self):
-        """Brightness of the light.
+        """Brightness of the light (an integer in the range 1-255).
 
         This method is optional. Removing it indicates to Home Assistant
         that brightness is not supported for this light.
         """
         return self._light.brightness
 
+    @property
     def is_on(self):
         """If light is on."""
         return self._light.is_on()
+
+    def turn_on(self, kwargs):
+        """Instruct the light to turn on.
+
+        You can skip the brightness part if your light does not support
+        brightness control.
+        """
+        self._light.brightness = kwargs.get(ATTR_BRIGHTNESS, 255)
+        self._light.turn_on()
+
+    def turn_off(self, kwargs):
+        """Instruct the light to turn off."""
+        self._light.turn_off()
+
+    def update(self):
+        """Fetch new state data for this light.
+
+        This is the only method that should fetch new data for Home Assitant.
+        """
+        self._light.update()
 
diff --git a/sitemap.xml b/sitemap.xml index a00e2b3d61..22e1e2bba7 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1587,26 +1587,26 @@ https://home-assistant.io/demo/frontend.html - 2016-05-08T08:00:47+00:00 + 2016-05-08T10:26:06+00:00 https://home-assistant.io/demo/index.html - 2016-05-08T08:00:47+00:00 + 2016-05-08T10:26:06+00:00 https://home-assistant.io/googlef4f3693c209fe788.html - 2016-05-08T08:00:47+00:00 + 2016-05-08T10:26:06+00:00 https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html - 2016-05-08T08:00:47+00:00 + 2016-05-08T10:26:07+00:00 https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html - 2016-05-08T08:00:47+00:00 + 2016-05-08T10:26:07+00:00 https://home-assistant.io/static/mdi-demo.html - 2016-05-08T08:00:47+00:00 + 2016-05-08T10:26:07+00:00