Use JSON as format for .HA_RESTORE (#129792)

* Use JSON as format for .HA_RESTORE

* Adjust bakup manager test
This commit is contained in:
Joakim Sørensen
2024-11-04 13:07:11 +01:00
committed by GitHub
parent ae06f734ce
commit 3cadc1796f
4 changed files with 7 additions and 12 deletions

View File

@@ -308,7 +308,7 @@ class BackupManager(BaseBackupManager):
def _write_restore_file() -> None:
"""Write the restore file."""
Path(self.hass.config.path(RESTORE_BACKUP_FILE)).write_text(
f"{backup.path.as_posix()};",
json.dumps({"path": backup.path.as_posix()}),
encoding="utf-8",
)