Merge pull request #8647 from esphome/bump-2025.4.1

2025.4.1
This commit is contained in:
Jesse Hills 2025-04-29 14:20:26 +12:00 committed by GitHub
commit 5baa034d0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 27 additions and 15 deletions

View File

@ -265,6 +265,12 @@ void BluetoothProxy::bluetooth_device_request(const api::BluetoothDeviceRequest
connection->get_connection_index(), connection->address_str().c_str()); connection->get_connection_index(), connection->address_str().c_str());
return; return;
} else if (connection->state() == espbt::ClientState::CONNECTING) { } else if (connection->state() == espbt::ClientState::CONNECTING) {
if (connection->disconnect_pending()) {
ESP_LOGW(TAG, "[%d] [%s] Connection request while pending disconnect, cancelling pending disconnect",
connection->get_connection_index(), connection->address_str().c_str());
connection->cancel_pending_disconnect();
return;
}
ESP_LOGW(TAG, "[%d] [%s] Connection request ignored, already connecting", connection->get_connection_index(), ESP_LOGW(TAG, "[%d] [%s] Connection request ignored, already connecting", connection->get_connection_index(),
connection->address_str().c_str()); connection->address_str().c_str());
return; return;

View File

@ -187,7 +187,7 @@ void ENS160Component::update() {
} }
return; return;
case INVALID_OUTPUT: case INVALID_OUTPUT:
ESP_LOGE(TAG, "ENS160 Invalid Status - No Invalid Output"); ESP_LOGE(TAG, "ENS160 Invalid Status - No valid output");
this->status_set_warning(); this->status_set_warning();
return; return;
} }

View File

@ -173,6 +173,8 @@ class ESPBTClient : public ESPBTDeviceListener {
virtual void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) = 0; virtual void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) = 0;
virtual void connect() = 0; virtual void connect() = 0;
virtual void disconnect() = 0; virtual void disconnect() = 0;
bool disconnect_pending() const { return this->want_disconnect_; }
void cancel_pending_disconnect() { this->want_disconnect_ = false; }
virtual void set_state(ClientState st) { virtual void set_state(ClientState st) {
this->state_ = st; this->state_ = st;
if (st == ClientState::IDLE) { if (st == ClientState::IDLE) {

View File

@ -120,6 +120,7 @@ void LvglComponent::add_event_cb(lv_obj_t *obj, event_callback_t callback, lv_ev
void LvglComponent::add_page(LvPageType *page) { void LvglComponent::add_page(LvPageType *page) {
this->pages_.push_back(page); this->pages_.push_back(page);
page->set_parent(this); page->set_parent(this);
lv_disp_set_default(this->disp_);
page->setup(this->pages_.size() - 1); page->setup(this->pages_.size() - 1);
} }
void LvglComponent::show_page(size_t index, lv_scr_load_anim_t anim, uint32_t time) { void LvglComponent::show_page(size_t index, lv_scr_load_anim_t anim, uint32_t time) {

View File

@ -111,7 +111,7 @@ void OnlineImage::update() {
case ImageFormat::BMP: case ImageFormat::BMP:
accept_mime_type = "image/bmp"; accept_mime_type = "image/bmp";
break; break;
#endif // ONLINE_IMAGE_BMP_SUPPORT #endif // USE_ONLINE_IMAGE_BMP_SUPPORT
#ifdef USE_ONLINE_IMAGE_JPEG_SUPPORT #ifdef USE_ONLINE_IMAGE_JPEG_SUPPORT
case ImageFormat::JPEG: case ImageFormat::JPEG:
accept_mime_type = "image/jpeg"; accept_mime_type = "image/jpeg";
@ -121,7 +121,7 @@ void OnlineImage::update() {
case ImageFormat::PNG: case ImageFormat::PNG:
accept_mime_type = "image/png"; accept_mime_type = "image/png";
break; break;
#endif // ONLINE_IMAGE_PNG_SUPPORT #endif // USE_ONLINE_IMAGE_PNG_SUPPORT
default: default:
accept_mime_type = "image/*"; accept_mime_type = "image/*";
} }
@ -159,7 +159,7 @@ void OnlineImage::update() {
ESP_LOGD(TAG, "Allocating BMP decoder"); ESP_LOGD(TAG, "Allocating BMP decoder");
this->decoder_ = make_unique<BmpDecoder>(this); this->decoder_ = make_unique<BmpDecoder>(this);
} }
#endif // ONLINE_IMAGE_BMP_SUPPORT #endif // USE_ONLINE_IMAGE_BMP_SUPPORT
#ifdef USE_ONLINE_IMAGE_JPEG_SUPPORT #ifdef USE_ONLINE_IMAGE_JPEG_SUPPORT
if (this->format_ == ImageFormat::JPEG) { if (this->format_ == ImageFormat::JPEG) {
ESP_LOGD(TAG, "Allocating JPEG decoder"); ESP_LOGD(TAG, "Allocating JPEG decoder");
@ -171,7 +171,7 @@ void OnlineImage::update() {
ESP_LOGD(TAG, "Allocating PNG decoder"); ESP_LOGD(TAG, "Allocating PNG decoder");
this->decoder_ = make_unique<PngDecoder>(this); this->decoder_ = make_unique<PngDecoder>(this);
} }
#endif // ONLINE_IMAGE_PNG_SUPPORT #endif // USE_ONLINE_IMAGE_PNG_SUPPORT
if (!this->decoder_) { if (!this->decoder_) {
ESP_LOGE(TAG, "Could not instantiate decoder. Image format unsupported: %d", this->format_); ESP_LOGE(TAG, "Could not instantiate decoder. Image format unsupported: %d", this->format_);
@ -185,7 +185,7 @@ void OnlineImage::update() {
this->download_error_callback_.call(); this->download_error_callback_.call();
return; return;
} }
ESP_LOGI(TAG, "Downloading image (Size: %d)", total_size); ESP_LOGI(TAG, "Downloading image (Size: %zu)", total_size);
this->start_time_ = ::time(nullptr); this->start_time_ = ::time(nullptr);
} }

View File

@ -1,7 +1,8 @@
#ifdef USE_ESP32 #ifdef USE_ESP32
#include "psram.h" #include "psram.h"
#ifdef USE_ESP_IDF #include <esp_idf_version.h>
#if defined(USE_ESP_IDF) && ESP_IDF_VERSION_MAJOR >= 5
#include <esp_psram.h> #include <esp_psram.h>
#endif // USE_ESP_IDF #endif // USE_ESP_IDF
@ -15,7 +16,7 @@ static const char *const TAG = "psram";
void PsramComponent::dump_config() { void PsramComponent::dump_config() {
ESP_LOGCONFIG(TAG, "PSRAM:"); ESP_LOGCONFIG(TAG, "PSRAM:");
#ifdef USE_ESP_IDF #if defined(USE_ESP_IDF) && ESP_IDF_VERSION_MAJOR >= 5
bool available = esp_psram_is_initialized(); bool available = esp_psram_is_initialized();
ESP_LOGCONFIG(TAG, " Available: %s", YESNO(available)); ESP_LOGCONFIG(TAG, " Available: %s", YESNO(available));

View File

@ -6,6 +6,7 @@
#include <cinttypes> #include <cinttypes>
#include <cstdint> #include <cstdint>
#ifdef USE_ESP32 #ifdef USE_ESP32
#include <soc/soc_caps.h>
#include "esp_idf_version.h" #include "esp_idf_version.h"
#include "esp_task_wdt.h" #include "esp_task_wdt.h"
#endif #endif
@ -40,7 +41,7 @@ void WatchdogManager::set_timeout_(uint32_t timeout_ms) {
#if ESP_IDF_VERSION_MAJOR >= 5 #if ESP_IDF_VERSION_MAJOR >= 5
esp_task_wdt_config_t wdt_config = { esp_task_wdt_config_t wdt_config = {
.timeout_ms = timeout_ms, .timeout_ms = timeout_ms,
.idle_core_mask = 0x03, .idle_core_mask = (1 << SOC_CPU_CORES_NUM) - 1,
.trigger_panic = true, .trigger_panic = true,
}; };
esp_task_wdt_reconfigure(&wdt_config); esp_task_wdt_reconfigure(&wdt_config);

View File

@ -1,6 +1,6 @@
"""Constants used by esphome.""" """Constants used by esphome."""
__version__ = "2025.4.0" __version__ = "2025.4.1"
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_" ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
VALID_SUBSTITUTIONS_CHARACTERS = ( VALID_SUBSTITUTIONS_CHARACTERS = (

View File

@ -74,13 +74,14 @@ def setup_log(
colorama.init() colorama.init()
if log_level == logging.DEBUG: # Setup logging - will map log level from string to constant
CORE.verbose = True
elif log_level == logging.CRITICAL:
CORE.quiet = True
logging.basicConfig(level=log_level) logging.basicConfig(level=log_level)
if logging.root.level == logging.DEBUG:
CORE.verbose = True
elif logging.root.level == logging.CRITICAL:
CORE.quiet = True
logging.getLogger("urllib3").setLevel(logging.WARNING) logging.getLogger("urllib3").setLevel(logging.WARNING)
logging.getLogger().handlers[0].setFormatter( logging.getLogger().handlers[0].setFormatter(