From b151a9bf75ebf89547440a5f481916b8621357d4 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Tue, 8 Jul 2025 06:02:56 +0200 Subject: [PATCH] Add missing connection for gardena ble device (#148376) --- homeassistant/components/gardena_bluetooth/__init__.py | 2 ++ tests/components/gardena_bluetooth/snapshots/test_init.ambr | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/homeassistant/components/gardena_bluetooth/__init__.py b/homeassistant/components/gardena_bluetooth/__init__.py index 34f72bf0a5a..4a21bb3d3e4 100644 --- a/homeassistant/components/gardena_bluetooth/__init__.py +++ b/homeassistant/components/gardena_bluetooth/__init__.py @@ -13,6 +13,7 @@ from homeassistant.components import bluetooth from homeassistant.const import CONF_ADDRESS, Platform from homeassistant.core import HomeAssistant from homeassistant.exceptions import ConfigEntryNotReady +from homeassistant.helpers import device_registry as dr from homeassistant.helpers.device_registry import DeviceInfo from homeassistant.util import dt as dt_util @@ -74,6 +75,7 @@ async def async_setup_entry( device = DeviceInfo( identifiers={(DOMAIN, address)}, + connections={(dr.CONNECTION_BLUETOOTH, address)}, name=name, sw_version=sw_version, manufacturer=manufacturer, diff --git a/tests/components/gardena_bluetooth/snapshots/test_init.ambr b/tests/components/gardena_bluetooth/snapshots/test_init.ambr index 8dc9d220e85..d2af92b3f8f 100644 --- a/tests/components/gardena_bluetooth/snapshots/test_init.ambr +++ b/tests/components/gardena_bluetooth/snapshots/test_init.ambr @@ -6,6 +6,10 @@ 'config_entries_subentries': , 'configuration_url': None, 'connections': set({ + tuple( + 'bluetooth', + '00000000-0000-0000-0000-000000000001', + ), }), 'disabled_by': None, 'entry_type': None,