Skip to content

Commit

Permalink
Merge branch 'release/0.6.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi committed Apr 18, 2021
2 parents bfd40f2 + aeab83b commit b28b6e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
18 changes: 5 additions & 13 deletions custom_components/xiaomi_miio_airpurifier/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
2 changes: 1 addition & 1 deletion custom_components/xiaomi_miio_airpurifier/manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit b28b6e9

Please sign in to comment.