mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Bump deebot-client to 9.0.0 (#131525)
This commit is contained in:
parent
f5b2002057
commit
2bf7518dab
@ -13,7 +13,6 @@ from deebot_client.authentication import Authenticator, create_rest_config
|
||||
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
|
||||
@ -81,25 +80,32 @@ class EcovacsController:
|
||||
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:
|
||||
|
@ -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"]
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user