Config schema

This commit is contained in:
Teagan M. Glenn 2016-08-17 22:19:13 -06:00
parent 333e3ba822
commit b7809675eb

View File

@ -51,6 +51,13 @@ SENSOR_TYPES = {
'solarradiation': ['Solar Radiation', None]
}
PLATFORM_SCHEMA = vol.Schema({
vol.Required(CONF_PLATFORM): "wunderground",
vol.Required(CONF_API_KEY): vol.Coerce(str),
CONF_PWS_ID: vol.Coerce(str),
vol.Required(CONF_MONITORED_CONDITIONS, default=[]): ensure_list,
})
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the Wunderground sensor."""