Skip to content

Commit

Permalink
Code Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Snuffy2 committed Oct 9, 2023
1 parent 149e01a commit 2b84d9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions custom_components/healthchecksio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 1 addition & 3 deletions custom_components/healthchecksio/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2b84d9d

Please sign in to comment.