Fix fritzbox integration errors (#34639)

pull/34706/head
escoand 2020-04-26 00:40:26 +02:00 committed by GitHub
parent b44464e0fa
commit 147dfa06af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ class FritzboxConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
if user_input is not None:
for entry in self.hass.config_entries.async_entries(DOMAIN):
if entry.data[CONF_HOST] == user_input[CONF_HOST]:
if entry.data.get(CONF_HOST) == user_input[CONF_HOST]:
if entry.data != user_input:
self.hass.config_entries.async_update_entry(
entry, data=user_input
@ -117,7 +117,7 @@ class FritzboxConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
return self.async_abort(reason="already_in_progress")
for entry in self.hass.config_entries.async_entries(DOMAIN):
if entry.data[CONF_HOST] == host:
if entry.data.get(CONF_HOST) == host:
if entry.data != user_input:
self.hass.config_entries.async_update_entry(entry, data=user_input)
return self.async_abort(reason="already_configured")