mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 02:07:09 +00:00
Extend platform schema
This commit is contained in:
parent
90449a90f1
commit
5bdcf60a21
@ -13,6 +13,7 @@ import voluptuous as vol
|
|||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.util import Throttle
|
from homeassistant.util import Throttle
|
||||||
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
from homeassistant.const import (CONF_PLATFORM, CONF_MONITORED_CONDITIONS,
|
from homeassistant.const import (CONF_PLATFORM, CONF_MONITORED_CONDITIONS,
|
||||||
CONF_API_KEY, TEMP_FAHRENHEIT, TEMP_CELSIUS,
|
CONF_API_KEY, TEMP_FAHRENHEIT, TEMP_CELSIUS,
|
||||||
STATE_UNKNOWN)
|
STATE_UNKNOWN)
|
||||||
@ -55,7 +56,7 @@ SENSOR_TYPES = {
|
|||||||
'solarradiation': ['Solar Radiation', None]
|
'solarradiation': ['Solar Radiation', None]
|
||||||
}
|
}
|
||||||
|
|
||||||
PLATFORM_SCHEMA = vol.Schema({
|
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||||
vol.Required(CONF_PLATFORM): "wunderground",
|
vol.Required(CONF_PLATFORM): "wunderground",
|
||||||
vol.Required(CONF_API_KEY): cv.string,
|
vol.Required(CONF_API_KEY): cv.string,
|
||||||
vol.Optional(CONF_PWS_ID): cv.string,
|
vol.Optional(CONF_PWS_ID): cv.string,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user