1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Create repair for configured unavailable backup agents (#137382)

* Create repair for configured not loaded agents

* Rework to repair issue

* Extract logic to config function

* Update test

* Handle empty agend ids config update

* Address review comment

* Update tests

* Address comment
This commit is contained in:
Martin Hjelmare
2025-02-25 16:27:56 +01:00
committed by GitHub
parent f607b95c00
commit 27f7085b61
5 changed files with 262 additions and 3 deletions

View File

@@ -32,6 +32,7 @@ from homeassistant.helpers import (
instance_id,
integration_platform,
issue_registry as ir,
start,
)
from homeassistant.helpers.backup import DATA_BACKUP
from homeassistant.helpers.json import json_bytes
@@ -47,6 +48,7 @@ from .agent import (
from .config import (
BackupConfig,
CreateBackupParametersDict,
check_unavailable_agents,
delete_backups_exceeding_configured_count,
)
from .const import (
@@ -417,6 +419,13 @@ class BackupManager:
}
)
@callback
def check_unavailable_agents_after_start(hass: HomeAssistant) -> None:
"""Check unavailable agents after start."""
check_unavailable_agents(hass, self)
start.async_at_started(self.hass, check_unavailable_agents_after_start)
async def _add_platform(
self,
hass: HomeAssistant,