Avoid error with ignored harmony config entries (#38367)
parent
9819d70941
commit
0ecaab1a7d
|
@ -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
|
||||
|
|
|
@ -153,6 +153,9 @@ async def test_form_ssdp_aborts_before_checking_remoteid_if_host_known(hass):
|
|||
)
|
||||
config_entry.add_to_hass(hass)
|
||||
|
||||
config_entry_without_host = MockConfigEntry(domain=DOMAIN, data={"name": "other"},)
|
||||
config_entry_without_host.add_to_hass(hass)
|
||||
|
||||
harmonyapi = _get_mock_harmonyapi(connect=True)
|
||||
|
||||
with patch(
|
||||
|
|
Loading…
Reference in New Issue