From 11146ff40b410523907d6988bf639d1d36068dd9 Mon Sep 17 00:00:00 2001 From: dougiteixeira <31328123+dougiteixeira@users.noreply.github.com> Date: Fri, 30 Jun 2023 15:29:44 -0300 Subject: [PATCH] Fix device source for Derivative (#95621) Fix Device Source --- homeassistant/components/derivative/sensor.py | 1 + tests/components/derivative/test_sensor.py | 1 + 2 files changed, 2 insertions(+) diff --git a/homeassistant/components/derivative/sensor.py b/homeassistant/components/derivative/sensor.py index 793e8edc769..af04da27406 100644 --- a/homeassistant/components/derivative/sensor.py +++ b/homeassistant/components/derivative/sensor.py @@ -108,6 +108,7 @@ async def async_setup_entry( ): device_info = DeviceInfo( identifiers=device.identifiers, + connections=device.connections, ) else: device_info = None diff --git a/tests/components/derivative/test_sensor.py b/tests/components/derivative/test_sensor.py index 513e9597572..2d1d7a93afc 100644 --- a/tests/components/derivative/test_sensor.py +++ b/tests/components/derivative/test_sensor.py @@ -357,6 +357,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",