diff --git a/esphome/components/hdc2010/sensor.py b/esphome/components/hdc2010/sensor.py index d20faf6e05..8bb4c8c27d 100755 --- a/esphome/components/hdc2010/sensor.py +++ b/esphome/components/hdc2010/sensor.py @@ -42,6 +42,7 @@ CONFIG_SCHEMA = ( .extend(i2c.i2c_device_schema(0x40)) ) + async def to_code(config): var = cg.new_Pvariable(config[CONF_ID]) await cg.register_component(var, config) @@ -55,9 +56,9 @@ async def to_code(config): sens = await sensor.new_sensor(config[CONF_HUMIDITY]) cg.add(var.set_humidity(sens)) -#if CONF_HEATER in config: -# conf = config[CONF_HEATER] -# if not conf: -# cg.add(var.set_heater(0, 0)) -# else: -# cg.add(var.set_heater(conf[CONF_TEMPERATURE], conf[CONF_DURATION])) \ No newline at end of file + # if CONF_HEATER in config: + # conf = config[CONF_HEATER] + # if not conf: + # cg.add(var.set_heater(0, 0)) + # else: + # cg.add(var.set_heater(conf[CONF_TEMPERATURE], conf[CONF_DURATION])) \ No newline at end of file