[water_heater] Set OPERATION_MODE feature flag when modes are configured

The template water_heater component was setting the supported modes
list but not setting the WATER_HEATER_SUPPORTS_OPERATION_MODE feature
flag, causing Home Assistant to not know that mode selection is
supported.

Fixes https://github.com/esphome/esphome/issues/14605
This commit is contained in:
J. Nick Koston
2026-03-12 14:10:57 -10:00
parent fd8e510745
commit cd6c65c670
@@ -26,6 +26,7 @@ water_heater::WaterHeaterTraits TemplateWaterHeater::traits() {
if (!this->supported_modes_.empty()) {
traits.set_supported_modes(this->supported_modes_);
traits.add_feature_flags(water_heater::WATER_HEATER_SUPPORTS_OPERATION_MODE);
}
traits.set_supports_current_temperature(true);