From 6a5015b2df3836b4f9b61123819b19d77350f61c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 11 Feb 2026 14:43:24 -0600 Subject: [PATCH] debloat --- esphome/components/wifi/wifi_component.cpp | 2 +- esphome/components/wifi/wifi_component.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/esphome/components/wifi/wifi_component.cpp b/esphome/components/wifi/wifi_component.cpp index a1a5699e1e..61d05d7635 100644 --- a/esphome/components/wifi/wifi_component.cpp +++ b/esphome/components/wifi/wifi_component.cpp @@ -480,7 +480,7 @@ bool WiFiComponent::matches_configured_network_(const char *ssid, const uint8_t continue; } // Match by SSID - if (sta.ssid_ == StringRef(ssid)) { + if (sta.ssid_ == ssid) { return true; } } diff --git a/esphome/components/wifi/wifi_component.h b/esphome/components/wifi/wifi_component.h index e146f9a45b..4cf19a8059 100644 --- a/esphome/components/wifi/wifi_component.h +++ b/esphome/components/wifi/wifi_component.h @@ -200,6 +200,8 @@ class CompactString { bool operator!=(const CompactString &other) const { return !(*this == other); } bool operator==(const StringRef &other) const; bool operator!=(const StringRef &other) const { return !(*this == other); } + bool operator==(const char *other) const { return *this == StringRef(other); } + bool operator!=(const char *other) const { return !(*this == other); } protected: char *get_heap_ptr_() const {