mirror of
https://github.com/esphome/esphome.git
synced 2025-09-12 16:22:22 +01:00
Let esphomeyaml know about class inheritance (#229)
* Allow overriding setup priority * Add inheritance tree * Global variables * Tests and better validation * Fix * Lint
This commit is contained in:
@@ -5,8 +5,8 @@ from esphomeyaml.components import switch
|
||||
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
|
||||
MakeRestartSwitch = Application.struct('MakeRestartSwitch')
|
||||
RestartSwitch = switch.switch_ns.class_('RestartSwitch', switch.Switch)
|
||||
|
||||
PLATFORM_SCHEMA = cv.nameable(switch.SWITCH_PLATFORM_SCHEMA.extend({
|
||||
cv.GenerateID(): cv.declare_variable_id(RestartSwitch),
|
||||
|
Reference in New Issue
Block a user