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

Use int_range validator (#542)

* Use int_range validator

Just keeping code clean.

* Lint
This commit is contained in:
Otto Winter
2019-05-11 11:40:29 +02:00
committed by GitHub
parent 23dcfe5075
commit e373620393
11 changed files with 20 additions and 20 deletions

View File

@@ -10,7 +10,7 @@ TTP229Channel = ttp229_lsf_ns.class_('TTP229Channel', binary_sensor.BinarySensor
CONFIG_SCHEMA = binary_sensor.BINARY_SENSOR_SCHEMA.extend({
cv.GenerateID(): cv.declare_id(TTP229Channel),
cv.GenerateID(CONF_TTP229_ID): cv.use_id(TTP229LSFComponent),
cv.Required(CONF_CHANNEL): cv.All(cv.int_, cv.Range(min=0, max=15))
cv.Required(CONF_CHANNEL): cv.int_range(min=0, max=15),
})