diff --git a/custom_components/openmediavault/omv_controller.py b/custom_components/openmediavault/omv_controller.py index 14c95bc..0bb16cb 100644 --- a/custom_components/openmediavault/omv_controller.py +++ b/custom_components/openmediavault/omv_controller.py @@ -151,18 +151,6 @@ async def async_hwinfo_update(self): await self.hass.async_add_executor_job(self.get_plugin) if self.api.connected(): await self.hass.async_add_executor_job(self.get_disk) - if ( - self.api.connected() - and "openmediavault-kvm" in self.data["plugin"] - and self.data["plugin"]["openmediavault-kvm"]["installed"] - ): - await self.hass.async_add_executor_job(self.get_kvm) - if ( - self.api.connected() - and "openmediavault-compose" in self.data["plugin"] - and self.data["plugin"]["openmediavault-compose"]["installed"] - ): - await self.hass.async_add_executor_job(self.get_compose) self.lock.release() @@ -200,6 +188,19 @@ async def async_update(self): if self.api.connected(): await self.hass.async_add_executor_job(self.get_service) + if ( + self.api.connected() + and "openmediavault-kvm" in self.data["plugin"] + and self.data["plugin"]["openmediavault-kvm"]["installed"] + ): + await self.hass.async_add_executor_job(self.get_kvm) + if ( + self.api.connected() + and "openmediavault-compose" in self.data["plugin"] + and self.data["plugin"]["openmediavault-compose"]["installed"] + ): + await self.hass.async_add_executor_job(self.get_compose) + self.lock.release() # ---------------------------