mirror of
https://github.com/esphome/esphome.git
synced 2025-03-15 15:18:16 +00:00
Fix native API services not registered
Fixes https://github.com/esphome/issues/issues/290
This commit is contained in:
parent
7dce836919
commit
c67cd67c45
@ -67,6 +67,7 @@ def to_code(config):
|
|||||||
templ = cg.TemplateArguments(*template_args)
|
templ = cg.TemplateArguments(*template_args)
|
||||||
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], templ,
|
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], templ,
|
||||||
conf[CONF_SERVICE], service_type_args)
|
conf[CONF_SERVICE], service_type_args)
|
||||||
|
cg.add(var.register_user_service(trigger))
|
||||||
yield automation.build_automation(trigger, func_args, conf)
|
yield automation.build_automation(trigger, func_args, conf)
|
||||||
|
|
||||||
cg.add_define('USE_API')
|
cg.add_define('USE_API')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user