Fix KeyError in dlna_dmr SSDP config flow when checking existing config entries (#118549)

Fix KeyError checking existing dlna_dmr config entries
This commit is contained in:
Michael Chisholm 2024-06-01 00:52:19 +10:00 committed by Paulus Schoutsen
parent 3f6df28ef3
commit e401a0da7f

View File

@ -149,7 +149,7 @@ class DlnaDmrFlowHandler(ConfigFlow, domain=DOMAIN):
# case the device doesn't have a static and unique UDN (breaking the # case the device doesn't have a static and unique UDN (breaking the
# UPnP spec). # UPnP spec).
for entry in self._async_current_entries(include_ignore=True): for entry in self._async_current_entries(include_ignore=True):
if self._location == entry.data[CONF_URL]: if self._location == entry.data.get(CONF_URL):
return self.async_abort(reason="already_configured") return self.async_abort(reason="already_configured")
if self._mac and self._mac == entry.data.get(CONF_MAC): if self._mac and self._mac == entry.data.get(CONF_MAC):
return self.async_abort(reason="already_configured") return self.async_abort(reason="already_configured")