Skip to content

Commit

Permalink
Merge pull request #7 from bittles/dev
Browse files Browse the repository at this point in the history
shouldnt edit on phone, fixed now
  • Loading branch information
bittles authored Jan 6, 2023
2 parents 24fc2ea + 67fef38 commit f1002d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion custom_components/ecovacs/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "ecovacs",
"name": "Ecovacs Bumper",
"version": "1.4.1",
"version": "1.4.2",
"documentation": "https://github.com/bittles/ha_ecovacs_bumper",
"issue_tracker": "https://github.com/bittles/ha_ecovacs_bumper/issues",
"requirements": ["sleekxmppfs==1.4.1", "requests>=2.18", "pycryptodome>=3.4", "pycountry-convert>=0.5", "paho-mqtt>=1.4", "stringcase>=1.2"],
Expand Down
18 changes: 9 additions & 9 deletions custom_components/ecovacs/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def setup_platform(
class EcovacsVacuum(VacuumEntity):
"""Ecovacs Vacuums such as Deebot."""

_attr_fan_speed_list = [sucksbumper.FAN_SPEED_NORMAL, sucksbumper.FAN_SPEED_HIGH]
_attr_fan_speed_list = [sucks.FAN_SPEED_NORMAL, sucks.FAN_SPEED_HIGH]
_attr_should_poll = False
_attr_supported_features = (
VacuumEntityFeature.BATTERY
Expand All @@ -53,7 +53,7 @@ class EcovacsVacuum(VacuumEntity):
| VacuumEntityFeature.FAN_SPEED
)

def __init__(self, device: sucksbumper.VacBot) -> None:
def __init__(self, device: sucks.VacBot) -> None:
"""Initialize the Ecovacs Vacuum."""
self.device = device
self.device.connect_and_wait_until_ready()
Expand Down Expand Up @@ -112,7 +112,7 @@ def status(self) -> str | None:
def return_to_base(self, **kwargs: Any) -> None:
"""Set the vacuum cleaner to return to the dock."""

self.device.run(sucksbumper.Charge())
self.device.run(sucks.Charge())

@property
def battery_icon(self) -> str:
Expand All @@ -137,7 +137,7 @@ def fan_speed(self) -> str | None:
def turn_on(self, **kwargs: Any) -> None:
"""Turn the vacuum on and start cleaning."""

self.device.run(sucksbumper.Clean())
self.device.run(sucks.Clean())

def turn_off(self, **kwargs: Any) -> None:
"""Turn the vacuum off stopping the cleaning and returning home."""
Expand All @@ -146,23 +146,23 @@ def turn_off(self, **kwargs: Any) -> None:
def stop(self, **kwargs: Any) -> None:
"""Stop the vacuum cleaner."""

self.device.run(sucksbumper.Stop())
self.device.run(sucks.Stop())

def clean_spot(self, **kwargs: Any) -> None:
"""Perform a spot clean-up."""

self.device.run(sucksbumper.Spot())
self.device.run(sucks.Spot())

def locate(self, **kwargs: Any) -> None:
"""Locate the vacuum cleaner."""

self.device.run(sucksbumper.PlaySound())
self.device.run(sucks.PlaySound())

def set_fan_speed(self, fan_speed: str, **kwargs: Any) -> None:
"""Set fan speed."""
if self.is_on:

self.device.run(sucksbumper.Clean(mode=self.device.clean_status, speed=fan_speed))
self.device.run(sucks.Clean(mode=self.device.clean_status, speed=fan_speed))

def send_command(
self,
Expand All @@ -171,7 +171,7 @@ def send_command(
**kwargs: Any,
) -> None:
"""Send a command to a vacuum cleaner."""
self.device.run(sucksbumper.VacBotCommand(command, params))
self.device.run(sucks.VacBotCommand(command, params))

@property
def extra_state_attributes(self) -> dict[str, Any]:
Expand Down

0 comments on commit f1002d1

Please sign in to comment.