Skip to content

Commit

Permalink
Merge branch 'release/0.3.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi committed Apr 18, 2021
2 parents 528b569 + 2a64877 commit 1e31013
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
17 changes: 5 additions & 12 deletions custom_components/xiaomi_miio_fan/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,18 +807,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."""
Expand Down
2 changes: 1 addition & 1 deletion custom_components/xiaomi_miio_fan/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "xiaomi_miio_fan",
"name": "Xiaomi Mi Smart Pedestal Fan",
"version": "0.3.2",
"version": "0.3.3",
"documentation": "https://github.com/syssi/xiaomi_fan",
"requirements": [
"construct==2.10.56",
Expand Down

0 comments on commit 1e31013

Please sign in to comment.