Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for add-on update type for backups in the UI #24044

Merged
merged 5 commits into from
Feb 4, 2025

Conversation

piitaya
Copy link
Member

@piitaya piitaya commented Feb 3, 2025

Proposed change

Display add-on update backup type for Hassio installs.

Core PR : home-assistant/core#137296

CleanShot 2025-02-03 at 14 15 32

CleanShot 2025-02-03 at 14 26 18

NEEDS: home-assistant/core#137296

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@piitaya piitaya added the Backend Change Required Requires a Backend Core Code Change label Feb 3, 2025
@piitaya piitaya added this to the 2025.2 milestone Feb 3, 2025
@bramkragten bramkragten added wait for backend and removed Backend Change Required Requires a Backend Core Code Change labels Feb 4, 2025
@MartinHjelmare
Copy link
Member

Backend is approved.

src/data/backup.ts Outdated Show resolved Hide resolved
@piitaya piitaya force-pushed the addon_update_backup_type branch from 91831a4 to 80814b1 Compare February 4, 2025 13:47
src/data/backup.ts Outdated Show resolved Hide resolved
@piitaya piitaya requested a review from bramkragten February 4, 2025 14:28
@@ -340,7 +340,7 @@ export const computeBackupType = (
if (backup.with_automatic_settings) {
return "automatic";
}
if (isHassio && backup.extra_metadata?.["supervisor.addon_update"]) {
if (isHassio && backup.extra_metadata?.["supervisor.addon_update"] != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather just check if the key is there honestly, or check it if truthy like before, but it is ok.

Copy link
Member Author

@piitaya piitaya Feb 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah but it would work if "supervisor.addon_update": null for some reason.

@MartinHjelmare
Copy link
Member

Backend PR is merged.

@piitaya piitaya merged commit 11ae3a7 into dev Feb 4, 2025
15 checks passed
@piitaya piitaya deleted the addon_update_backup_type branch February 4, 2025 15:04
bramkragten pushed a commit that referenced this pull request Feb 4, 2025
* Add support for add-on update type for backups in the UI

* Add type to backup detail page

* Use new model

* Fix detail page

* Fix type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants