Bugfix group order (#3323)

* Add ordered dict config validator

* Have group component use ordered dict config validator

* Improve config_validation testing

* update doc string config_validation.ordered_dict

* validate full dict entries

* Further simplify ordered_dict validator.

* Lint fix
This commit is contained in:
Paulus Schoutsen 2016-09-11 22:25:01 -07:00
parent d6ca930427
commit f0ec51711c
4 changed files with 84 additions and 9 deletions

View file

@ -46,12 +46,12 @@ def _conf_preprocess(value):
CONFIG_SCHEMA = vol.Schema({
DOMAIN: {cv.match_all: vol.Schema(vol.All(_conf_preprocess, {
DOMAIN: cv.ordered_dict(vol.All(_conf_preprocess, {
vol.Optional(CONF_ENTITIES): vol.Any(cv.entity_ids, None),
CONF_VIEW: cv.boolean,
CONF_NAME: cv.string,
CONF_ICON: cv.icon,
}))}
}, cv.match_all))
}, extra=vol.ALLOW_EXTRA)
# List of ON/OFF state tuples for groupable states