1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-29 22:24:26 +00: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

@@ -30,14 +30,14 @@ def validate_integration_time(value):
MakeTSL2561Sensor = Application.MakeTSL2561Sensor
PLATFORM_SCHEMA = sensor.PLATFORM_SCHEMA.extend({
PLATFORM_SCHEMA = cv.nameable(sensor.SENSOR_PLATFORM_SCHEMA.extend({
cv.GenerateID(CONF_MAKE_ID): cv.declare_variable_id(MakeTSL2561Sensor),
vol.Optional(CONF_ADDRESS, default=0x39): cv.i2c_address,
vol.Optional(CONF_INTEGRATION_TIME): validate_integration_time,
vol.Optional(CONF_GAIN): vol.All(vol.Upper, cv.one_of(*GAINS)),
vol.Optional(CONF_IS_CS_PACKAGE): cv.boolean,
vol.Optional(CONF_UPDATE_INTERVAL): cv.positive_time_period_milliseconds,
}).extend(sensor.SENSOR_SCHEMA.schema)
}))
def to_code(config):