diff --git a/homeassistant/components/bond/fan.py b/homeassistant/components/bond/fan.py index 465c4b8966bd..403e0ae01e6d 100644 --- a/homeassistant/components/bond/fan.py +++ b/homeassistant/components/bond/fan.py @@ -72,6 +72,14 @@ class BondFan(BondEntity, FanEntity): super().__init__(hub, device, bpup_subs) if self._device.has_action(Action.BREEZE_ON): self._attr_preset_modes = [PRESET_MODE_BREEZE] + features = FanEntityFeature(0) + if self._device.supports_speed(): + features |= FanEntityFeature.SET_SPEED + if self._device.supports_direction(): + features |= FanEntityFeature.DIRECTION + if self._device.has_action(Action.BREEZE_ON): + features |= FanEntityFeature.PRESET_MODE + self._attr_supported_features = features def _apply_state(self) -> None: state = self._device.state @@ -81,18 +89,6 @@ class BondFan(BondEntity, FanEntity): breeze = state.get("breeze", [0, 0, 0]) self._attr_preset_mode = PRESET_MODE_BREEZE if breeze[0] else None - @property - def supported_features(self) -> FanEntityFeature: - """Flag supported features.""" - features = FanEntityFeature(0) - if self._device.supports_speed(): - features |= FanEntityFeature.SET_SPEED - if self._device.supports_direction(): - features |= FanEntityFeature.DIRECTION - if self._device.has_action(Action.BREEZE_ON): - features |= FanEntityFeature.PRESET_MODE - return features - @property def _speed_range(self) -> tuple[int, int]: """Return the range of speeds."""