From acd24402ddc7e7c086ed20d5e88baecb7d826824 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 22 Oct 2025 11:16:28 -1000 Subject: [PATCH] reduce scope --- esphome/components/hbridge/fan/hbridge_fan.cpp | 3 +-- esphome/components/speed/fan/speed_fan.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/esphome/components/hbridge/fan/hbridge_fan.cpp b/esphome/components/hbridge/fan/hbridge_fan.cpp index c059783b1ee..605a9d4ef39 100644 --- a/esphome/components/hbridge/fan/hbridge_fan.cpp +++ b/esphome/components/hbridge/fan/hbridge_fan.cpp @@ -36,8 +36,7 @@ void HBridgeFan::setup() { // Construct traits this->traits_ = fan::FanTraits(this->oscillating_ != nullptr, true, true, this->speed_count_); - if (!this->preset_modes_.empty()) - this->traits_.set_supported_preset_modes(this->preset_modes_); + this->traits_.set_supported_preset_modes(this->preset_modes_); } void HBridgeFan::dump_config() { diff --git a/esphome/components/speed/fan/speed_fan.cpp b/esphome/components/speed/fan/speed_fan.cpp index 9205d3592b4..57bd7954169 100644 --- a/esphome/components/speed/fan/speed_fan.cpp +++ b/esphome/components/speed/fan/speed_fan.cpp @@ -15,8 +15,7 @@ void SpeedFan::setup() { // Construct traits this->traits_ = fan::FanTraits(this->oscillating_ != nullptr, true, this->direction_ != nullptr, this->speed_count_); - if (!this->preset_modes_.empty()) - this->traits_.set_supported_preset_modes(this->preset_modes_); + this->traits_.set_supported_preset_modes(this->preset_modes_); } void SpeedFan::dump_config() { LOG_FAN("", "Speed Fan", this); }