mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Ensure Reolink host device is setup first (#145843)
This commit is contained in:
parent
2d6802e06a
commit
618ada64f8
@ -233,6 +233,14 @@ async def async_setup_entry(
|
|||||||
"privacy_mode_change", async_privacy_mode_change, 623
|
"privacy_mode_change", async_privacy_mode_change, 623
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# ensure host device is setup before connected camera devices that use via_device
|
||||||
|
device_registry = dr.async_get(hass)
|
||||||
|
device_registry.async_get_or_create(
|
||||||
|
config_entry_id=config_entry.entry_id,
|
||||||
|
identifiers={(DOMAIN, host.unique_id)},
|
||||||
|
connections={(dr.CONNECTION_NETWORK_MAC, host.api.mac_address)},
|
||||||
|
)
|
||||||
|
|
||||||
await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)
|
await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)
|
||||||
|
|
||||||
config_entry.async_on_unload(
|
config_entry.async_on_unload(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user