Avoid error with ignored harmony config entries (#38367)

This commit is contained in:
J. Nick Koston 2020-07-29 09:20:06 -10:00 committed by GitHub
parent 1d987b4846
commit ed104d1927
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -164,6 +164,9 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
def _host_already_configured(self, host):
"""See if we already have a harmony entry matching the host."""
for entry in self._async_current_entries():
if CONF_HOST not in entry.data:
continue
if entry.data[CONF_HOST] == host:
return True
return False