Allow platforms to specify PLATFORM_SCHEMA

This commit is contained in:
Paulus Schoutsen 2016-04-02 20:10:57 -07:00
parent 4fba89b789
commit f6d584af09
5 changed files with 86 additions and 21 deletions

View file

@ -2,7 +2,7 @@
import voluptuous as vol
from homeassistant.const import (
CONF_PLATFORM, TEMP_CELCIUS, TEMP_FAHRENHEIT)
CONF_PLATFORM, CONF_SCAN_INTERVAL, TEMP_CELCIUS, TEMP_FAHRENHEIT)
from homeassistant.helpers.entity import valid_entity_id
import homeassistant.util.dt as dt_util
@ -10,6 +10,7 @@ import homeassistant.util.dt as dt_util
PLATFORM_SCHEMA = vol.Schema({
vol.Required(CONF_PLATFORM): str,
CONF_SCAN_INTERVAL: vol.All(vol.Coerce(int), vol.Range(min=1)),
}, extra=vol.ALLOW_EXTRA)
byte = vol.All(vol.Coerce(int), vol.Range(min=0, max=255))