From 932067c3324410d7daf098bb6b3455371e56fb1b Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 12 Feb 2026 10:47:23 -0600 Subject: [PATCH] [wifi] Deprecate wifi_ssid() in favor of wifi_ssid_to() wifi_ssid() returns std::string which allocates on the heap. All internal callers have already been migrated to the buffer-based wifi_ssid_to() alternative. Mark as deprecated with a 6-month removal window (2026.9.0). --- esphome/components/wifi/wifi_component.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esphome/components/wifi/wifi_component.h b/esphome/components/wifi/wifi_component.h index ac28a1bc81d..53ff0d9cadc 100644 --- a/esphome/components/wifi/wifi_component.h +++ b/esphome/components/wifi/wifi_component.h @@ -502,6 +502,8 @@ class WiFiComponent : public Component { } network::IPAddresses wifi_sta_ip_addresses(); + // Remove before 2026.9.0 + ESPDEPRECATED("Use wifi_ssid_to() instead. Removed in 2026.9.0", "2026.3.0") std::string wifi_ssid(); /// Write SSID to buffer without heap allocation. /// Returns pointer to buffer, or empty string if not connected.