diff --git a/homeassistant/components/synology_dsm/config_flow.py b/homeassistant/components/synology_dsm/config_flow.py index 4b09e5164513dd..8e2e5ed035806e 100644 --- a/homeassistant/components/synology_dsm/config_flow.py +++ b/homeassistant/components/synology_dsm/config_flow.py @@ -208,7 +208,7 @@ async def async_step_2sa(self, user_input, errors=None): def _host_already_configured(self, hostname): """See if we already have a host matching user input configured.""" existing_hosts = { - entry.data[CONF_HOST] for entry in self._async_current_entries() + entry.data.get(CONF_HOST) for entry in self._async_current_entries() } return hostname in existing_hosts