Prefer IPv4 locations over IPv6 locations for upnp devices/component (#103792)

This commit is contained in:
Steven Looman 2023-11-13 17:09:27 +01:00 committed by GitHub
parent 1e57bc5415
commit 39c81cb4b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 153 additions and 58 deletions

View file

@ -134,6 +134,7 @@ async def test_flow_ssdp_non_igd_device(hass: HomeAssistant) -> None:
ssdp_usn=TEST_USN,
ssdp_st=TEST_ST,
ssdp_location=TEST_LOCATION,
ssdp_all_locations=[TEST_LOCATION],
upnp={
ssdp.ATTR_UPNP_DEVICE_TYPE: "urn:schemas-upnp-org:device:WFADevice:1", # Non-IGD
ssdp.ATTR_UPNP_UDN: TEST_UDN,
@ -324,6 +325,7 @@ async def test_flow_ssdp_discovery_changed_location(hass: HomeAssistant) -> None
new_location = TEST_DISCOVERY.ssdp_location + "2"
new_discovery = deepcopy(TEST_DISCOVERY)
new_discovery.ssdp_location = new_location
new_discovery.ssdp_all_locations = {new_location}
result = await hass.config_entries.flow.async_init(
DOMAIN,
context={"source": config_entries.SOURCE_SSDP},