Fix webOS TV SSDP discovery missing friendly name (#85917)

This commit is contained in:
Shay Levy 2023-01-15 13:29:11 +02:00 committed by GitHub
parent 64ee0cf627
commit 508b93c17f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -116,7 +116,7 @@ class FlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
host = urlparse(discovery_info.ssdp_location).hostname host = urlparse(discovery_info.ssdp_location).hostname
assert host assert host
self._host = host self._host = host
self._name = discovery_info.upnp[ssdp.ATTR_UPNP_FRIENDLY_NAME] self._name = discovery_info.upnp.get(ssdp.ATTR_UPNP_FRIENDLY_NAME, DEFAULT_NAME)
uuid = discovery_info.upnp[ssdp.ATTR_UPNP_UDN] uuid = discovery_info.upnp[ssdp.ATTR_UPNP_UDN]
assert uuid assert uuid