From 215215747e1e28e8742b504b9a15f1d62f56183e Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Mon, 22 Jun 2020 13:06:59 +0200 Subject: [PATCH] Fix use of AdGuard integration without version (#36995) --- homeassistant/components/adguard/__init__.py | 2 +- homeassistant/components/adguard/config_flow.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/adguard/__init__.py b/homeassistant/components/adguard/__init__.py index f968f524f3d..95dbd0c3532 100644 --- a/homeassistant/components/adguard/__init__.py +++ b/homeassistant/components/adguard/__init__.py @@ -71,7 +71,7 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry) -> bool except AdGuardHomeConnectionError as exception: raise ConfigEntryNotReady from exception - if LooseVersion(MIN_ADGUARD_HOME_VERSION) > LooseVersion(version): + if version and LooseVersion(MIN_ADGUARD_HOME_VERSION) > LooseVersion(version): _LOGGER.error( "This integration requires AdGuard Home v0.99.0 or higher to work correctly" ) diff --git a/homeassistant/components/adguard/config_flow.py b/homeassistant/components/adguard/config_flow.py index 15e8192df06..ede01706c5d 100644 --- a/homeassistant/components/adguard/config_flow.py +++ b/homeassistant/components/adguard/config_flow.py @@ -84,7 +84,7 @@ class AdGuardHomeFlowHandler(ConfigFlow): errors["base"] = "connection_error" return await self._show_setup_form(errors) - if LooseVersion(MIN_ADGUARD_HOME_VERSION) > LooseVersion(version): + if version and LooseVersion(MIN_ADGUARD_HOME_VERSION) > LooseVersion(version): return self.async_abort( reason="adguard_home_outdated", description_placeholders={