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

Better typing to components (#225)

* Add better typing

* Fix
This commit is contained in:
Otto Winter
2018-11-08 16:01:07 +01:00
committed by GitHub
parent 94978d0063
commit 3594779401
34 changed files with 79 additions and 7 deletions

View File

@@ -27,7 +27,10 @@ def validate_uid(value):
return value
PN532BinarySensor = binary_sensor.binary_sensor_ns.PN532BinarySensor
PLATFORM_SCHEMA = cv.nameable(binary_sensor.BINARY_SENSOR_PLATFORM_SCHEMA.extend({
cv.GenerateID(): cv.declare_variable_id(PN532BinarySensor),
vol.Required(CONF_UID): validate_uid,
cv.GenerateID(CONF_PN532_ID): cv.use_variable_id(PN532Component)
}))