mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 17:27:52 +00:00
Adjust the default backup name (#133668)
This commit is contained in:
parent
954b6133cb
commit
82f54eb9d2
@ -726,7 +726,10 @@ class BackupManager:
|
||||
"Cannot include all addons and specify specific addons"
|
||||
)
|
||||
|
||||
backup_name = name or f"Core {HAVERSION}"
|
||||
backup_name = (
|
||||
name
|
||||
or f"{"Automatic" if with_automatic_settings else "Custom"} {HAVERSION}"
|
||||
)
|
||||
new_backup, self._backup_task = await self._reader_writer.async_create_backup(
|
||||
agent_ids=agent_ids,
|
||||
backup_name=backup_name,
|
||||
|
@ -2574,7 +2574,7 @@
|
||||
dict({
|
||||
'id': 2,
|
||||
'result': dict({
|
||||
'backup_job_id': '27f5c632',
|
||||
'backup_job_id': 'fceef4e6',
|
||||
}),
|
||||
'success': True,
|
||||
'type': 'result',
|
||||
@ -2645,7 +2645,7 @@
|
||||
dict({
|
||||
'id': 2,
|
||||
'result': dict({
|
||||
'backup_job_id': '27f5c632',
|
||||
'backup_job_id': 'fceef4e6',
|
||||
}),
|
||||
'success': True,
|
||||
'type': 'result',
|
||||
@ -2716,7 +2716,7 @@
|
||||
dict({
|
||||
'id': 2,
|
||||
'result': dict({
|
||||
'backup_job_id': '27f5c632',
|
||||
'backup_job_id': 'fceef4e6',
|
||||
}),
|
||||
'success': True,
|
||||
'type': 'result',
|
||||
|
@ -121,7 +121,7 @@ async def test_async_create_backup(
|
||||
assert create_backup.called
|
||||
assert create_backup.call_args == call(
|
||||
agent_ids=["backup.local"],
|
||||
backup_name="Core 2025.1.0",
|
||||
backup_name="Custom 2025.1.0",
|
||||
extra_metadata={
|
||||
"instance_id": hass.data["core.uuid"],
|
||||
"with_automatic_settings": False,
|
||||
@ -254,7 +254,7 @@ async def test_async_initiate_backup(
|
||||
ws_client = await hass_ws_client(hass)
|
||||
|
||||
include_database = params.get("include_database", True)
|
||||
name = params.get("name", "Core 2025.1.0")
|
||||
name = params.get("name", "Custom 2025.1.0")
|
||||
password = params.get("password")
|
||||
path_glob.return_value = []
|
||||
|
||||
@ -502,7 +502,7 @@ async def test_async_initiate_backup_with_agent_error(
|
||||
"folders": [],
|
||||
"homeassistant_included": True,
|
||||
"homeassistant_version": "2025.1.0",
|
||||
"name": "Core 2025.1.0",
|
||||
"name": "Custom 2025.1.0",
|
||||
"protected": False,
|
||||
"size": 123,
|
||||
"with_automatic_settings": False,
|
||||
|
Loading…
x
Reference in New Issue
Block a user