refactor: Refactoring most of the project
Some checks failed
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.13) (push) Failing after 24s
Some checks failed
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.13) (push) Failing after 24s
Signed-off-by: Rafal Zielinski <sq4ind@gmail.com>
This commit is contained in:
1
custom_components/__init__.py
Normal file
1
custom_components/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Custom components for Home Assistant."""
|
@@ -109,7 +109,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
"""Handle a config flow for AdGuard Control Hub."""
|
||||
|
||||
VERSION = 1
|
||||
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL
|
||||
MINOR_VERSION = 1
|
||||
|
||||
async def async_step_user(
|
||||
self, user_input: Optional[Dict[str, Any]] = None
|
||||
|
@@ -182,7 +182,8 @@ class AdGuardControlHubServices:
|
||||
]
|
||||
|
||||
for service in services:
|
||||
self.hass.services.remove(DOMAIN, service)
|
||||
if self.hass.services.has_service(DOMAIN, service):
|
||||
self.hass.services.remove(DOMAIN, service)
|
||||
|
||||
def _get_api_for_entry(self, entry_id: str) -> AdGuardHomeAPI:
|
||||
"""Get API instance for a specific config entry."""
|
||||
|
Reference in New Issue
Block a user