diff --git a/atom.xml b/atom.xml index 1cf5c717a5..11546dcb48 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Home Assistant]]> - 2016-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+00:00 https://home-assistant.io/ diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml index 59e330453e..d476ad1254 100644 --- a/blog/categories/community/atom.xml +++ b/blog/categories/community/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Community | Home Assistant]]> - 2016-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+00:00 https://home-assistant.io/ diff --git a/blog/categories/device-tracking/atom.xml b/blog/categories/device-tracking/atom.xml index 3a5c39809a..1eac23cd6a 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-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+00:00 https://home-assistant.io/ diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml index de147f5818..9988d5013d 100644 --- a/blog/categories/esp8266/atom.xml +++ b/blog/categories/esp8266/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: ESP8266 | Home Assistant]]> - 2016-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+00:00 https://home-assistant.io/ diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml index 3a97e9e04a..0b75577024 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-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+00:00 https://home-assistant.io/ diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml index 0f34176149..49327a5ac2 100644 --- a/blog/categories/ibeacons/atom.xml +++ b/blog/categories/ibeacons/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: iBeacons | Home Assistant]]> - 2016-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+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 69e597c7c8..c11afe69c7 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-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+00:00 https://home-assistant.io/ diff --git a/blog/categories/iot-data/atom.xml b/blog/categories/iot-data/atom.xml index 2ae0e12bc3..f3ef788f1d 100644 --- a/blog/categories/iot-data/atom.xml +++ b/blog/categories/iot-data/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: IoT-Data | Home Assistant]]> - 2016-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+00:00 https://home-assistant.io/ diff --git a/blog/categories/mqtt/atom.xml b/blog/categories/mqtt/atom.xml index 3163dd329b..1af1cd1c75 100644 --- a/blog/categories/mqtt/atom.xml +++ b/blog/categories/mqtt/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: MQTT | Home Assistant]]> - 2016-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+00:00 https://home-assistant.io/ diff --git a/blog/categories/organisation/atom.xml b/blog/categories/organisation/atom.xml index 149bf7230f..3180f9ff9c 100644 --- a/blog/categories/organisation/atom.xml +++ b/blog/categories/organisation/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Organisation | Home Assistant]]> - 2016-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+00:00 https://home-assistant.io/ diff --git a/blog/categories/owntracks/atom.xml b/blog/categories/owntracks/atom.xml index a57eb6a481..c10dc78ee4 100644 --- a/blog/categories/owntracks/atom.xml +++ b/blog/categories/owntracks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: OwnTracks | Home Assistant]]> - 2016-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+00:00 https://home-assistant.io/ diff --git a/blog/categories/presence-detection/atom.xml b/blog/categories/presence-detection/atom.xml index 56e919c2e1..ba64377f7d 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-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+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 62047102df..ecb6384b55 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-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+00:00 https://home-assistant.io/ diff --git a/blog/categories/release-notes/atom.xml b/blog/categories/release-notes/atom.xml index 96f2e93729..647ce5e836 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-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+00:00 https://home-assistant.io/ diff --git a/blog/categories/survey/atom.xml b/blog/categories/survey/atom.xml index 7f397e593f..1ce4dccff5 100644 --- a/blog/categories/survey/atom.xml +++ b/blog/categories/survey/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Survey | Home Assistant]]> - 2016-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+00:00 https://home-assistant.io/ diff --git a/blog/categories/talks/atom.xml b/blog/categories/talks/atom.xml index c6fee5daa5..b153656d7f 100644 --- a/blog/categories/talks/atom.xml +++ b/blog/categories/talks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Talks | Home Assistant]]> - 2016-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+00:00 https://home-assistant.io/ diff --git a/blog/categories/technology/atom.xml b/blog/categories/technology/atom.xml index ee98656ec9..89bcbe9458 100644 --- a/blog/categories/technology/atom.xml +++ b/blog/categories/technology/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Technology | Home Assistant]]> - 2016-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+00:00 https://home-assistant.io/ diff --git a/blog/categories/user-stories/atom.xml b/blog/categories/user-stories/atom.xml index 0baa9967f3..ed21f3d06b 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-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+00:00 https://home-assistant.io/ diff --git a/blog/categories/video/atom.xml b/blog/categories/video/atom.xml index 789f948d4d..3bb71ca900 100644 --- a/blog/categories/video/atom.xml +++ b/blog/categories/video/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Video | Home Assistant]]> - 2016-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+00:00 https://home-assistant.io/ diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml index ec59061957..13d6c665a9 100644 --- a/blog/categories/website/atom.xml +++ b/blog/categories/website/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Website | Home Assistant]]> - 2016-08-13T19:22:16+00:00 + 2016-08-14T08:15:41+00:00 https://home-assistant.io/ diff --git a/developers/development_validation/index.html b/developers/development_validation/index.html index 60040a11ec..92b93ba33a 100644 --- a/developers/development_validation/index.html +++ b/developers/development_validation/index.html @@ -103,6 +103,14 @@

To validate plaforms using MQTT there are valid_subscribe_topic and valid_publish_topic present.

+

Some things to keep in mind:

+ +
    +
  • Use the constants which are definded in const.py.
  • +
  • Import PLATFORM_SCHEMA from parent component and extend it.
  • +
  • Preferred order is required first, then optional.
  • +
+

Snippets

This section contains a couple of snippets for the validation we use.

@@ -112,7 +120,7 @@
DEFAULT_NAME = 'Sensor name'
 
-PLATFORM_SCHEMA = vol.Schema({
+PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
     ...
     vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
 
@@ -126,8 +134,8 @@ PLATFORM_SCHEMA = vol.Schema({
DEFAULT_PORT = 993
 
-PLATFORM_SCHEMA = vol.Schema({
-    [...]
+PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
+    ...
     vol.Optional(CONF_PORT, default=DEFAULT_PORT):
         vol.All(vol.Coerce(int), vol.Range(min=1, max=65535)),
 
@@ -144,8 +152,8 @@ PLATFORM_SCHEMA = vol.Schema({ 'average_download_rate': ('Average Speed', 'MB/s'), } -PLATFORM_SCHEMA = vol.Schema({ - .... +PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ + ... vol.Optional(CONF_MONITORED_VARIABLES, default=[]): [vol.In(SENSOR_TYPES)],
diff --git a/sitemap.xml b/sitemap.xml index 9e40d41db5..288f9e1c17 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2081,62 +2081,62 @@ https://home-assistant.io/demo/frontend.html - 2016-08-13T19:21:34+00:00 + 2016-08-14T08:14:31+00:00 https://home-assistant.io/demo/index.html - 2016-08-13T19:21:34+00:00 + 2016-08-14T08:14:31+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-event.html - 2016-08-13T19:21:34+00:00 + 2016-08-14T08:14:31+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-info.html - 2016-08-13T19:21:34+00:00 + 2016-08-14T08:14:31+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-service.html - 2016-08-13T19:21:34+00:00 + 2016-08-14T08:14:31+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-state.html - 2016-08-13T19:21:34+00:00 + 2016-08-14T08:14:31+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-template.html - 2016-08-13T19:21:34+00:00 + 2016-08-14T08:14:31+00:00 https://home-assistant.io/demo/panels/ha-panel-history.html - 2016-08-13T19:21:34+00:00 + 2016-08-14T08:14:31+00:00 https://home-assistant.io/demo/panels/ha-panel-iframe.html - 2016-08-13T19:21:34+00:00 + 2016-08-14T08:14:31+00:00 https://home-assistant.io/demo/panels/ha-panel-logbook.html - 2016-08-13T19:21:34+00:00 + 2016-08-14T08:14:31+00:00 https://home-assistant.io/demo/panels/ha-panel-map.html - 2016-08-13T19:21:34+00:00 + 2016-08-14T08:14:31+00:00 https://home-assistant.io/googlef4f3693c209fe788.html - 2016-08-13T19:21:34+00:00 + 2016-08-14T08:14:31+00:00 https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html - 2016-08-13T19:21:34+00:00 + 2016-08-14T08:14:31+00:00 https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html - 2016-08-13T19:21:34+00:00 + 2016-08-14T08:14:31+00:00 https://home-assistant.io/static/mdi-demo.html - 2016-08-13T19:21:34+00:00 + 2016-08-14T08:14:31+00:00