mirror of
https://github.com/esphome/esphome.git
synced 2026-05-23 03:06:05 +08:00
[codegen] Fix templatable uint32 type to use cg.uint32 (#15574)
This commit is contained in:
@@ -160,6 +160,6 @@ async def to_code(config):
|
||||
async def set_total_action_to_code(config, action_id, template_arg, args):
|
||||
paren = await cg.get_variable(config[CONF_ID])
|
||||
var = cg.new_Pvariable(action_id, template_arg, paren)
|
||||
template_ = await cg.templatable(config[CONF_VALUE], args, int)
|
||||
template_ = await cg.templatable(config[CONF_VALUE], args, cg.uint32)
|
||||
cg.add(var.set_total_pulses(template_))
|
||||
return var
|
||||
|
||||
@@ -110,6 +110,6 @@ async def to_code(config):
|
||||
async def set_total_action_to_code(config, action_id, template_arg, args):
|
||||
paren = await cg.get_variable(config[CONF_ID])
|
||||
var = cg.new_Pvariable(action_id, template_arg, paren)
|
||||
template_ = await cg.templatable(config[CONF_VALUE], args, int)
|
||||
template_ = await cg.templatable(config[CONF_VALUE], args, cg.uint32)
|
||||
cg.add(var.set_total_pulses(template_))
|
||||
return var
|
||||
|
||||
Reference in New Issue
Block a user