From 0893de4f297887a7e4196aac364dc5937ca5ed9e Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 6 Nov 2025 17:26:51 -0600 Subject: [PATCH] dry --- esphome/components/wifi/wifi_component.cpp | 2 +- esphome/components/wifi/wifi_component.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/esphome/components/wifi/wifi_component.cpp b/esphome/components/wifi/wifi_component.cpp index 8e3fae99cd..9531c6dfc8 100644 --- a/esphome/components/wifi/wifi_component.cpp +++ b/esphome/components/wifi/wifi_component.cpp @@ -396,7 +396,7 @@ bool WiFiComponent::sync_selected_sta_to_best_scan_result_() { return false; } -WiFiAP WiFiComponent::get_sta() { +WiFiAP WiFiComponent::get_sta() const { const WiFiAP *config = this->get_selected_sta_(); return config ? *config : WiFiAP{}; } diff --git a/esphome/components/wifi/wifi_component.h b/esphome/components/wifi/wifi_component.h index 040dad3253..f5b50f29e9 100644 --- a/esphome/components/wifi/wifi_component.h +++ b/esphome/components/wifi/wifi_component.h @@ -218,8 +218,7 @@ class WiFiComponent : public Component { WiFiComponent(); void set_sta(const WiFiAP &ap); - // Returns a copy of the currently selected AP configuration - // Note: This copies the 88-byte WiFiAP. Only used by WiFiConfigureAction for state save/restore. + // Returns a copy of the currently selected AP configuration (88 bytes) WiFiAP get_sta() const; void init_sta(size_t count); void add_sta(const WiFiAP &ap);