From 4abae8d445510467f4438760f324631111ffc942 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Jan 2026 09:37:04 -1000 Subject: [PATCH 1/4] Bump setuptools from 80.9.0 to 80.10.1 (#13429) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d6aa584237..47dd4b7473 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools==80.9.0", "wheel>=0.43,<0.46"] +requires = ["setuptools==80.10.1", "wheel>=0.43,<0.46"] build-backend = "setuptools.build_meta" [project] From 673f46f76195a356bf24d8769399c19682a6d95f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Jan 2026 09:37:18 -1000 Subject: [PATCH 2/4] Bump peter-evans/create-pull-request from 8.0.0 to 8.1.0 (#13430) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/sync-device-classes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync-device-classes.yml b/.github/workflows/sync-device-classes.yml index 8c830d99c7..97fbf7aa9e 100644 --- a/.github/workflows/sync-device-classes.yml +++ b/.github/workflows/sync-device-classes.yml @@ -41,7 +41,7 @@ jobs: python script/run-in-env.py pre-commit run --all-files - name: Commit changes - uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0 + uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0 with: commit-message: "Synchronise Device Classes from Home Assistant" committer: esphomebot From 11e0d536e4fa8f34dfdb57d7b19c77a0e2f9f581 Mon Sep 17 00:00:00 2001 From: tomaszduda23 Date: Wed, 21 Jan 2026 21:15:51 +0100 Subject: [PATCH 3/4] [debug] Print reg0 value from config if mismatched on nrf52 (#11867) Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com> --- esphome/components/debug/debug_zephyr.cpp | 52 +++++++++---------- esphome/core/helpers.h | 2 + .../components/debug/test.nrf52-adafruit.yaml | 4 ++ 3 files changed, 32 insertions(+), 26 deletions(-) diff --git a/esphome/components/debug/debug_zephyr.cpp b/esphome/components/debug/debug_zephyr.cpp index 6a88522b0d..0291cc3061 100644 --- a/esphome/components/debug/debug_zephyr.cpp +++ b/esphome/components/debug/debug_zephyr.cpp @@ -132,6 +132,26 @@ void DebugComponent::log_partition_info_() { flash_area_foreach(fa_cb, nullptr); } +static const char *regout0_to_str(uint32_t value) { + switch (value) { + case (UICR_REGOUT0_VOUT_DEFAULT): + return "1.8V (default)"; + case (UICR_REGOUT0_VOUT_1V8): + return "1.8V"; + case (UICR_REGOUT0_VOUT_2V1): + return "2.1V"; + case (UICR_REGOUT0_VOUT_2V4): + return "2.4V"; + case (UICR_REGOUT0_VOUT_2V7): + return "2.7V"; + case (UICR_REGOUT0_VOUT_3V0): + return "3.0V"; + case (UICR_REGOUT0_VOUT_3V3): + return "3.3V"; + } + return "???V"; +} + size_t DebugComponent::get_device_info_(std::span buffer, size_t pos) { constexpr size_t size = DEVICE_INFO_BUFFER_SIZE; char *buf = buffer.data(); @@ -145,34 +165,14 @@ size_t DebugComponent::get_device_info_(std::span // Regulator stage 0 if (nrf_power_mainregstatus_get(NRF_POWER) == NRF_POWER_MAINREGSTATUS_HIGH) { const char *reg0_type = nrf_power_dcdcen_vddh_get(NRF_POWER) ? "DC/DC" : "LDO"; - const char *reg0_voltage; - switch (NRF_UICR->REGOUT0 & UICR_REGOUT0_VOUT_Msk) { - case (UICR_REGOUT0_VOUT_DEFAULT << UICR_REGOUT0_VOUT_Pos): - reg0_voltage = "1.8V (default)"; - break; - case (UICR_REGOUT0_VOUT_1V8 << UICR_REGOUT0_VOUT_Pos): - reg0_voltage = "1.8V"; - break; - case (UICR_REGOUT0_VOUT_2V1 << UICR_REGOUT0_VOUT_Pos): - reg0_voltage = "2.1V"; - break; - case (UICR_REGOUT0_VOUT_2V4 << UICR_REGOUT0_VOUT_Pos): - reg0_voltage = "2.4V"; - break; - case (UICR_REGOUT0_VOUT_2V7 << UICR_REGOUT0_VOUT_Pos): - reg0_voltage = "2.7V"; - break; - case (UICR_REGOUT0_VOUT_3V0 << UICR_REGOUT0_VOUT_Pos): - reg0_voltage = "3.0V"; - break; - case (UICR_REGOUT0_VOUT_3V3 << UICR_REGOUT0_VOUT_Pos): - reg0_voltage = "3.3V"; - break; - default: - reg0_voltage = "???V"; - } + const char *reg0_voltage = regout0_to_str((NRF_UICR->REGOUT0 & UICR_REGOUT0_VOUT_Msk) >> UICR_REGOUT0_VOUT_Pos); ESP_LOGD(TAG, "Regulator stage 0: %s, %s", reg0_type, reg0_voltage); pos = buf_append_printf(buf, size, pos, "|Regulator stage 0: %s, %s", reg0_type, reg0_voltage); +#ifdef USE_NRF52_REG0_VOUT + if ((NRF_UICR->REGOUT0 & UICR_REGOUT0_VOUT_Msk) >> UICR_REGOUT0_VOUT_Pos != USE_NRF52_REG0_VOUT) { + ESP_LOGE(TAG, "Regulator stage 0: expected %s", regout0_to_str(USE_NRF52_REG0_VOUT)); + } +#endif } else { ESP_LOGD(TAG, "Regulator stage 0: disabled"); pos = buf_append_printf(buf, size, pos, "|Regulator stage 0: disabled"); diff --git a/esphome/core/helpers.h b/esphome/core/helpers.h index ed5c4911ad..1aa29fa3f7 100644 --- a/esphome/core/helpers.h +++ b/esphome/core/helpers.h @@ -17,6 +17,8 @@ #include #include +#include + #include "esphome/core/optional.h" #ifdef USE_ESP8266 diff --git a/tests/components/debug/test.nrf52-adafruit.yaml b/tests/components/debug/test.nrf52-adafruit.yaml index dade44d145..6a446634af 100644 --- a/tests/components/debug/test.nrf52-adafruit.yaml +++ b/tests/components/debug/test.nrf52-adafruit.yaml @@ -1 +1,5 @@ <<: !include common.yaml + +nrf52: + reg0: + voltage: 2.1V From 9d967b01c870716a2aaca116582604cc2295b2b3 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Wed, 21 Jan 2026 21:32:39 +0100 Subject: [PATCH 4/4] Expose sockaddr to string formatter (#12351) --- esphome/components/socket/socket.cpp | 14 +++++++------- esphome/components/socket/socket.h | 3 +++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/esphome/components/socket/socket.cpp b/esphome/components/socket/socket.cpp index bb94ecb675..fd8725b363 100644 --- a/esphome/components/socket/socket.cpp +++ b/esphome/components/socket/socket.cpp @@ -46,15 +46,15 @@ static inline const char *esphome_inet_ntop6(const void *addr, char *buf, size_t #endif // Format sockaddr into caller-provided buffer, returns length written (excluding null) -static size_t format_sockaddr_to(const struct sockaddr_storage &storage, std::span buf) { - if (storage.ss_family == AF_INET) { - const auto *addr = reinterpret_cast(&storage); +size_t format_sockaddr_to(const struct sockaddr *addr_ptr, socklen_t len, std::span buf) { + if (addr_ptr->sa_family == AF_INET && len >= sizeof(const struct sockaddr_in)) { + const auto *addr = reinterpret_cast(addr_ptr); if (esphome_inet_ntop4(&addr->sin_addr, buf.data(), buf.size()) != nullptr) return strlen(buf.data()); } #if USE_NETWORK_IPV6 - else if (storage.ss_family == AF_INET6) { - const auto *addr = reinterpret_cast(&storage); + else if (addr_ptr->sa_family == AF_INET6 && len >= sizeof(sockaddr_in6)) { + const auto *addr = reinterpret_cast(addr_ptr); #ifndef USE_SOCKET_IMPL_LWIP_TCP // Format IPv4-mapped IPv6 addresses as regular IPv4 (not supported on ESP8266 raw TCP) if (addr->sin6_addr.un.u32_addr[0] == 0 && addr->sin6_addr.un.u32_addr[1] == 0 && @@ -78,7 +78,7 @@ size_t Socket::getpeername_to(std::span buf) { buf[0] = '\0'; return 0; } - return format_sockaddr_to(storage, buf); + return format_sockaddr_to(reinterpret_cast(&storage), len, buf); } size_t Socket::getsockname_to(std::span buf) { @@ -88,7 +88,7 @@ size_t Socket::getsockname_to(std::span buf) { buf[0] = '\0'; return 0; } - return format_sockaddr_to(storage, buf); + return format_sockaddr_to(reinterpret_cast(&storage), len, buf); } std::unique_ptr socket_ip(int type, int protocol) { diff --git a/esphome/components/socket/socket.h b/esphome/components/socket/socket.h index d74804fdb0..e8b0948acd 100644 --- a/esphome/components/socket/socket.h +++ b/esphome/components/socket/socket.h @@ -102,6 +102,9 @@ inline socklen_t set_sockaddr(struct sockaddr *addr, socklen_t addrlen, const st /// Set a sockaddr to the any address and specified port for the IP version used by socket_ip(). socklen_t set_sockaddr_any(struct sockaddr *addr, socklen_t addrlen, uint16_t port); +/// Format sockaddr into caller-provided buffer, returns length written (excluding null) +size_t format_sockaddr_to(const struct sockaddr *addr_ptr, socklen_t len, std::span buf); + #if defined(USE_ESP8266) && defined(USE_SOCKET_IMPL_LWIP_TCP) /// Delay that can be woken early by socket activity. /// On ESP8266, lwip callbacks set a flag and call esp_schedule() to wake the delay.