1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-11 07:42:26 +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

@@ -6,8 +6,10 @@ from esphomeyaml.const import CONF_INVERTED, CONF_MAKE_ID, CONF_NAME
from esphomeyaml.helpers import App, Application, variable
MakeRestartSwitch = Application.MakeRestartSwitch
RestartSwitch = switch.switch_ns.RestartSwitch
PLATFORM_SCHEMA = cv.nameable(switch.SWITCH_PLATFORM_SCHEMA.extend({
cv.GenerateID(): cv.declare_variable_id(RestartSwitch),
cv.GenerateID(CONF_MAKE_ID): cv.declare_variable_id(MakeRestartSwitch),
vol.Optional(CONF_INVERTED): cv.invalid("Restart switches do not support inverted mode!"),
}))