diff --git a/changelog.txt b/changelog.txt index ad4664d0..164eff40 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +Version 0.30.1 (2022-02-04) +- Start hub earlier + Version 0.30.0 (2022-02-03) - Add paramset to entity - Add CHANNEL_OPERATION_MODE for HmIP(W)-DRBL4 diff --git a/hahomematic/central_unit.py b/hahomematic/central_unit.py index 0c29a139..7234a586 100644 --- a/hahomematic/central_unit.py +++ b/hahomematic/central_unit.py @@ -192,13 +192,13 @@ async def start(self, check_only: bool = False) -> None: return None await self._start_clients() self._start_connection_checker() - await self._init_hub() async def _start_clients(self) -> None: """Start clients .""" if await self._create_clients(): await self._load_caches() await self._create_devices() + await self._init_hub() await self._init_clients() async def stop(self) -> None: @@ -286,13 +286,14 @@ def _create_hub(self) -> HmHub | HmDummyHub: async def _init_hub(self) -> None: """Init the hub.""" - self.hub = self._create_hub() - _LOGGER.info( - "init_hub: Starting hub for %s", - self.instance_name, - ) - if isinstance(self.hub, HmHub): - await self.hub.fetch_data() + if not self.hub: + self.hub = self._create_hub() + _LOGGER.info( + "init_hub: Starting hub for %s", + self.instance_name, + ) + if self.hub and isinstance(self.hub, HmHub): + await self.hub.fetch_data() def _start_connection_checker(self) -> None: """Start the connection checker.""" diff --git a/setup.py b/setup.py index b671457c..eeaf94f3 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ def readme(): }, PACKAGE_NAME = "hahomematic" HERE = os.path.abspath(os.path.dirname(__file__)) -VERSION = "0.30.0" +VERSION = "0.30.1" PACKAGES = find_packages(exclude=["tests", "tests.*", "dist", "build"])