1
0
mirror of https://github.com/home-assistant/core.git synced 2026-02-21 02:18:47 +00:00

Bump python-roborock to 2.50.2 (#153561)

This commit is contained in:
Luke Lashley
2025-10-03 12:30:30 -04:00
committed by GitHub
parent d595ec8a07
commit 2f3fbf00b7
7 changed files with 23 additions and 14 deletions

View File

@@ -129,7 +129,7 @@ class RoborockFlowHandler(ConfigFlow, domain=DOMAIN):
reauth_entry, data_updates={CONF_USER_DATA: user_data.as_dict()}
)
self._abort_if_unique_id_configured(error="already_configured_account")
return self._create_entry(self._client, self._username, user_data)
return await self._create_entry(self._client, self._username, user_data)
return self.async_show_form(
step_id="code",
@@ -176,7 +176,7 @@ class RoborockFlowHandler(ConfigFlow, domain=DOMAIN):
return await self.async_step_code()
return self.async_show_form(step_id="reauth_confirm", errors=errors)
def _create_entry(
async def _create_entry(
self, client: RoborockApiClient, username: str, user_data: UserData
) -> ConfigFlowResult:
"""Finished config flow and create entry."""
@@ -185,7 +185,7 @@ class RoborockFlowHandler(ConfigFlow, domain=DOMAIN):
data={
CONF_USERNAME: username,
CONF_USER_DATA: user_data.as_dict(),
CONF_BASE_URL: client.base_url,
CONF_BASE_URL: await client.base_url,
},
)

View File

@@ -19,7 +19,7 @@
"loggers": ["roborock"],
"quality_scale": "silver",
"requirements": [
"python-roborock==2.49.1",
"python-roborock==2.50.2",
"vacuum-map-parser-roborock==0.1.4"
]
}

2
requirements_all.txt generated
View File

@@ -2550,7 +2550,7 @@ python-rabbitair==0.0.8
python-ripple-api==0.0.3
# homeassistant.components.roborock
python-roborock==2.49.1
python-roborock==2.50.2
# homeassistant.components.smarttub
python-smarttub==0.0.44

View File

@@ -2120,7 +2120,7 @@ python-pooldose==0.5.0
python-rabbitair==0.0.8
# homeassistant.components.roborock
python-roborock==2.49.1
python-roborock==2.50.2
# homeassistant.components.smarttub
python-smarttub==0.0.44

View File

@@ -1,11 +1,12 @@
"""Global fixtures for Roborock integration."""
import asyncio
from collections.abc import Generator
from copy import deepcopy
import pathlib
import tempfile
from typing import Any
from unittest.mock import Mock, patch
from unittest.mock import Mock, PropertyMock, patch
import pytest
from roborock import RoborockCategory, RoomMapping
@@ -70,6 +71,9 @@ class A01Mock(RoborockMqttClientA01):
@pytest.fixture(name="bypass_api_client_fixture")
def bypass_api_client_fixture() -> None:
"""Skip calls to the API client."""
base_url_future = asyncio.Future()
base_url_future.set_result(BASE_URL)
with (
patch(
"homeassistant.components.roborock.RoborockApiClient.get_home_data_v3",
@@ -82,6 +86,11 @@ def bypass_api_client_fixture() -> None:
patch(
"homeassistant.components.roborock.coordinator.RoborockLocalClientV1.load_multi_map"
),
patch(
"homeassistant.components.roborock.config_flow.RoborockApiClient.base_url",
new_callable=PropertyMock,
return_value=base_url_future,
),
):
yield

View File

@@ -61,7 +61,7 @@ USER_DATA = UserData.from_dict(
MOCK_CONFIG = {
CONF_USERNAME: USER_EMAIL,
CONF_USER_DATA: USER_DATA.as_dict(),
CONF_BASE_URL: None,
CONF_BASE_URL: BASE_URL,
}
HOME_DATA_RAW = {

View File

@@ -216,9 +216,9 @@
'squareMeterCleanArea': 1159.2,
}),
'consumable': dict({
'cleaningBrushTimeLeft': 1079935,
'cleaningBrushTimeLeft': 235,
'cleaningBrushWorkTimes': 65,
'dustCollectionTimeLeft': 80975,
'dustCollectionTimeLeft': 65,
'dustCollectionWorkTimes': 25,
'filterElementWorkTime': 0,
'filterTimeLeft': 465618,
@@ -229,7 +229,7 @@
'sensorTimeLeft': 33618,
'sideBrushTimeLeft': 645618,
'sideBrushWorkTime': 74382,
'strainerTimeLeft': 539935,
'strainerTimeLeft': 85,
'strainerWorkTimes': 65,
}),
'lastCleanRecord': dict({
@@ -501,9 +501,9 @@
'squareMeterCleanArea': 1159.2,
}),
'consumable': dict({
'cleaningBrushTimeLeft': 1079935,
'cleaningBrushTimeLeft': 235,
'cleaningBrushWorkTimes': 65,
'dustCollectionTimeLeft': 80975,
'dustCollectionTimeLeft': 65,
'dustCollectionWorkTimes': 25,
'filterElementWorkTime': 0,
'filterTimeLeft': 465618,
@@ -514,7 +514,7 @@
'sensorTimeLeft': 33618,
'sideBrushTimeLeft': 645618,
'sideBrushWorkTime': 74382,
'strainerTimeLeft': 539935,
'strainerTimeLeft': 85,
'strainerWorkTimes': 65,
}),
'lastCleanRecord': dict({