From 860c4a932cb080cbbaa587eadea5ebc6e323347b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 14 Aug 2016 10:06:15 +0200 Subject: [PATCH 01/17] Add some more details and use extend --- .../developers/development_validation.markdown | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/source/developers/development_validation.markdown b/source/developers/development_validation.markdown index 97284748809..bc3cb9c7775 100644 --- a/source/developers/development_validation.markdown +++ b/source/developers/development_validation.markdown @@ -21,6 +21,12 @@ Beside the [voluptuous](https://pypi.python.org/pypi/voluptuous) default types a To validate plaforms using [MQTT](/components/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`. + ### {% linkable_title Snippets %} This section contains a couple of snippets for the validation we use. @@ -30,7 +36,7 @@ This section contains a couple of snippets for the validation we use. ```python DEFAULT_NAME = 'Sensor name' -PLATFORM_SCHEMA = vol.Schema({ +PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ ... vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string, ``` @@ -42,8 +48,8 @@ As all port numbers are coming out of the range 1 till 65535 a range check shoul ```python 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)), ``` @@ -58,8 +64,8 @@ SENSOR_TYPES = { '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)], ``` From 74d013f7a592a8482abfc03376af58d8406d84cf Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 14 Aug 2016 01:26:54 -0700 Subject: [PATCH 02/17] Release 0.26.1 --- .../2016-08-13-foursquare--fast.com--ffmpeg--gpsd.markdown | 7 +++++++ source/index.html | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/source/_posts/2016-08-13-foursquare--fast.com--ffmpeg--gpsd.markdown b/source/_posts/2016-08-13-foursquare--fast.com--ffmpeg--gpsd.markdown index 7d5081896a5..de8af4280a8 100644 --- a/source/_posts/2016-08-13-foursquare--fast.com--ffmpeg--gpsd.markdown +++ b/source/_posts/2016-08-13-foursquare--fast.com--ffmpeg--gpsd.markdown @@ -44,6 +44,12 @@ This release includes code contributed by 31 different people. The biggest chang - New [pilight] component to control 433 Mz devices ([@DavidLP]) - Sensor: [GPSD] now supported ([@fabaff]) +### {% linkable_title Hotfix 0.26.1 - August 14 %} + +- Fix serial_pm config validation ([@open-homeautomation]) +- Check for existence of system mode on Honeywell thermostats ([@mKeRix]) +- Fix unknown unit of measurement for hvac and thermostat component ([@turbokongen]) + ### {% linkable_title Breaking changes %} - A new unit system has superseded the temperature unit option in the core configuration. For now it is backwards compatible, but you should update soon: @@ -55,6 +61,7 @@ homeassistant: unit_system: metric ``` +[@mKeRix]: https://github.com/mKeRix [@abcminiuser]: https://github.com/abcminiuser [@balloob]: https://github.com/balloob [@corbanmailloux]: https://github.com/corbanmailloux diff --git a/source/index.html b/source/index.html index 46d633741e1..29aa0e91f58 100644 --- a/source/index.html +++ b/source/index.html @@ -15,8 +15,8 @@ hide_github_edit: true