From c472ead4fd5246a279791bea4f15a476f548688f Mon Sep 17 00:00:00 2001 From: dougiteixeira <31328123+dougiteixeira@users.noreply.github.com> Date: Fri, 30 Jun 2023 15:48:36 -0300 Subject: [PATCH] Fix device source for Threshold (#95623) Fix Device Source --- homeassistant/components/threshold/binary_sensor.py | 1 + tests/components/threshold/test_binary_sensor.py | 1 + 2 files changed, 2 insertions(+) diff --git a/homeassistant/components/threshold/binary_sensor.py b/homeassistant/components/threshold/binary_sensor.py index f7b8c9c097c7b..09f928303bf38 100644 --- a/homeassistant/components/threshold/binary_sensor.py +++ b/homeassistant/components/threshold/binary_sensor.py @@ -96,6 +96,7 @@ async def async_setup_entry( ): device_info = DeviceInfo( identifiers=device.identifiers, + connections=device.connections, ) else: device_info = None diff --git a/tests/components/threshold/test_binary_sensor.py b/tests/components/threshold/test_binary_sensor.py index 2180d0aed7f27..e26781029c5d7 100644 --- a/tests/components/threshold/test_binary_sensor.py +++ b/tests/components/threshold/test_binary_sensor.py @@ -600,6 +600,7 @@ async def test_device_id(hass: HomeAssistant) -> None: source_device_entry = device_registry.async_get_or_create( config_entry_id=source_config_entry.entry_id, identifiers={("sensor", "identifier_test")}, + connections={("mac", "30:31:32:33:34:35")}, ) source_entity = entity_registry.async_get_or_create( "sensor",