From a67b85eabf4f584ef4a7d136bee5f04421d8defe Mon Sep 17 00:00:00 2001 From: Samuel Sieb Date: Sat, 15 Feb 2025 23:02:51 -0800 Subject: [PATCH 1/5] don't crash on null pages (#8254) Co-authored-by: Samuel Sieb --- esphome/components/display/display.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/esphome/components/display/display.cpp b/esphome/components/display/display.cpp index 202c64ef14..b12a81e050 100644 --- a/esphome/components/display/display.cpp +++ b/esphome/components/display/display.cpp @@ -815,8 +815,20 @@ void Display::test_card() { DisplayPage::DisplayPage(display_writer_t writer) : writer_(std::move(writer)) {} void DisplayPage::show() { this->parent_->show_page(this); } -void DisplayPage::show_next() { this->next_->show(); } -void DisplayPage::show_prev() { this->prev_->show(); } +void DisplayPage::show_next() { + if (this->next_ == nullptr) { + ESP_LOGE(TAG, "no next page"); + return; + } + this->next_->show(); +} +void DisplayPage::show_prev() { + if (this->prev_ == nullptr) { + ESP_LOGE(TAG, "no previous page"); + return; + } + this->prev_->show(); +} void DisplayPage::set_parent(Display *parent) { this->parent_ = parent; } void DisplayPage::set_prev(DisplayPage *prev) { this->prev_ = prev; } void DisplayPage::set_next(DisplayPage *next) { this->next_ = next; } From c0804d665d5eed0e82474304c399b87b0a25e0ab Mon Sep 17 00:00:00 2001 From: Djordje Mandic <6750655+DjordjeMandic@users.noreply.github.com> Date: Sun, 16 Feb 2025 20:09:42 +0100 Subject: [PATCH 2/5] [scd30] Increase minimal CONF_UPDATE_INTERVAL from 1 to 2 seconds (#8256) --- esphome/components/scd30/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/scd30/sensor.py b/esphome/components/scd30/sensor.py index a900c51a58..cee8cc7b71 100644 --- a/esphome/components/scd30/sensor.py +++ b/esphome/components/scd30/sensor.py @@ -75,7 +75,7 @@ CONFIG_SCHEMA = ( cv.Optional(CONF_UPDATE_INTERVAL, default="60s"): cv.All( cv.positive_time_period_seconds, cv.Range( - min=core.TimePeriod(seconds=1), max=core.TimePeriod(seconds=1800) + min=core.TimePeriod(seconds=2), max=core.TimePeriod(seconds=1800) ), ), } From e89603fe3b1b489b57ec91436d192ed651bb0048 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 16 Feb 2025 11:53:19 -0800 Subject: [PATCH 3/5] Bump zeroconf to 0.144.3 (#8253) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 8eca21c4bb..bb5bc768e1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,7 +14,7 @@ esptool==4.7.0 click==8.1.7 esphome-dashboard==20250212.0 aioesphomeapi==24.6.2 -zeroconf==0.144.1 +zeroconf==0.144.3 puremagic==1.27 ruamel.yaml==0.18.6 # dashboard_import glyphsets==1.0.0 From 9ee5227fe05f8f91b9a907644dc0565136a3afdd Mon Sep 17 00:00:00 2001 From: Ali Jafri Date: Mon, 17 Feb 2025 03:35:54 +0530 Subject: [PATCH 4/5] DHT platform now supports modules with inbuilt external resistor (#8257) --- esphome/components/dht/dht.cpp | 3 ++- esphome/components/dht/sensor.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/esphome/components/dht/dht.cpp b/esphome/components/dht/dht.cpp index 5a18f6f36e..f2a33a26ac 100644 --- a/esphome/components/dht/dht.cpp +++ b/esphome/components/dht/dht.cpp @@ -23,6 +23,7 @@ void DHT::dump_config() { } else { ESP_LOGCONFIG(TAG, " Model: DHT22 (or equivalent)"); } + ESP_LOGCONFIG(TAG, " Internal Pull-up: %s", ONOFF(this->pin_->get_flags() & gpio::FLAG_PULLUP)); LOG_UPDATE_INTERVAL(this); @@ -101,7 +102,7 @@ bool HOT IRAM_ATTR DHT::read_sensor_(float *temperature, float *humidity, bool r } else { delayMicroseconds(800); } - this->pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP); + this->pin_->pin_mode(this->pin_->get_flags()); { InterruptLock lock; diff --git a/esphome/components/dht/sensor.py b/esphome/components/dht/sensor.py index da92a97e1f..be53df2625 100644 --- a/esphome/components/dht/sensor.py +++ b/esphome/components/dht/sensor.py @@ -34,7 +34,7 @@ DHT = dht_ns.class_("DHT", cg.PollingComponent) CONFIG_SCHEMA = cv.Schema( { cv.GenerateID(): cv.declare_id(DHT), - cv.Required(CONF_PIN): pins.internal_gpio_input_pin_schema, + cv.Required(CONF_PIN): pins.internal_gpio_input_pullup_pin_schema, cv.Optional(CONF_TEMPERATURE): sensor.sensor_schema( unit_of_measurement=UNIT_CELSIUS, accuracy_decimals=1, From 78b55e22ee4148d3769c50548d73e752b3765bb4 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Mon, 17 Feb 2025 12:14:06 +1300 Subject: [PATCH 5/5] Bump version to 2025.2.0b4 --- esphome/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/const.py b/esphome/const.py index 2f3854b8b3..7c96e6eefb 100644 --- a/esphome/const.py +++ b/esphome/const.py @@ -1,6 +1,6 @@ """Constants used by esphome.""" -__version__ = "2025.2.0b3" +__version__ = "2025.2.0b4" ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_" VALID_SUBSTITUTIONS_CHARACTERS = (