diff --git a/esphomeyaml/components/switch/gpio.py b/esphomeyaml/components/switch/gpio.py index f37f5d6858..6ad76e9bd6 100644 --- a/esphomeyaml/components/switch/gpio.py +++ b/esphomeyaml/components/switch/gpio.py @@ -7,7 +7,7 @@ from esphomeyaml.const import CONF_MAKE_ID, CONF_NAME, CONF_PIN from esphomeyaml.helpers import App, Application, gpio_output_pin_expression, variable MakeGPIOSwitch = Application.MakeGPIOSwitch -GPIOSwitch = Application.GPIOSwitch +GPIOSwitch = switch.switch_ns.GPIOSwitch PLATFORM_SCHEMA = cv.nameable(switch.SWITCH_PLATFORM_SCHEMA.extend({ cv.GenerateID(): cv.declare_variable_id(GPIOSwitch),