mirror of
https://github.com/esphome/esphome.git
synced 2026-05-23 19:40:12 +08:00
[rotary_encoder] Fix templatable value type to use cg.int32 (#15567)
This commit is contained in:
@@ -129,6 +129,6 @@ async def to_code(config):
|
||||
async def sensor_template_publish_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.int32)
|
||||
cg.add(var.set_value(template_))
|
||||
return var
|
||||
|
||||
Reference in New Issue
Block a user