Fix select.set using lambda (#2633)

This commit is contained in:
Jesse Hills 2021-10-27 08:27:51 +13:00 committed by GitHub
parent 9f625ee7d1
commit c2623a08e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,6 +90,6 @@ async def to_code(config):
async def select_set_to_code(config, action_id, template_arg, args): async def select_set_to_code(config, action_id, template_arg, args):
paren = await cg.get_variable(config[CONF_ID]) paren = await cg.get_variable(config[CONF_ID])
var = cg.new_Pvariable(action_id, template_arg, paren) var = cg.new_Pvariable(action_id, template_arg, paren)
template_ = await cg.templatable(config[CONF_OPTION], args, str) template_ = await cg.templatable(config[CONF_OPTION], args, cg.std_string)
cg.add(var.set_option(template_)) cg.add(var.set_option(template_))
return var return var