Fix TSL2561 invalid default (#566)

Ref https://github.com/esphome/issues/issues/352#issuecomment-496883794
This commit is contained in:
Otto Winter 2019-05-29 13:17:01 +02:00
parent e4bbb56f6b
commit 5fca02c712
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E

View File

@ -32,7 +32,7 @@ TSL2561Sensor = tsl2561_ns.class_('TSL2561Sensor', sensor.Sensor, cg.PollingComp
CONFIG_SCHEMA = sensor.sensor_schema(UNIT_LUX, ICON_BRIGHTNESS_5, 1).extend({
cv.GenerateID(): cv.declare_id(TSL2561Sensor),
cv.Optional(CONF_INTEGRATION_TIME, default=402): validate_integration_time,
cv.Optional(CONF_INTEGRATION_TIME, default='402ms'): validate_integration_time,
cv.Optional(CONF_GAIN, default='1X'): cv.enum(GAINS, upper=True),
cv.Optional(CONF_IS_CS_PACKAGE, default=False): cv.boolean,
}).extend(cv.polling_component_schema('60s')).extend(i2c.i2c_device_schema(0x39))