Bump deebot_client to 5.1.0 (#109360)

This commit is contained in:
Robert Resch 2024-02-02 11:02:00 +01:00 committed by GitHub
parent f22b71d803
commit 61e6882b91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 10 additions and 5 deletions

View file

@ -75,7 +75,7 @@ async def _validate_input(
rest_config = create_rest_config( rest_config = create_rest_config(
aiohttp_client.async_get_clientsession(hass), aiohttp_client.async_get_clientsession(hass),
device_id=device_id, device_id=device_id,
country=country, alpha_2_country=country,
override_rest_url=rest_url, override_rest_url=rest_url,
) )
@ -266,6 +266,10 @@ class EcovacsConfigFlow(ConfigFlow, domain=DOMAIN):
# If not we will inform the user about the mismatch. # If not we will inform the user about the mismatch.
error = None error = None
placeholders = None placeholders = None
# Convert the country to upper case as ISO 3166-1 alpha-2 country codes are upper case
user_input[CONF_COUNTRY] = user_input[CONF_COUNTRY].upper()
if len(user_input[CONF_COUNTRY]) != 2: if len(user_input[CONF_COUNTRY]) != 2:
error = "invalid_country_length" error = "invalid_country_length"
placeholders = {"countries_url": "https://www.iso.org/obp/ui/#search/code/"} placeholders = {"countries_url": "https://www.iso.org/obp/ui/#search/code/"}

View file

@ -49,7 +49,7 @@ class EcovacsController:
create_rest_config( create_rest_config(
aiohttp_client.async_get_clientsession(self._hass), aiohttp_client.async_get_clientsession(self._hass),
device_id=self._device_id, device_id=self._device_id,
country=country, alpha_2_country=country,
override_rest_url=config.get(CONF_OVERRIDE_REST_URL), override_rest_url=config.get(CONF_OVERRIDE_REST_URL),
), ),
config[CONF_USERNAME], config[CONF_USERNAME],

View file

@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/ecovacs", "documentation": "https://www.home-assistant.io/integrations/ecovacs",
"iot_class": "cloud_push", "iot_class": "cloud_push",
"loggers": ["sleekxmppfs", "sucks", "deebot_client"], "loggers": ["sleekxmppfs", "sucks", "deebot_client"],
"requirements": ["py-sucks==0.9.8", "deebot-client==5.0.0"] "requirements": ["py-sucks==0.9.8", "deebot-client==5.1.0"]
} }

View file

@ -684,7 +684,7 @@ debugpy==1.8.0
# decora==0.6 # decora==0.6
# homeassistant.components.ecovacs # homeassistant.components.ecovacs
deebot-client==5.0.0 deebot-client==5.1.0
# homeassistant.components.ihc # homeassistant.components.ihc
# homeassistant.components.namecheapdns # homeassistant.components.namecheapdns

View file

@ -559,7 +559,7 @@ dbus-fast==2.21.1
debugpy==1.8.0 debugpy==1.8.0
# homeassistant.components.ecovacs # homeassistant.components.ecovacs
deebot-client==5.0.0 deebot-client==5.1.0
# homeassistant.components.ihc # homeassistant.components.ihc
# homeassistant.components.namecheapdns # homeassistant.components.namecheapdns

View file

@ -80,6 +80,7 @@ async def test_invalid_auth(
({}, 0), ({}, 0),
({DOMAIN: IMPORT_DATA.copy()}, 1), ({DOMAIN: IMPORT_DATA.copy()}, 1),
], ],
ids=["no_config", "import_config"],
) )
async def test_async_setup_import( async def test_async_setup_import(
hass: HomeAssistant, hass: HomeAssistant,