diff --git a/custom_components/xiaomi_miio_airpurifier/fan.py b/custom_components/xiaomi_miio_airpurifier/fan.py index 4d8f428..ed731fa 100644 --- a/custom_components/xiaomi_miio_airpurifier/fan.py +++ b/custom_components/xiaomi_miio_airpurifier/fan.py @@ -2451,19 +2451,11 @@ async def async_set_preset_mode(self, preset_mode: str) -> None: await self.async_turn_off() return - if self._natural_mode: - await self._try_command( - "Setting fan speed of the miio device failed.", - self._device.set_natural_speed, - FAN_PRESET_MODE_VALUES_P5[preset_mode], - ) - else: - await self._try_command( - "Setting fan speed of the miio device failed.", - self._device.set_direct_speed, - FAN_PRESET_MODE_VALUES_P5[preset_mode], - ) - + await self._try_command( + "Setting fan speed of the miio device failed.", + self._device.set_speed, + FAN_PRESET_MODE_VALUES_P5[preset_mode], + ) async def async_set_percentage(self, percentage: int) -> None: """Set the speed percentage of the fan.""" diff --git a/custom_components/xiaomi_miio_airpurifier/manifest.json b/custom_components/xiaomi_miio_airpurifier/manifest.json index 313da62..49db644 100644 --- a/custom_components/xiaomi_miio_airpurifier/manifest.json +++ b/custom_components/xiaomi_miio_airpurifier/manifest.json @@ -1,7 +1,7 @@ { "domain": "xiaomi_miio_airpurifier", "name": "Xiaomi Mi Air Purifier, Air Humidifier, Air Fresh and Pedestal Fan Integration", - "version": "0.6.7", + "version": "0.6.8", "config_flow": false, "documentation": "https://github.com/syssi/xiaomi_airpurifier", "issue_tracker": "https://github.com/syssi/xiaomi_airpurifier/issues",