Remove mDNS iteration from Plugwise unique ID (#78680)
* Remove mDNS iteration from Plugwise unique ID * Add iteration to testspull/78703/head
parent
ebeebeaec1
commit
cce4496ad6
|
@ -91,7 +91,7 @@ class PlugwiseConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||
self.discovery_info = discovery_info
|
||||
_properties = discovery_info.properties
|
||||
|
||||
unique_id = discovery_info.hostname.split(".")[0]
|
||||
unique_id = discovery_info.hostname.split(".")[0].split("-")[0]
|
||||
if config_entry := await self.async_set_unique_id(unique_id):
|
||||
try:
|
||||
await validate_gw_input(
|
||||
|
|
|
@ -36,7 +36,8 @@ TEST_USERNAME2 = "stretch"
|
|||
TEST_DISCOVERY = ZeroconfServiceInfo(
|
||||
host=TEST_HOST,
|
||||
addresses=[TEST_HOST],
|
||||
hostname=f"{TEST_HOSTNAME}.local.",
|
||||
# The added `-2` is to simulate mDNS collision
|
||||
hostname=f"{TEST_HOSTNAME}-2.local.",
|
||||
name="mock_name",
|
||||
port=DEFAULT_PORT,
|
||||
properties={
|
||||
|
|
Loading…
Reference in New Issue