-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve discovering upnp/igd device by always using the SSDP-discovery for the Unique Device Name #111487
Conversation
If possible, please don't add this to |
If youre insecure about the end result of this change maybe not put it in milestone 2024.3.1? |
I feel confident enough to include it now. At the time when I created this PR there was no 2024.3.b0 milestone, only one for 2024.2. |
"mock_mac_address_from_host", | ||
) | ||
async def test_flow_ssdp_with_mismatched_udn(hass: HomeAssistant) -> None: | ||
"""Test config flow: discovered + configured through ssdp, where the UDN differs in the SSDP-discovery vs device description.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please limit docstring lines to 72 characters per line, in accordance with PEP8.
The first line is a header and should be a single sentence. After that an optional body can follow separated from the header by a blank line.
Proposed change
Instead of using/storing the UDN from the device description, store the UDN from the SSDP discovery. The latter is used to find the device when initializing the component. Normally, the UDN should be the same in both the SSDP communication and the device description, but alas, broken UPnP implementations exist.
This should fix #110216, and hopefully not break any existing installations. If any new issues arise after this change, the plan is to revert this change.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: