From fb046fd9d16776dec004e20b88ece6990beae782 Mon Sep 17 00:00:00 2001 From: optimusprimespace <62800678+optimusprimespace@users.noreply.github.com> Date: Fri, 3 May 2024 16:13:12 -0400 Subject: [PATCH] Update sensor.py --- esphome/components/hdc2010/sensor.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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