Skip to content

Storage space usage API #6046

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Conversation

MindFreeze
Copy link

@MindFreeze MindFreeze commented Jul 28, 2025

Proposed change

We need this for better space management. To show charts like this in the frontend
image

Reports only the main disk right now but eventually we'll need the same data for USB mounts and maybe some network mounts.

Type of change

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

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Ruff (ruff format supervisor tests)
  • Tests have been added to verify that the new code works.

If API endpoints or add-on configuration are added/changed:

@mdegat01 mdegat01 added the new-feature A new feature label Jul 28, 2025
Copy link
Contributor

@mdegat01 mdegat01 left a comment

Choose a reason for hiding this comment

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

This is really cool! As its still in draft I'll just add comments for some thoughts looking at it rather then approve or not. But I'd love to see this UI in Home Assistant!

@mdegat01 mdegat01 added missing-documentation Added to pull requests that needs a docs, but none is linked needs-cli Pull requests needs CLI changes but none is linked needs-client-library Pull requests needs client library changes but none is linked labels Jul 28, 2025
@mdegat01
Copy link
Contributor

On the labels I added:

  • Missing documentation - Supervisor's API is documented here. So we'll need to update that for API changes
  • Need client library - We'll need to add support for this to our client library as Home Assistant is trying to use that for all supervisor access going forward
  • Need cli - Less important but presumably it would be nice to access this info from the cli in future

I can probably take care of these if you want, we just have to finalize the API first.

@MindFreeze
Copy link
Author

As we discussed, I updated the URL, tweaked the structure a bit and added "total_space" and "system". We can update the buckets more in the future but if the protocol is OK, I'll update the docs and lib.
IMO we don't need this in the cli as there you can just use du but we can add it if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed missing-documentation Added to pull requests that needs a docs, but none is linked needs-cli Pull requests needs CLI changes but none is linked needs-client-library Pull requests needs client library changes but none is linked new-feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants