From 4501bdb5bffba7b99fc09c43986406e3c26b887d Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Mon, 17 Jul 2023 22:21:52 +0200 Subject: [PATCH] Fix check for HA Yellow radio in otbr config flow (#96789) --- homeassistant/components/otbr/config_flow.py | 4 ++-- tests/components/otbr/test_config_flow.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/otbr/config_flow.py b/homeassistant/components/otbr/config_flow.py index a3fe046409b..9fa38cedbe8 100644 --- a/homeassistant/components/otbr/config_flow.py +++ b/homeassistant/components/otbr/config_flow.py @@ -50,8 +50,8 @@ 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": - return "Home Assistant Yellow" + if _is_yellow(hass) and device == "/dev/ttyAMA1": + return f"Home Assistant Yellow ({discovery_info.name})" if device and "SkyConnect" in device: return "Home Assistant SkyConnect" diff --git a/tests/components/otbr/test_config_flow.py b/tests/components/otbr/test_config_flow.py index da25edde045..f828151a3b4 100644 --- a/tests/components/otbr/test_config_flow.py +++ b/tests/components/otbr/test_config_flow.py @@ -240,7 +240,7 @@ async def test_hassio_discovery_flow_yellow( addon_info.return_value = { "available": True, "hostname": None, - "options": {"device": "/dev/TTYAMA1"}, + "options": {"device": "/dev/ttyAMA1"}, "state": None, "update_available": False, "version": None,