Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,13 @@ async def _async_fetch_data(self) -> None:

docker_create_available = await self._check_docker_create_available(options)

auto_update_due = (
update_available
and options.get(CONF_AUTO_UPDATE, False)
and not self._in_auto_update
)
auto_updating = auto_update_due and docker_create_available

_LOGGER.debug(
"Container %s state: %s, update_available: %s",
service,
Expand All @@ -384,12 +391,13 @@ async def _async_fetch_data(self) -> None:
"host": host,
"docker_create_available": docker_create_available,
},
"update_available": update_available,
# Hide the update from the update entity while it is installed in the background.
"update_available": update_available and not auto_updating,
"installed_image_id": old_image_id.strip(),
"latest_image_id": new_image_id,
}

if update_available and options.get(CONF_AUTO_UPDATE, False) and not self._in_auto_update:
if auto_update_due:
self._in_auto_update = True
try:
self.set_pending_state("recreating")
Expand Down
Loading