Ensure dlna_dmr config flow title_placeholders items are [str, str] (#127189)

pull/125051/head
Erik Montnemery 2024-10-01 12:49:31 +02:00 committed by GitHub
parent a3513b24ec
commit 448dd61684
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -7,7 +7,7 @@ from functools import partial
from ipaddress import IPv6Address, ip_address
import logging
from pprint import pformat
from typing import Any, cast
from typing import TYPE_CHECKING, Any, cast
from urllib.parse import urlparse
from async_upnp_client.client import UpnpError
@ -138,6 +138,9 @@ class DlnaDmrFlowHandler(ConfigFlow, domain=DOMAIN):
LOGGER.debug("async_step_ssdp: discovery_info %s", pformat(discovery_info))
await self._async_set_info_from_discovery(discovery_info)
if TYPE_CHECKING:
# _async_set_info_from_discovery unconditionally sets self._name
assert self._name is not None
if _is_ignored_device(discovery_info):
return self.async_abort(reason="alternative_integration")