1
0
mirror of https://github.com/esphome/esphome.git synced 2024-10-06 10:50:58 +01:00

Fix native API services not registered

Fixes https://github.com/esphome/issues/issues/290
This commit is contained in:
Otto Winter 2019-05-08 10:37:13 +02:00
parent ce45c81069
commit 53c182ad37
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E

View File

@ -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')