Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix check for HA Yellow radio in otbr config flow #96789

Merged
merged 1 commit into from Jul 17, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/otbr/config_flow.py
Expand Up @@ -50,7 +50,7 @@ async def _title(hass: HomeAssistant, discovery_info: HassioServiceInfo) -> str:
addon_info = await async_get_addon_info(hass, discovery_info.slug)
device = addon_info.get("options", {}).get("device")

if _is_yellow(hass) and device == "/dev/TTYAMA1":
if _is_yellow(hass) and device == "/dev/ttyAMA1":
return f"Home Assistant Yellow ({discovery_info.name})"

if device and "SkyConnect" in device:
Expand Down
2 changes: 1 addition & 1 deletion tests/components/otbr/test_config_flow.py
Expand Up @@ -240,7 +240,7 @@
addon_info.return_value = {
"available": True,
"hostname": None,
"options": {"device": "/dev/TTYAMA1"},
"options": {"device": "/dev/ttyAMA1"},
"state": None,
"update_available": False,
"version": None,
Expand Down Expand Up @@ -380,7 +380,7 @@
}

assert results[0]["type"] == FlowResultType.CREATE_ENTRY
assert results[0]["title"] == "Home Assistant SkyConnect"

Check failure on line 383 in tests/components/otbr/test_config_flow.py

View workflow job for this annotation

GitHub Actions / Run tests Python 3.10 (otbr)

test_hassio_discovery_flow_2x_addons AssertionError: assert 'Home Assista...ultiprotocol)' == 'Home Assistant SkyConnect' - Home Assistant SkyConnect + Home Assistant SkyConnect (Silicon Labs Multiprotocol)

Check failure on line 383 in tests/components/otbr/test_config_flow.py

View workflow job for this annotation

GitHub Actions / Run tests Python 3.11 (otbr)

test_hassio_discovery_flow_2x_addons AssertionError: assert 'Home Assista...ultiprotocol)' == 'Home Assistant SkyConnect' - Home Assistant SkyConnect + Home Assistant SkyConnect (Silicon Labs Multiprotocol)
assert results[0]["data"] == expected_data
assert results[0]["options"] == {}
assert results[1]["type"] == FlowResultType.ABORT
Expand Down