From dd561da81901783de5ef9d31b9ce6983ffa127fb Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 24 Feb 2021 21:52:18 +0100 Subject: [PATCH] Fix landingpage on check_api_state (#2615) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Joakim Sørensen --- supervisor/homeassistant/api.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/supervisor/homeassistant/api.py b/supervisor/homeassistant/api.py index aa9d35af9..b6afe626a 100644 --- a/supervisor/homeassistant/api.py +++ b/supervisor/homeassistant/api.py @@ -11,6 +11,7 @@ from aiohttp import hdrs from ..coresys import CoreSys, CoreSysAttributes from ..exceptions import HomeAssistantAPIError, HomeAssistantAuthError from ..utils import check_port +from .core import LANDINGPAGE _LOGGER: logging.Logger = logging.getLogger(__name__) @@ -101,6 +102,13 @@ class HomeAssistantAPI(CoreSysAttributes): async def check_api_state(self) -> bool: """Return True if Home Assistant up and running.""" + # Skip check on landingpage + if ( + self.sys_homeassistant.version is None + or self.sys_homeassistant.version == LANDINGPAGE + ): + return False + # Check if port is up if not await self.sys_run_in_executor( check_port,