* Sytadin default value must be a list #10233 * Sytadin default value must be a list #10233 v2
This commit is contained in:
parent
ed3f7d1581
commit
8832de80bc
1 changed files with 2 additions and 2 deletions
|
@ -43,7 +43,7 @@ SENSOR_TYPES = {
|
||||||
MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=5)
|
MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=5)
|
||||||
|
|
||||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||||
vol.Optional(CONF_MONITORED_CONDITIONS, default=OPTION_TRAFFIC_JAM):
|
vol.Optional(CONF_MONITORED_CONDITIONS, default=[OPTION_TRAFFIC_JAM]):
|
||||||
vol.All(cv.ensure_list, [vol.In(SENSOR_TYPES)]),
|
vol.All(cv.ensure_list, [vol.In(SENSOR_TYPES)]),
|
||||||
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
|
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
|
||||||
})
|
})
|
||||||
|
@ -57,7 +57,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
|
|
||||||
dev = []
|
dev = []
|
||||||
for option in config.get(CONF_MONITORED_CONDITIONS):
|
for option in config.get(CONF_MONITORED_CONDITIONS):
|
||||||
print(option)
|
_LOGGER.debug("Sensor device - %s", option)
|
||||||
dev.append(SytadinSensor(
|
dev.append(SytadinSensor(
|
||||||
sytadin, name, option, SENSOR_TYPES[option][0],
|
sytadin, name, option, SENSOR_TYPES[option][0],
|
||||||
SENSOR_TYPES[option][1]))
|
SENSOR_TYPES[option][1]))
|
||||||
|
|
Loading…
Add table
Reference in a new issue