mirror of
https://github.com/esphome/esphome.git
synced 2026-09-03 19:46:02 +00:00
[http_request] Wrap method constant via cg.templatable for TemplatableFn
This commit is contained in:
@@ -302,7 +302,8 @@ async def http_request_action_to_code(config, action_id, template_arg, args):
|
||||
|
||||
template_ = await cg.templatable(config[CONF_URL], args, cg.std_string)
|
||||
cg.add(var.set_url(template_))
|
||||
cg.add(var.set_method(config[CONF_METHOD]))
|
||||
template_ = await cg.templatable(config[CONF_METHOD], args, cg.const_char_ptr)
|
||||
cg.add(var.set_method(template_))
|
||||
|
||||
capture_response = config[CONF_CAPTURE_RESPONSE]
|
||||
if capture_response:
|
||||
|
||||
Reference in New Issue
Block a user