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

This commit is contained in:
Erik Montnemery 2023-07-17 22:21:52 +02:00 committed by Franck Nijhof
parent 7748000026
commit 4501bdb5bf
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
2 changed files with 3 additions and 3 deletions

View File

@ -50,8 +50,8 @@ async def _title(hass: HomeAssistant, discovery_info: HassioServiceInfo) -> str:
addon_info = await async_get_addon_info(hass, discovery_info.slug) addon_info = await async_get_addon_info(hass, discovery_info.slug)
device = addon_info.get("options", {}).get("device") device = addon_info.get("options", {}).get("device")
if _is_yellow(hass) and device == "/dev/TTYAMA1": if _is_yellow(hass) and device == "/dev/ttyAMA1":
return "Home Assistant Yellow" return f"Home Assistant Yellow ({discovery_info.name})"
if device and "SkyConnect" in device: if device and "SkyConnect" in device:
return "Home Assistant SkyConnect" return "Home Assistant SkyConnect"

View File

@ -240,7 +240,7 @@ async def test_hassio_discovery_flow_yellow(
addon_info.return_value = { addon_info.return_value = {
"available": True, "available": True,
"hostname": None, "hostname": None,
"options": {"device": "/dev/TTYAMA1"}, "options": {"device": "/dev/ttyAMA1"},
"state": None, "state": None,
"update_available": False, "update_available": False,
"version": None, "version": None,