mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Filter by connections instead of identifiers for Shelly (#58305)
* Fix connections * Switch to helper
This commit is contained in:
parent
30fb619095
commit
da7e26c287
@ -132,7 +132,13 @@ async def async_setup_block_entry(hass: HomeAssistant, entry: ConfigEntry) -> bo
|
||||
device_entry = None
|
||||
if entry.unique_id is not None:
|
||||
device_entry = dev_reg.async_get_device(
|
||||
identifiers={(DOMAIN, entry.unique_id)}, connections=set()
|
||||
identifiers=set(),
|
||||
connections={
|
||||
(
|
||||
device_registry.CONNECTION_NETWORK_MAC,
|
||||
device_registry.format_mac(entry.unique_id),
|
||||
)
|
||||
},
|
||||
)
|
||||
if device_entry and entry.entry_id not in device_entry.config_entries:
|
||||
device_entry = None
|
||||
|
Loading…
x
Reference in New Issue
Block a user