From 66d6c85aa76ab2bbbefa2ac3ace15eb08c064c58 Mon Sep 17 00:00:00 2001 From: kbx81 Date: Sun, 23 Nov 2025 02:05:41 -0600 Subject: [PATCH] preen --- esphome/components/wifi/automation.h | 10 +++++----- esphome/components/wifi_info/wifi_info_text_sensor.h | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/esphome/components/wifi/automation.h b/esphome/components/wifi/automation.h index 0651eafca2..4c7545a445 100644 --- a/esphome/components/wifi/automation.h +++ b/esphome/components/wifi/automation.h @@ -9,22 +9,22 @@ namespace wifi { template class WiFiConnectedCondition : public Condition { public: - bool check(Ts... x) override { return global_wifi_component->is_connected(); } + bool check(const Ts &...x) override { return global_wifi_component->is_connected(); } }; template class WiFiEnabledCondition : public Condition { public: - bool check(Ts... x) override { return !global_wifi_component->is_disabled(); } + bool check(const Ts &...x) override { return !global_wifi_component->is_disabled(); } }; template class WiFiEnableAction : public Action { public: - void play(Ts... x) override { global_wifi_component->enable(); } + void play(const Ts &...x) override { global_wifi_component->enable(); } }; template class WiFiDisableAction : public Action { public: - void play(Ts... x) override { global_wifi_component->disable(); } + void play(const Ts &...x) override { global_wifi_component->disable(); } }; template class WiFiConfigureAction : public Action, public Component { @@ -34,7 +34,7 @@ template class WiFiConfigureAction : public Action, publi TEMPLATABLE_VALUE(bool, save) TEMPLATABLE_VALUE(uint32_t, connection_timeout) - void play(Ts... x) override { + void play(const Ts &...x) override { auto ssid = this->ssid_.value(x...); auto password = this->password_.value(x...); // Avoid multiple calls diff --git a/esphome/components/wifi_info/wifi_info_text_sensor.h b/esphome/components/wifi_info/wifi_info_text_sensor.h index 5358e3c6f3..65bf3da103 100644 --- a/esphome/components/wifi_info/wifi_info_text_sensor.h +++ b/esphome/components/wifi_info/wifi_info_text_sensor.h @@ -10,8 +10,6 @@ namespace esphome { namespace wifi_info { -static constexpr size_t MAX_STATE_LENGTH = 255; - class IPAddressWiFiInfo : public Component, public text_sensor::TextSensor { public: void setup() override;