diff --git a/homeassistant/components/water_heater/__init__.py b/homeassistant/components/water_heater/__init__.py index 4396c66cf22..c821824d279 100644 --- a/homeassistant/components/water_heater/__init__.py +++ b/homeassistant/components/water_heater/__init__.py @@ -167,7 +167,7 @@ class WaterHeaterEntity(Entity): _attr_operation_list: list[str] | None = None _attr_precision: float _attr_state: None = None - _attr_supported_features: WaterHeaterEntityFeature | int = 0 + _attr_supported_features: WaterHeaterEntityFeature = WaterHeaterEntityFeature(0) _attr_target_temperature_high: float | None = None _attr_target_temperature_low: float | None = None _attr_target_temperature: float | None = None @@ -338,7 +338,7 @@ class WaterHeaterEntity(Entity): ) @property - def supported_features(self) -> WaterHeaterEntityFeature | int: + def supported_features(self) -> WaterHeaterEntityFeature: """Return the list of supported features.""" return self._attr_supported_features diff --git a/pylint/plugins/hass_enforce_type_hints.py b/pylint/plugins/hass_enforce_type_hints.py index 53c3aa4b8b3..b7219bbf0e4 100644 --- a/pylint/plugins/hass_enforce_type_hints.py +++ b/pylint/plugins/hass_enforce_type_hints.py @@ -2539,7 +2539,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { ), TypeHintMatch( function_name="supported_features", - return_type=["WaterHeaterEntityFeature", "int"], + return_type="WaterHeaterEntityFeature", ), TypeHintMatch( function_name="target_temperature",