From 6ccb68aaf18d50613a6151dea909167500864824 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Sun, 10 Feb 2019 14:15:20 +0100 Subject: [PATCH] Fix custom components --- esphomeyaml/components/binary_sensor/custom.py | 2 +- esphomeyaml/components/sensor/custom.py | 2 +- esphomeyaml/components/switch/custom.py | 2 +- esphomeyaml/components/text_sensor/custom.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/esphomeyaml/components/binary_sensor/custom.py b/esphomeyaml/components/binary_sensor/custom.py index 71ddbcd972..b9162bf647 100644 --- a/esphomeyaml/components/binary_sensor/custom.py +++ b/esphomeyaml/components/binary_sensor/custom.py @@ -29,7 +29,7 @@ def to_code(config): for i, conf in enumerate(config[CONF_BINARY_SENSORS]): var = Pvariable(conf[CONF_ID], custom.get_binary_sensor(i)) add(var.set_name(conf[CONF_NAME])) - binary_sensor.register_binary_sensor(var, conf) + binary_sensor.setup_binary_sensor(var, conf) BUILD_FLAGS = '-DUSE_CUSTOM_BINARY_SENSOR' diff --git a/esphomeyaml/components/sensor/custom.py b/esphomeyaml/components/sensor/custom.py index e56b85e2cb..d541664155 100644 --- a/esphomeyaml/components/sensor/custom.py +++ b/esphomeyaml/components/sensor/custom.py @@ -27,7 +27,7 @@ def to_code(config): for i, conf in enumerate(config[CONF_SENSORS]): var = Pvariable(conf[CONF_ID], custom.get_sensor(i)) add(var.set_name(conf[CONF_NAME])) - sensor.register_sensor(var, conf) + sensor.setup_sensor(var, conf) BUILD_FLAGS = '-DUSE_CUSTOM_SENSOR' diff --git a/esphomeyaml/components/switch/custom.py b/esphomeyaml/components/switch/custom.py index 3b23d9a022..0f12cd3ba7 100644 --- a/esphomeyaml/components/switch/custom.py +++ b/esphomeyaml/components/switch/custom.py @@ -28,7 +28,7 @@ def to_code(config): for i, conf in enumerate(config[CONF_SWITCHES]): var = Pvariable(conf[CONF_ID], custom.get_switch(i)) add(var.set_name(conf[CONF_NAME])) - switch.register_switch(var, conf) + switch.setup_switch(var, conf) BUILD_FLAGS = '-DUSE_CUSTOM_SWITCH' diff --git a/esphomeyaml/components/text_sensor/custom.py b/esphomeyaml/components/text_sensor/custom.py index 5c8684b074..eeeb23b55c 100644 --- a/esphomeyaml/components/text_sensor/custom.py +++ b/esphomeyaml/components/text_sensor/custom.py @@ -28,7 +28,7 @@ def to_code(config): for i, conf in enumerate(config[CONF_TEXT_SENSORS]): var = Pvariable(conf[CONF_ID], custom.get_text_sensor(i)) add(var.set_name(conf[CONF_NAME])) - text_sensor.register_text_sensor(var, conf) + text_sensor.setup_text_sensor(var, conf) BUILD_FLAGS = '-DUSE_CUSTOM_TEXT_SENSOR'