From 27c879397628b160d71a7df1518fb70364390548 Mon Sep 17 00:00:00 2001 From: minomy13 Date: Wed, 13 Nov 2024 18:27:47 +0100 Subject: [PATCH] increased boolean readability --- esphome/components/dht/dht.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/dht/dht.cpp b/esphome/components/dht/dht.cpp index 4826db197c..d4e7004046 100644 --- a/esphome/components/dht/dht.cpp +++ b/esphome/components/dht/dht.cpp @@ -24,7 +24,7 @@ void DHT::dump_config() { ESP_LOGCONFIG(TAG, " Model: DHT22 (or equivalent)"); } - if (this->use_internal_pullup_ == true) { + if (this->use_internal_pullup_) { ESP_LOGCONFIG(TAG, " Internal pull-up resistor enabled."); } else { ESP_LOGCONFIG(TAG, " Internal pull-up resistor disabled."); @@ -108,7 +108,7 @@ bool HOT IRAM_ATTR DHT::read_sensor_(float *temperature, float *humidity, bool r delayMicroseconds(800); } - if (this->use_internal_pullup_ == true) { + if (this->use_internal_pullup_) { this->pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP); } else { this->pin_->pin_mode(gpio::FLAG_INPUT);