Skip to content

Commit 2b84d9d

Browse files
committed
Code Cleanup
1 parent 149e01a commit 2b84d9d

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

custom_components/healthchecksio/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,5 +193,4 @@ async def check_files(hass: core.HomeAssistant) -> bool:
193193
if missing:
194194
_LOGGER.critical(f"The following files are missing: {missing}")
195195
return False
196-
else:
197-
return True
196+
return True

custom_components/healthchecksio/config_flow.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ def __init__(self):
9494

9595
async def async_step_user(self, user_input=None, errors=None):
9696
self._errors = {}
97-
if self._async_current_entries():
98-
return self.async_abort(reason="single_instance_allowed")
99-
if self.hass.data.get(DOMAIN):
97+
if self._async_current_entries() or self.hass.data.get(DOMAIN):
10098
return self.async_abort(reason="single_instance_allowed")
10199

102100
if user_input is not None:

0 commit comments

Comments
 (0)