Skip to content

Commit

Permalink
fixed update location for kvm and compose plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaae committed Apr 20, 2023
1 parent 478382e commit a32ae26
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions custom_components/openmediavault/omv_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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()

# ---------------------------
Expand Down

0 comments on commit a32ae26

Please sign in to comment.