diff --git a/custom_components/healthchecksio/__init__.py b/custom_components/healthchecksio/__init__.py index c8196b6..a223cab 100644 --- a/custom_components/healthchecksio/__init__.py +++ b/custom_components/healthchecksio/__init__.py @@ -193,5 +193,4 @@ async def check_files(hass: core.HomeAssistant) -> bool: if missing: _LOGGER.critical(f"The following files are missing: {missing}") return False - else: - return True + return True diff --git a/custom_components/healthchecksio/config_flow.py b/custom_components/healthchecksio/config_flow.py index 2d7fcfb..b292114 100644 --- a/custom_components/healthchecksio/config_flow.py +++ b/custom_components/healthchecksio/config_flow.py @@ -94,9 +94,7 @@ def __init__(self): async def async_step_user(self, user_input=None, errors=None): self._errors = {} - if self._async_current_entries(): - return self.async_abort(reason="single_instance_allowed") - if self.hass.data.get(DOMAIN): + if self._async_current_entries() or self.hass.data.get(DOMAIN): return self.async_abort(reason="single_instance_allowed") if user_input is not None: