mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
Further fix of custom_sensor codegen
This commit is contained in:
parent
c3d4ef284d
commit
64541e0e35
1 changed files with 1 additions and 1 deletions
|
@ -20,6 +20,6 @@ def to_code(config):
|
|||
rhs = CustomSensorConstructor(template_)
|
||||
var = cg.variable(config[CONF_ID], rhs)
|
||||
for i, conf in enumerate(config[CONF_SENSORS]):
|
||||
sens = cg.new_Pvariable(conf[CONF_ID], var.get_sensor(i))
|
||||
sens = cg.Pvariable(conf[CONF_ID], var.get_sensor(i))
|
||||
cg.add(sens.set_name(conf[CONF_NAME]))
|
||||
yield sensor.register_sensor(sens, conf)
|
||||
|
|
Loading…
Reference in a new issue