Compare commits

..

1 Commits

Author SHA1 Message Date
abmantis
a4fecc016d Correct websocket commands test name 2025-12-03 17:42:17 +00:00
6 changed files with 4 additions and 62 deletions

View File

@@ -72,7 +72,7 @@
"title": "The blinker fluid is empty and needs to be refilled"
},
"special_repair": {
"description": "This is a special repair created by a preview feature! This demonstrates how Labs features can interact with the Home Assistant repair system. You can disable this by turning off the kitchen sink special repair feature in Settings > System > Labs.",
"description": "This is a special repair created by a preview feature! This demonstrates how lab features can interact with the Home Assistant repair system. You can disable this by turning off the kitchen sink special repair feature in Settings > System > Labs.",
"title": "Special repair feature preview"
},
"transmogrifier_deprecated": {
@@ -109,7 +109,7 @@
},
"preview_features": {
"special_repair": {
"description": "Creates a **special repair issue** when enabled.\n\nThis demonstrates how Labs features can interact with other Home Assistant integrations.",
"description": "Creates a **special repair issue** when enabled.\n\nThis demonstrates how lab features can interact with other Home Assistant integrations.",
"disable_confirmation": "This will remove the special repair issue. Don't worry, this is just a demonstration feature.",
"enable_confirmation": "This will create a special repair issue to demonstrate Labs preview features. This is just an example and won't affect your actual system.",
"name": "Special repair"

View File

@@ -17,7 +17,6 @@ from roborock import (
from roborock.data import UserData
from roborock.devices.device import RoborockDevice
from roborock.devices.device_manager import UserParams, create_device_manager
from roborock.map.map_parser import MapParserConfig
from homeassistant.const import CONF_USERNAME, EVENT_HOMEASSISTANT_STOP
from homeassistant.core import HomeAssistant
@@ -25,16 +24,7 @@ from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from .const import (
CONF_BASE_URL,
CONF_SHOW_BACKGROUND,
CONF_USER_DATA,
DEFAULT_DRAWABLES,
DOMAIN,
DRAWABLES,
MAP_SCALE,
PLATFORMS,
)
from .const import CONF_BASE_URL, CONF_USER_DATA, DOMAIN, PLATFORMS
from .coordinator import (
RoborockConfigEntry,
RoborockCoordinators,
@@ -66,15 +56,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: RoborockConfigEntry) ->
user_params,
cache=cache,
session=async_get_clientsession(hass),
map_parser_config=MapParserConfig(
drawables=[
drawable
for drawable, default_value in DEFAULT_DRAWABLES.items()
if entry.options.get(DRAWABLES, {}).get(drawable, default_value)
],
show_background=entry.options.get(CONF_SHOW_BACKGROUND, False),
map_scale=MAP_SCALE,
),
)
except RoborockInvalidCredentials as err:
raise ConfigEntryAuthFailed(

View File

@@ -680,13 +680,6 @@ class BaseZhaFlow(ConfigEntryBaseFlow):
try:
await self._form_network_task
except Exception as exc:
_LOGGER.exception("Failed to form new network")
self._progress_error = AbortFlow(
reason="cannot_form_network",
description_placeholders={"error": str(exc)},
)
return self.async_show_progress_done(next_step_id="progress_failed")
finally:
self._form_network_task = None

View File

@@ -1,7 +1,6 @@
{
"config": {
"abort": {
"cannot_form_network": "Could not form a new Zigbee network.\n\nError: {error}",
"cannot_resolve_path": "Could not resolve device path: {path}",
"cannot_restore_backup": "The adapter you are restoring to does not properly support backup restoration. Please upgrade the firmware.\n\nError: {error}",
"cannot_restore_backup_no_ieee_confirm": "The adapter you are restoring to has outdated firmware and cannot write the adapter IEEE address multiple times. Please upgrade the firmware or confirm permanent overwrite in the previous step.",
@@ -1924,7 +1923,6 @@
},
"options": {
"abort": {
"cannot_form_network": "[%key:component::zha::config::abort::cannot_form_network%]",
"cannot_resolve_path": "[%key:component::zha::config::abort::cannot_resolve_path%]",
"cannot_restore_backup": "[%key:component::zha::config::abort::cannot_restore_backup%]",
"cannot_restore_backup_no_ieee_confirm": "[%key:component::zha::config::abort::cannot_restore_backup_no_ieee_confirm%]",

View File

@@ -3660,7 +3660,7 @@ async def test_extract_from_target_validation_error(
@pytest.mark.usefixtures("enable_experimental_triggers_conditions", "target_entities")
@patch("annotatedyaml.loader.load_yaml")
@pytest.mark.parametrize("automation_component", ["trigger", "condition"])
async def test_get_triggers_for_target(
async def test_get_triggers_conditions_for_target(
mock_load_yaml: Mock,
hass: HomeAssistant,
websocket_client: MockHAClientWebSocket,

View File

@@ -1813,36 +1813,6 @@ async def test_formation_strategy_form_initial_network(
assert result2["type"] is FlowResultType.CREATE_ENTRY
async def test_formation_strategy_form_initial_network_failure(
advanced_pick_radio: RadioPicker, mock_app: AsyncMock, hass: HomeAssistant
) -> None:
"""Test forming a new network that fails with an exception."""
# Mock form_network to raise an exception
mock_app.form_network.side_effect = DelayedAsyncMock(
side_effect=Exception("Network formation failed")
)
result = await advanced_pick_radio(RadioType.ezsp)
result_form = await hass.config_entries.flow.async_configure(
result["flow_id"],
user_input={"next_step_id": config_flow.FORMATION_FORM_NEW_NETWORK},
)
result2 = await consume_progress_flow(
hass,
flow_id=result_form["flow_id"],
valid_step_ids=("form_new_network",),
)
await hass.async_block_till_done()
assert result2["type"] is FlowResultType.ABORT
assert result2["reason"] == "cannot_form_network"
assert "Network formation failed" in result2["description_placeholders"]["error"]
# Verify form_network was called
mock_app.form_network.assert_called_once()
@patch(f"zigpy_znp.{PROBE_FUNCTION_PATH}", AsyncMock(return_value=True))
@patch("homeassistant.components.zha.async_setup_entry", AsyncMock(return_value=True))
async def test_onboarding_auto_formation_new_hardware(