From 4077fa500bebab415f4a70789a96157f83eed92b Mon Sep 17 00:00:00 2001 From: Kai Date: Fri, 18 Jun 2021 21:32:33 +0200 Subject: [PATCH] Make compatible with ESPHOME 1.19.1 --- components/xiaomi_bslamp2/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/xiaomi_bslamp2/__init__.py b/components/xiaomi_bslamp2/__init__.py index ca71f2e..0799972 100644 --- a/components/xiaomi_bslamp2/__init__.py +++ b/components/xiaomi_bslamp2/__init__.py @@ -65,14 +65,14 @@ CONFIG_SCHEMA = cv.COMPONENT_SCHEMA.extend({ @coroutine def make_gpio(number, mode="OUTPUT"): - yield from cg.gpio_pin_expression({ "number": number, "mode": mode }); + yield cg.gpio_pin_expression({ "number": number, "mode": mode }); @coroutine def make_gpio_binary_output(id_, number): gpio_var = yield make_gpio(number) output_var = cg.new_Pvariable(id_) cg.add(output_var.set_pin(gpio_var)) - yield from cg.register_component(output_var, {}) + yield cg.register_component(output_var, {}) @coroutine def make_ledc_output(id_, number, frequency, channel): @@ -80,7 +80,7 @@ def make_ledc_output(id_, number, frequency, channel): ledc_var = cg.new_Pvariable(id_, gpio_var) cg.add(ledc_var.set_frequency(frequency)); cg.add(ledc_var.set_channel(channel)); - yield from cg.register_component(ledc_var, {}) + yield cg.register_component(ledc_var, {}) @coroutine def make_light_hal(config):