mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
ZHA repairs: remove links to obsolete docs (#145398)
This commit is contained in:
parent
13ce4322ac
commit
3c93f6e3f9
@ -37,16 +37,6 @@ class HardwareType(enum.StrEnum):
|
|||||||
OTHER = "other"
|
OTHER = "other"
|
||||||
|
|
||||||
|
|
||||||
DISABLE_MULTIPAN_URL = {
|
|
||||||
HardwareType.YELLOW: (
|
|
||||||
"https://yellow.home-assistant.io/guides/disable-multiprotocol/#flash-the-silicon-labs-radio-firmware"
|
|
||||||
),
|
|
||||||
HardwareType.SKYCONNECT: (
|
|
||||||
"https://skyconnect.home-assistant.io/procedures/disable-multiprotocol/#step-flash-the-silicon-labs-radio-firmware"
|
|
||||||
),
|
|
||||||
HardwareType.OTHER: None,
|
|
||||||
}
|
|
||||||
|
|
||||||
ISSUE_WRONG_SILABS_FIRMWARE_INSTALLED = "wrong_silabs_firmware_installed"
|
ISSUE_WRONG_SILABS_FIRMWARE_INSTALLED = "wrong_silabs_firmware_installed"
|
||||||
|
|
||||||
|
|
||||||
@ -99,7 +89,6 @@ async def warn_on_wrong_silabs_firmware(hass: HomeAssistant, device: str) -> boo
|
|||||||
issue_id=ISSUE_WRONG_SILABS_FIRMWARE_INSTALLED,
|
issue_id=ISSUE_WRONG_SILABS_FIRMWARE_INSTALLED,
|
||||||
is_fixable=False,
|
is_fixable=False,
|
||||||
is_persistent=True,
|
is_persistent=True,
|
||||||
learn_more_url=DISABLE_MULTIPAN_URL[hardware_type],
|
|
||||||
severity=ir.IssueSeverity.ERROR,
|
severity=ir.IssueSeverity.ERROR,
|
||||||
translation_key=(
|
translation_key=(
|
||||||
ISSUE_WRONG_SILABS_FIRMWARE_INSTALLED
|
ISSUE_WRONG_SILABS_FIRMWARE_INSTALLED
|
||||||
|
@ -18,7 +18,6 @@ from homeassistant.components.zha.repairs.network_settings_inconsistent import (
|
|||||||
ISSUE_INCONSISTENT_NETWORK_SETTINGS,
|
ISSUE_INCONSISTENT_NETWORK_SETTINGS,
|
||||||
)
|
)
|
||||||
from homeassistant.components.zha.repairs.wrong_silabs_firmware import (
|
from homeassistant.components.zha.repairs.wrong_silabs_firmware import (
|
||||||
DISABLE_MULTIPAN_URL,
|
|
||||||
ISSUE_WRONG_SILABS_FIRMWARE_INSTALLED,
|
ISSUE_WRONG_SILABS_FIRMWARE_INSTALLED,
|
||||||
HardwareType,
|
HardwareType,
|
||||||
_detect_radio_hardware,
|
_detect_radio_hardware,
|
||||||
@ -110,17 +109,12 @@ def test_detect_radio_hardware_failure(hass: HomeAssistant) -> None:
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
("detected_hardware", "expected_learn_more_url"),
|
("detected_hardware"),
|
||||||
[
|
[HardwareType.SKYCONNECT, HardwareType.YELLOW, HardwareType.OTHER],
|
||||||
(HardwareType.SKYCONNECT, DISABLE_MULTIPAN_URL[HardwareType.SKYCONNECT]),
|
|
||||||
(HardwareType.YELLOW, DISABLE_MULTIPAN_URL[HardwareType.YELLOW]),
|
|
||||||
(HardwareType.OTHER, None),
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
async def test_multipan_firmware_repair(
|
async def test_multipan_firmware_repair(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
detected_hardware: HardwareType,
|
detected_hardware: HardwareType,
|
||||||
expected_learn_more_url: str,
|
|
||||||
config_entry: MockConfigEntry,
|
config_entry: MockConfigEntry,
|
||||||
mock_zigpy_connect: ControllerApplication,
|
mock_zigpy_connect: ControllerApplication,
|
||||||
issue_registry: ir.IssueRegistry,
|
issue_registry: ir.IssueRegistry,
|
||||||
@ -159,7 +153,6 @@ async def test_multipan_firmware_repair(
|
|||||||
# The issue is created when we fail to probe
|
# The issue is created when we fail to probe
|
||||||
assert issue is not None
|
assert issue is not None
|
||||||
assert issue.translation_placeholders["firmware_type"] == "CPC"
|
assert issue.translation_placeholders["firmware_type"] == "CPC"
|
||||||
assert issue.learn_more_url == expected_learn_more_url
|
|
||||||
|
|
||||||
# If ZHA manages to start up normally after this, the issue will be deleted
|
# If ZHA manages to start up normally after this, the issue will be deleted
|
||||||
await hass.config_entries.async_setup(config_entry.entry_id)
|
await hass.config_entries.async_setup(config_entry.entry_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user