1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Add unique id to UniFi config entries using the unique id of the site it is controlling (#45737)

* Add unique id to UniFi config entries using the unique id of the site it is controlling

* Fix failing test
This commit is contained in:
Robert Svensson
2021-02-05 19:38:08 +01:00
committed by GitHub
parent 55f9d98523
commit 0d620eb7c3
6 changed files with 61 additions and 37 deletions

View File

@@ -71,7 +71,7 @@ ENTRY_OPTIONS = {}
CONFIGURATION = []
SITE = [{"desc": "Site name", "name": "site_id", "role": "admin"}]
SITE = [{"desc": "Site name", "name": "site_id", "role": "admin", "_id": "1"}]
DESCRIPTION = [{"name": "username", "site_name": "site_id", "site_role": "admin"}]
@@ -166,6 +166,7 @@ async def setup_unifi_integration(
data=deepcopy(config),
options=deepcopy(options),
entry_id=1,
unique_id="1",
)
config_entry.add_to_hass(hass)