From 7513db9dcd70dde147181f56b711b0f42737a54c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 26 Mar 2026 15:50:10 -1000 Subject: [PATCH] Fix clang-tidy: protected method needs trailing underscore --- esphome/components/fan/fan.h | 2 +- esphome/components/fan/fan_traits.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/esphome/components/fan/fan.h b/esphome/components/fan/fan.h index 26b34d2bc6..d5763edf2f 100644 --- a/esphome/components/fan/fan.h +++ b/esphome/components/fan/fan.h @@ -178,7 +178,7 @@ class Fan : public EntityBase { /// Wire the Fan-owned preset modes pointer into the given traits object. void wire_preset_modes_(FanTraits &traits) { if (this->supported_preset_modes_) { - traits.set_supported_preset_modes(this->supported_preset_modes_); + traits.set_supported_preset_modes_(this->supported_preset_modes_); } } diff --git a/esphome/components/fan/fan_traits.h b/esphome/components/fan/fan_traits.h index 05810ceea4..78c215dc8c 100644 --- a/esphome/components/fan/fan_traits.h +++ b/esphome/components/fan/fan_traits.h @@ -77,7 +77,9 @@ class FanTraits { protected: /// Set the preset modes pointer (only Fan::wire_preset_modes_() should call this). - void set_supported_preset_modes(const std::vector *preset_modes) { this->preset_modes_ = preset_modes; } + void set_supported_preset_modes_(const std::vector *preset_modes) { + this->preset_modes_ = preset_modes; + } bool oscillation_{false}; bool speed_{false};