Commit Graph
140 Commits
Author SHA1 Message Date
Marc MuellerandGitHub c17d3584cb Fix backup test ResourceWarnings (#168180) 2026-04-14 15:18:34 +02:00
Erik MontnemeryandGitHub 2f0889ac02 Fix securetar size calculation when encrypting backup (#167602) 2026-04-07 18:40:06 +02:00
2a8551138d Reject backup uploads with invalid filenames (#167211)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 10:34:29 +02:00
Stefan AgnerandGitHub 484d9b0cbe Fix test_receive_backup test error when run in isolation (#167204) 2026-04-02 15:36:24 +02:00
Stefan AgnerandGitHub 3b9a9ca6cb Store received backup in temp backup dir only (#166982) 2026-04-01 09:54:01 +02:00
4d7bd49d2c Make SecureTar v3 the default for backup creation (#166272)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 19:10:58 +01:00
Artur PragaczandGitHub bafef2065f Rework user-given entity name logic (#162763) 2026-03-17 11:09:20 +01:00
Josef ZweckandGitHub f3c38ba2d3 Add "cleaning_up" stage to backup (#165349) 2026-03-12 07:28:17 +01:00
2eb65ab314 Buffer backup upload progress events (#165249)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2026-03-11 17:29:35 +01:00
2ef81a54a5 Allow backups to report the upload progress (#163608)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2026-03-09 17:12:49 +02:00
Erik MontnemeryandGitHub 40e2f79e60 Add support for reading backups using securetar v3 (#163920) 2026-02-24 14:23:00 +01:00
Erik MontnemeryandGitHub 74a3f4bbb9 Bump securetar to 2026.2.0 (#163226) 2026-02-23 14:03:43 +01:00
Erik MontnemeryandGitHub e16a8ed20e Don't mock out filesystem operations in backup tests (#162877) 2026-02-13 21:39:34 +01:00
epenetandGitHub 95a58252cf Reformat lambda (tests) (#162383) 2026-02-06 12:24:58 +01:00
Artur PragaczandGitHub 0130919128 Improve entity id generation (#160302) 2026-01-14 14:34:52 +01:00
TimothyandGitHub e70b147c0c Add missing content type to backup http endpoint (#152433) 2025-09-16 09:45:21 -04:00
704edac9fd Remove deprecated state from backup schedule (#150114)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-08-07 17:42:53 +01:00
Erik MontnemeryandGitHub 741a3d5009 Remove backup helper (#143558)
* Remove backup helper

* Update aws_s3 tests
2025-06-30 14:11:10 +02:00
epenetandGitHub ea6332ee42 Move backup services to separate module (#146427) 2025-06-27 20:54:56 +02:00
Marc MuellerandGitHub 2c13c70e12 Update ruff to 0.12.0 (#147106) 2025-06-19 20:39:09 +02:00
Marc MuellerandGitHub a8ccf1c6fc Update pytest to 8.4.0 (#146114) 2025-06-04 08:09:19 +02:00
Erik MontnemeryandGitHub 4e1d5fbeb0 Add WS command to help reset custom entity_id (#145504)
* Add WS command to help reset custom entity_id

* Calculate suggested object id from entity properties

* Fix logic and add additional tests

* Adjust test

* Update folder_watcher test

* Handle current entity id matches the automatic entity id

* Don't store calculated_object_id

* Update snapshots

* Update snapshots

* Update test

* Tweak logic for reusing current entity_id

* Improve test

* Don't assign same entity_id to several entities

* Prioritize custom entity name

* Update snapshots

* Update snapshots
2025-05-26 19:28:27 +02:00
Erik MontnemeryandGitHub 0260a03447 Store information about add-ons and folders which could not be backed up (#145367)
* Store information about add-ons and folders which could not be backed up

* Address review comments
2025-05-26 16:07:33 +02:00
086e97821f Add automatic backup event entity to Home Assistant Backup system (#145350)
* add automatic backup event entity

* add tests

* fix test

* Apply suggestions from code review

Co-authored-by: Josef Zweck <josef@zweck.dev>

* implement _handle_coordinator_update

* add translations for event attributes

* simplify condition

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Josef Zweck <josef@zweck.dev>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-05-23 17:01:57 +02:00
Erik MontnemeryandGitHub 8e74f63d47 Create repair issue if not all add-ons or folders were backed up (#144999)
* Create repair issue if not all add-ons or folders were backed up

* Fix spelling

* Fix _collect_errors

* Make time patching by freezegun work with mashumaro

* Addd test to hassio

* Add fixture

* Fix generating list of folders

* Add issue creation tests

* Include name of failing add-on in message

* Improve code formatting

* Rename AddonError to AddonErrorData
2025-05-20 15:23:52 +02:00
Simone ChemelliandGitHub 484a547758 Fix pylance warning on SnapshotAssertion import (#145206) 2025-05-19 13:55:48 +02:00
Robert ReschandGitHub 9ff9d9230e Fix test results parsing error (#145077) 2025-05-19 10:40:03 +02:00
Erik MontnemeryandGitHub 19b1dc8d65 Add backup tests showing that unknown files are not ciphered (#144529) 2025-05-09 09:56:07 +02:00
Erik MontnemeryandGitHub 42f53ff917 Don't encrypt or decrypt unknown files in backup archives (#144495) 2025-05-08 22:30:35 +02:00
MichaelandGitHub 58906008b9 Add last attempted automatic backup sensor (#144194)
add last_attempted_automatic_backup sensor
2025-05-05 10:39:06 +02:00
Martin HjelmareandGitHub 5392062edd Add backup agent retention config (#143174) 2025-04-28 09:24:23 +02:00
Erik MontnemeryandGitHub 234c4c1958 Move backup backup onboarding API to an onboarding platform (#142713)
* Move backup backup onboarding API to an onboarding platform

* Move additional test from onboarding to backup

* Remove backup tests from onboarding
2025-04-12 09:41:54 +02:00
Norbert RittelandGitHub 0eeb6b5fd5 Replace "Idle" with common state in backup, fix sentence-case (#141814)
* Replace "Idle" with common state in `backup`, fix sentence-case

* Update test_sensors.ambr
2025-03-30 14:56:36 +02:00
MichaelandGitHub d954d04d12 Add diagnostics for Home Assistant Backup integration (#141407)
add diagnostics platform
2025-03-26 08:34:15 +01:00
Erik MontnemeryandGitHub 36d32eaabc Improve backup exclude filters (#141311)
* Improve backup exclude filters

* Add comment
2025-03-25 09:52:45 +01:00
Erik MontnemeryandGitHub 3132cba51f Improve tests of backup exclusion (#141303) 2025-03-24 18:10:08 +01:00
e96e95c32d Add sensor platform to backup integration (#138663)
* add sensor platform to backup integration

* adjust namings, remove system integration flag

* add first simple test

* apply review comments

* fix test

* add sensor tests

* adjustements to use backup helper

* remove obsolet async_get_manager from init

* unsubscribe from events on entry unload

* add configuration_url

* fix doc string

* fix sensor tests

* mark async_unsubscribe as callback

* set integration_type service

* extend sensor test

* set integration_type on correct integration :)

* fix after online conflict resolution

* add sensor update tests

* simplify the sensor update tests

* avoid io during tests

* Add comment

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-03-24 12:54:16 +01:00
Martin HjelmareandGitHub 75cd32b742 Fix backup tests typing warnings (#141274) 2025-03-24 12:36:57 +01:00
Erik MontnemeryandGitHub 05c61b7ec3 Rename BackupManager last_non_idle_event to last_action_event (#140291)
* Rename BackupManager last_non_idle_event to last_action_event

* Update snapshots
2025-03-19 17:28:40 +01:00
Erik MontnemeryandGitHub 219b441be0 Don't allow creating backups if Home Assistant is not running (#139499)
* Don't allow creating backups if hass is not running

* Revert "Don't allow creating backups if hass is not running"

This reverts commit 1bf545eb25.

* Set backup manager to idle only after Home Assistant has started

* Update according to discussion, add tests

* Add more test
2025-03-10 14:40:08 +01:00
Erik MontnemeryandGitHub 6ba45a32c0 Update typing of BackupAgent.async_get_backup (#139923)
* Update typing of BackupAgent.async_get_backup

* Remove manual reset of frame helper
2025-03-06 17:25:34 +01:00
Erik MontnemeryandGitHub e55757dc82 Simplify error handling in BackupAgent when a backup is not found (#139754)
Simplify error handling in BackupAgent when backup is not found
2025-03-04 15:56:12 +01:00
Erik MontnemeryandGitHub 228a4eb391 Improve error handling in CoreBackupReaderWriter (#139508) 2025-02-28 14:25:35 +01:00
Erik MontnemeryandGitHub ee01aa73b8 Improve error message when failing to create backups (#139262)
* Improve error message when failing to create backups

* Check for expected error message in tests
2025-02-26 13:44:09 +01:00
Martin HjelmareandGitHub 27f7085b61 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
2025-02-25 16:27:56 +01:00
bf190a8a73 Add backup helper (#139199)
* Add backup helper

* Add hassio to stage 1

* Apply same changes to newly merged `webdav` and `azure_storage` to fix inflight conflict

* Address comments, add tests

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2025-02-25 10:19:41 +01:00
351e594fe4 Add flag to backup store to track backup wizard completion (#138368)
* Add flag to backup store to track backup wizard completion

* Add comment

* Update hassio tests

* Update tests

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-24 17:14:47 +01:00
Erik MontnemeryandGitHub 0d8c449ff4 Validate hassio backup settings (#138880)
* Validate hassio backup settings

* Add snapshots

* Don't reset addon and folder settings

* Adapt to changes in BackupConfig.update
2025-02-20 16:06:33 +01:00
Erik MontnemeryandGitHub ad7780291e Correct backup date when reading a backup created by supervisor (#138860) 2025-02-19 22:40:03 +01:00
Erik MontnemeryandGitHub b70c5710a9 Correct invalid automatic backup settings when loading from store (#138716)
* Correct invalid automatic backup settings when loading from store

* Improve docstring

* Improve tests
2025-02-19 16:24:30 +01:00