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

Improve one_of validator (#240)

This commit is contained in:
Otto Winter
2018-11-23 13:51:22 +01:00
committed by GitHub
parent b4c4dc8cfb
commit bb9c1faffa
30 changed files with 61 additions and 56 deletions

View File

@@ -16,7 +16,7 @@ COUNT_MODES = {
'DECREMENT': PulseCounterCountMode.PULSE_COUNTER_DECREMENT,
}
COUNT_MODE_SCHEMA = vol.All(vol.Upper, cv.one_of(*COUNT_MODES))
COUNT_MODE_SCHEMA = cv.one_of(*COUNT_MODES, upper=True)
PulseCounterBase = sensor.sensor_ns.class_('PulseCounterBase')
MakePulseCounterSensor = Application.struct('MakePulseCounterSensor')