From a2a067a81ce0245a0d4bb1048abb77540a04cbbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A5le=20Stor=C3=B8=20Hauknes?= Date: Thu, 2 Oct 2025 19:25:19 +0200 Subject: [PATCH] Add serial number to the list of discovered devices (#153448) --- homeassistant/components/airthings_ble/config_flow.py | 2 +- tests/components/airthings_ble/test_config_flow.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/airthings_ble/config_flow.py b/homeassistant/components/airthings_ble/config_flow.py index 2d32fa6e7df0..fa6a52a5a798 100644 --- a/homeassistant/components/airthings_ble/config_flow.py +++ b/homeassistant/components/airthings_ble/config_flow.py @@ -171,7 +171,7 @@ class AirthingsConfigFlow(ConfigFlow, domain=DOMAIN): return self.async_abort(reason="no_devices_found") titles = { - address: discovery.device.name + address: get_name(discovery.device) for (address, discovery) in self._discovered_devices.items() } return self.async_show_form( diff --git a/tests/components/airthings_ble/test_config_flow.py b/tests/components/airthings_ble/test_config_flow.py index 2adc5498e7b8..42db22a99153 100644 --- a/tests/components/airthings_ble/test_config_flow.py +++ b/tests/components/airthings_ble/test_config_flow.py @@ -136,7 +136,7 @@ async def test_user_setup(hass: HomeAssistant) -> None: schema = result["data_schema"].schema assert schema.get(CONF_ADDRESS).container == { - "cc:cc:cc:cc:cc:cc": "Airthings Wave Plus" + "cc:cc:cc:cc:cc:cc": "Airthings Wave Plus (123456)" } with patch( @@ -186,7 +186,7 @@ async def test_user_setup_replaces_ignored_device(hass: HomeAssistant) -> None: schema = result["data_schema"].schema assert schema.get(CONF_ADDRESS).container == { - "cc:cc:cc:cc:cc:cc": "Airthings Wave Plus" + "cc:cc:cc:cc:cc:cc": "Airthings Wave Plus (123456)" } with patch(