Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump deebot-client to 9.0.0 #131525

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a repair issue would be helpful here, since it is direct user visible and could link to the troubleshooting section in the docs, were the user can find instructions how to request or contribute the support of the model to the lib?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should only raise repair issues which the user can fix. This is not the case here and therefore I choose to create only a log entry

(
'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
Loading