Skip to content

Conversation

@mdegat01
Copy link
Contributor

@mdegat01 mdegat01 commented Jul 23, 2025

Proposed change

Document new APIs for NVMe status added in home-assistant/supervisor#6035

Type of change

  • Document existing features within Home Assistant
  • Document new or changing features for which there is an existing pull request elsewhere
  • Spelling or grammatical corrections, or rewording for improved clarity
  • Changes to the backend of this documentation
  • Remove stale or deprecated documentation

Checklist

  • I have read and followed the documentation guidelines.
  • I have verified that my changes render correctly in the documentation.

Additional information

Summary by CodeRabbit

  • Documentation
    • Updated API documentation to include NVMe device information in the /host/info endpoint.
    • Added documentation for two new endpoints providing detailed NVMe device status and health metrics.
    • Introduced a new "NVMe Device" model section, detailing device identifier and path fields.
    • Refined and clarified placeholder parameter descriptions and names across multiple endpoints.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 23, 2025

📝 Walkthrough

Walkthrough

The documentation for the Supervisor API was updated to include support for NVMe devices. This includes extending the /host/info endpoint to list NVMe devices, introducing two new endpoints for retrieving NVMe device status, and adding a new model definition for NVMe devices in the API models documentation.

Changes

File(s) Change Summary
docs/api/supervisor/endpoints.md Extended /host/info with nvme_devices field; added /host/nvme/<device>/status and /host/nvme/status endpoints with example responses; updated placeholder parameter names and descriptions; reformatted placeholder table.
docs/api/supervisor/models.md Added new "NVMe Device" model section defining id and path fields.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant SupervisorAPI

    Client->>SupervisorAPI: GET /host/info
    SupervisorAPI-->>Client: Returns host info with nvme_devices list

    Client->>SupervisorAPI: GET /host/nvme/<device>/status
    SupervisorAPI-->>Client: Returns detailed NVMe device status

    Client->>SupervisorAPI: GET /host/nvme/status
    SupervisorAPI-->>Client: Returns NVMe datadisk status (if applicable)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between fa49da0 and 199d34e.

📒 Files selected for processing (2)
  • docs/api/supervisor/endpoints.md (9 hunks)
  • docs/api/supervisor/models.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/api/supervisor/models.md
  • docs/api/supervisor/endpoints.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Redirect rules - developers-home-assistant
  • GitHub Check: Header rules - developers-home-assistant
  • GitHub Check: Pages changed - developers-home-assistant
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-nvme-status-apis

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
docs/api/supervisor/models.md (1)

361-364: Tighten wording for clarity and consistency

“Unique UUID” is redundant (the “U” already stands for unique). Consider re-phrasing and adding the definite article for readability.

-| id   | string  | Unique UUID for the device                       |
+| id   | string  | UUID (unique identifier) for the device           |
-| path | string  | Device path on host system (e.g. `/dev/nvme0n1`) |
+| path | string  | Device path on the host system (e.g. `/dev/nvme0n1`) |
docs/api/supervisor/endpoints.md (2)

1924-1942: Typos & unit wording in returned-data table

Several minor wording issues slipped in:

- temperature_kelvin              | int  | Current temperature in Kelvins calculated from sensors
+ temperature_kelvin              | int  | Current temperature in Kelvin calculated from sensors
- warning_temp_minutes            | int  | Minutes temperature has been greater then warning threshold over device lifetime
- critical_composite_temp_minutes | int  | Minutes temperature has been greater then critical composite threshold over device lifetime
+ warning_temp_minutes            | int  | Minutes temperature has been greater than the warning threshold over device lifetime
+ critical_composite_temp_minutes | int  | Minutes temperature has been greater than the critical composite threshold over device lifetime

Diff applies only to this table.


1924-1942: Consider including an example response

Most complex endpoints in this file provide an example JSON response. Adding one here would help integrators validate their parsing logic quickly.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between f319462 and 4bf1816.

📒 Files selected for processing (2)
  • docs/api/supervisor/endpoints.md (3 hunks)
  • docs/api/supervisor/models.md (1 hunks)
🔇 Additional comments (1)
docs/api/supervisor/endpoints.md (1)

1696-1697: Broken (or future) anchor – verify that #nvme-device exists

[NVMe devices](api/supervisor/models.md#nvme-device) assumes an anchor named nvme-device in models.md.
If that anchor is missing (or is spelled differently), every rendered link on this page will 404.
Please double-check and align the anchor (or update the link).

@mdegat01 mdegat01 force-pushed the add-nvme-status-apis branch from 5aad8bf to fa49da0 Compare July 24, 2025 16:12
Comment on lines -3481 to +3543
| placeholder | description |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| addon | The slug for the addon, to get the slug you can call `/addons`, to call endpoints for the add-on calling the endpoints you can use `self`as the slug. |
| placeholder | description |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| addon | The slug for the addon, to get the slug you can call `/addons`, to call endpoints for the add-on calling the endpoints you can use `self` as the slug. |
| application | The name of an application, call `/audio/info` to get the correct name |
| interface | A valid interface name, example `eth0`, to get the interface name you can call `/network/info`. You can use `default` to get the primary interface |
| registry | A registry hostname defined in the container registry configuration, to get the hostname you can call `/docker/registries` |
| service | The service name for a service on the host. |
| backup | A valid backup slug, example `skuwe823`, to get the slug you can call `/backups` |
| suggestion | A valid suggestion, example `clear_full_backup`, to get the suggestion you can call `/resolution` |
| uuid | The UUID of a discovery service, to get the UUID you can call `/discovery` |
| backup | A valid backup slug, example `skuwe823`, to get the slug you can call `/backups` |
| bootid | An identifier for a specific boot of host system or an integer offset from the current boot. See `/host/logs/boots/<bootid>` for more details |
| check | The slug for a check in Supervisor's resolution manager, call `/resolution/info` to see the list of options in the `checks` field |
| device | A UUID or device path for an NVMe device available on the host, call `/host/info` to get a list of options in the `nvme_devices` field |
| identifier | A syslog identifier from systemd journal, call `/host/logs/identifiers` to get a complete list of options |
| interface | A valid interface name, example `eth0`, to get the interface name you can call `/network/info`. You can use `default` to get the primary interface |
| mount | Name of a mount that exists in Supervisor, call `/mounts` to get a list of options |
| registry | A registry hostname defined in the container registry configuration, to get the hostname you can call `/docker/registries` |
| respository | The slug for a respository in Supervisor's add-on store, call `/store/repositories` to get a list of options |
| service | The service name for a service on the host, call `/host/services` to get a list of options |
| suggestion | A valid suggestion, example `clear_full_backup`, to get the suggestion you can call `/resolution` |
| uuid | The UUID of a discovery service, to get the UUID you can call `/discovery` |
| vlan | The id for a vlan network device in network manager on the host. Should be an integer |
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I legitimately had no idea this section existed so I hadn't been updating it, CodeRabbit alerted me to it 😆

I added the new placeholder but also combed through to find any others that should've been added by recent PRs and weren't. I can split this to a new PR if we want but it didn't seem to bloat it too much so figured it was fine.

@mdegat01
Copy link
Contributor Author

Changing approach in parent PR, no API changes required. Closing this

@mdegat01 mdegat01 closed this Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaits-parent enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants