From 53c182ad370a68e0bbbe24136c44b7dedb6f92ba Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Wed, 8 May 2019 10:37:13 +0200 Subject: [PATCH] Fix native API services not registered Fixes https://github.com/esphome/issues/issues/290 --- esphome/components/api/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/esphome/components/api/__init__.py b/esphome/components/api/__init__.py index 97465f1f7c..b778257d66 100644 --- a/esphome/components/api/__init__.py +++ b/esphome/components/api/__init__.py @@ -67,6 +67,7 @@ def to_code(config): templ = cg.TemplateArguments(*template_args) trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], templ, conf[CONF_SERVICE], service_type_args) + cg.add(var.register_user_service(trigger)) yield automation.build_automation(trigger, func_args, conf) cg.add_define('USE_API')