Skip to content

Commit

Permalink
remove error method; update set fan speed
Browse files Browse the repository at this point in the history
  • Loading branch information
unfilet committed Mar 29, 2021
1 parent 33dd70b commit 0343f87
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions custom_components/localtuya/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,6 @@ def fan_speed_list(self) -> list:
"""Return the list of available fan speeds and cleaning modes."""
return self._cleaning_modes_list + self._fan_speed_list

@property
def error(self):
"""Return error message."""
return ""

async def async_start(self, **kwargs):
"""Turn the vacuum on and start cleaning."""
await self._device.set_dp(self._commands_set[0], self._config[CONF_COMMANDS_DP])
Expand Down Expand Up @@ -181,9 +176,9 @@ async def async_locate(self, **kwargs):
"""Locate the vacuum cleaner."""
return None

async def async_set_fan_speed(self, **kwargs):
async def async_set_fan_speed(self, fan_speed, **kwargs):
"""Set the cleaning mode."""
fan_speed = kwargs["fan_speed"]
#fan_speed = kwargs["fan_speed"]
if fan_speed in self._cleaning_modes_list:
print("SET NEW CM [{}]".format(fan_speed))
await self._device.set_dp(fan_speed, self._config[CONF_CLEANING_MODE_DP])
Expand Down

0 comments on commit 0343f87

Please sign in to comment.