1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-21 20:52:20 +01:00

Add internal modifier. Fixes ottowinter/esphomelib#77

This commit is contained in:
Otto Winter
2018-06-11 10:01:54 +02:00
parent 0be29d27d5
commit 6aa449115f
65 changed files with 530 additions and 316 deletions

View File

@@ -45,12 +45,12 @@ def validate_mux(value):
return cv.one_of(*MUX)(value)
PLATFORM_SCHEMA = sensor.PLATFORM_SCHEMA.extend({
PLATFORM_SCHEMA = cv.nameable(sensor.SENSOR_PLATFORM_SCHEMA.extend({
vol.Required(CONF_MULTIPLEXER): validate_mux,
vol.Required(CONF_GAIN): validate_gain,
cv.GenerateID(CONF_ADS1115_ID): cv.use_variable_id(ADS1115Component),
vol.Optional(CONF_UPDATE_INTERVAL): cv.positive_time_period_milliseconds,
}).extend(sensor.SENSOR_SCHEMA.schema)
}))
def to_code(config):