From f3ec1ed43a522edae58b8d6a47febb6565cfefde Mon Sep 17 00:00:00 2001 From: minomy13 Date: Wed, 13 Nov 2024 18:13:20 +0100 Subject: [PATCH] refactored constant name --- esphome/components/dht/sensor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/components/dht/sensor.py b/esphome/components/dht/sensor.py index 0859e9d632..ffe9cbc48a 100644 --- a/esphome/components/dht/sensor.py +++ b/esphome/components/dht/sensor.py @@ -30,7 +30,7 @@ DHT_MODELS = { "DHT22_TYPE2": DHTModel.DHT_MODEL_DHT22_TYPE2, } DHT = dht_ns.class_("DHT", cg.PollingComponent) -CONF_INTERNAL_PULLUP = "use_internal_pullup" +CONF_USE_INTERNAL_PULLUP = "use_internal_pullup" CONFIG_SCHEMA = cv.Schema( { @@ -51,7 +51,7 @@ CONFIG_SCHEMA = cv.Schema( cv.Optional(CONF_MODEL, default="auto detect"): cv.enum( DHT_MODELS, upper=True, space="_" ), - cv.Optional(CONF_INTERNAL_PULLUP, default=True): cv.boolean, + cv.Optional(CONF_USE_INTERNAL_PULLUP, default=True): cv.boolean, } ).extend(cv.polling_component_schema("60s")) @@ -70,6 +70,6 @@ async def to_code(config): sens = await sensor.new_sensor(config[CONF_HUMIDITY]) cg.add(var.set_humidity_sensor(sens)) - cg.add(var.set_internal_pullup(config[CONF_INTERNAL_PULLUP])) + cg.add(var.set_internal_pullup(config[CONF_USE_INTERNAL_PULLUP])) cg.add(var.set_dht_model(config[CONF_MODEL]))