diff --git a/esphome/components/husb238/husb238.h b/esphome/components/husb238/husb238.h index 7ab1f3b669..01bf8a3be8 100644 --- a/esphome/components/husb238/husb238.h +++ b/esphome/components/husb238/husb238.h @@ -201,6 +201,7 @@ class Husb238Component : public PollingComponent, public i2c::I2CDevice { std::string get_capabilities_(); }; +#ifdef USE_SELECT class Husb238VoltageSelect : public select::Select, public Parented { public: Husb238VoltageSelect() = default; @@ -211,6 +212,7 @@ class Husb238VoltageSelect : public select::Select, public Parentedparent_->command_request_voltage(state); }; }; +#endif } // namespace husb238 } // namespace esphome