Skip to content
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
7 changes: 0 additions & 7 deletions homeassistant/components/roborock/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import logging
from typing import Any

import aiohttp
from roborock import (
RoborockException,
RoborockInvalidCredentials,
Expand Down Expand Up @@ -121,12 +120,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: RoborockConfigEntry) ->
translation_domain=DOMAIN,
translation_key="home_data_fail",
) from err
except (aiohttp.ClientError, TimeoutError) as err:
_LOGGER.debug("Network error setting up Roborock: %s", err)
raise ConfigEntryNotReady(
translation_domain=DOMAIN,
translation_key="network_error",
) from err

async def shutdown_roborock(_: Event | None = None) -> None:
await asyncio.gather(device_manager.close(), cache.flush())
Comment on lines 120 to 125
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/roborock/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"loggers": ["roborock"],
"quality_scale": "silver",
"requirements": [
"python-roborock==5.12.0",
"python-roborock==5.14.1",
"vacuum-map-parser-roborock==0.1.4"
]
}
3 changes: 0 additions & 3 deletions homeassistant/components/roborock/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -677,9 +677,6 @@
"mqtt_unauthorized": {
"message": "Roborock MQTT servers rejected the connection due to rate limiting or invalid credentials. You may either attempt to reauthenticate or wait and reload the integration."
},
"network_error": {
"message": "Network error connecting to Roborock servers. Check your internet connection and the Roborock service status."
},
"no_coordinators": {
"message": "No devices were able to successfully setup"
},
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 0 additions & 21 deletions tests/components/roborock/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from typing import Any
from unittest.mock import AsyncMock, patch

import aiohttp
from freezegun.api import FrozenDateTimeFactory
import pytest
from roborock import (
Expand Down Expand Up @@ -257,26 +256,6 @@ async def test_no_user_agreement(
assert mock_roborock_entry.error_reason_translation_key == "no_user_agreement"


@pytest.mark.parametrize(
"side_effect",
[aiohttp.ClientError(), TimeoutError()],
ids=["client_error", "timeout"],
)
async def test_network_error_during_setup(
hass: HomeAssistant,
mock_roborock_entry: MockConfigEntry,
side_effect: Exception,
) -> None:
"""Test that network errors during setup trigger retry, not terminal failure."""
with patch(
"homeassistant.components.roborock.create_device_manager",
side_effect=side_effect,
):
await hass.config_entries.async_setup(mock_roborock_entry.entry_id)
assert mock_roborock_entry.state is ConfigEntryState.SETUP_RETRY
assert mock_roborock_entry.error_reason_translation_key == "network_error"


@pytest.mark.parametrize("platforms", [[Platform.SENSOR]])
async def test_stale_device(
Comment on lines 259 to 260
hass: HomeAssistant,
Expand Down
Loading