Skip to content

Commit

Permalink
Bump deebot-client to 9.0.0 (#131525)
Browse files Browse the repository at this point in the history
  • Loading branch information
edenhaus authored Nov 25, 2024
1 parent f5b2002 commit 2bf7518
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 23 deletions.
46 changes: 26 additions & 20 deletions homeassistant/components/ecovacs/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from deebot_client.const import UNDEFINED, UndefinedType
from deebot_client.device import Device
from deebot_client.exceptions import DeebotError, InvalidAuthenticationError
from deebot_client.models import DeviceInfo
from deebot_client.mqtt_client import MqttClient, create_mqtt_config
from deebot_client.util import md5
from deebot_client.util.continents import get_continent
Expand Down Expand Up @@ -81,25 +80,32 @@ async def initialize(self) -> None:
try:
devices = await self._api_client.get_devices()
credentials = await self._authenticator.authenticate()
for device_config in devices:
if isinstance(device_config, DeviceInfo):
# MQTT device
device = Device(device_config, self._authenticator)
mqtt = await self._get_mqtt_client()
await device.initialize(mqtt)
self._devices.append(device)
else:
# Legacy device
bot = VacBot(
credentials.user_id,
EcoVacsAPI.REALM,
self._device_id[0:8],
credentials.token,
device_config,
self._continent,
monitor=True,
)
self._legacy_devices.append(bot)
for device_info in devices.mqtt:
device = Device(device_info, self._authenticator)
mqtt = await self._get_mqtt_client()
await device.initialize(mqtt)
self._devices.append(device)
for device_config in devices.xmpp:
bot = VacBot(
credentials.user_id,
EcoVacsAPI.REALM,
self._device_id[0:8],
credentials.token,
device_config,
self._continent,
monitor=True,
)
self._legacy_devices.append(bot)
for device_config in devices.not_supported:
_LOGGER.warning(
(
'Device "%s" not supported. Please add support for it to '
"https://github.com/DeebotUniverse/client.py: %s"
),
device_config["deviceName"],
device_config,
)

except InvalidAuthenticationError as ex:
raise ConfigEntryError("Invalid credentials") from ex
except DeebotError as ex:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/ecovacs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/ecovacs",
"iot_class": "cloud_push",
"loggers": ["sleekxmppfs", "sucks", "deebot_client"],
"requirements": ["py-sucks==0.9.10", "deebot-client==8.4.1"]
"requirements": ["py-sucks==0.9.10", "deebot-client==9.0.0"]
}
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ debugpy==1.8.6
# decora==0.6

# homeassistant.components.ecovacs
deebot-client==8.4.1
deebot-client==9.0.0

# homeassistant.components.ihc
# homeassistant.components.namecheapdns
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ dbus-fast==2.24.3
debugpy==1.8.6

# homeassistant.components.ecovacs
deebot-client==8.4.1
deebot-client==9.0.0

# homeassistant.components.ihc
# homeassistant.components.namecheapdns
Expand Down

0 comments on commit 2bf7518

Please sign in to comment.