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 documentation for OneDrive #36768

Open
wants to merge 6 commits into
base: next
Choose a base branch
from

Conversation

zweckj
Copy link
Member

@zweckj zweckj commented Jan 6, 2025

Proposed change

SSIA

Type of change

  • Spelling, grammar or other readability improvements (current branch).
  • Adjusted missing or incorrect information in the current documentation (current branch).
  • Added documentation for a new integration I'm adding to Home Assistant (next branch).
  • Added documentation for a new feature I'm adding to Home Assistant (next branch).
  • Removed stale or deprecated documentation.

Additional information

Checklist

  • This PR uses the correct branch, based on one of the following:
    • I made a change to the existing documentation and used the current branch.
    • I made a change that is related to an upcoming version of Home Assistant and used the next branch.
  • The documentation follows the Home Assistant documentation standards.

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Added OneDrive integration for Home Assistant Backups.
    • Supports creating backups in OneDrive's App Folder.
    • Enables account linking through Home Assistant.
  • Documentation

    • Provided detailed setup instructions for the OneDrive integration.
    • Explained configuration process and limitations, including support for personal accounts only.
    • Included guidance for obtaining application credentials and creating a client ID and secret.
    • Outlined permissions requested by the integration.

@home-assistant home-assistant bot added has-parent This PR has a parent PR in a other repo next This PR goes into the next branch labels Jan 6, 2025
Copy link

netlify bot commented Jan 6, 2025

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit e1c8f83
🔍 Latest deploy log https://app.netlify.com/sites/home-assistant-docs/deploys/677ce2cf041dbc00084187e5
😎 Deploy Preview https://deploy-preview-36768--home-assistant-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

coderabbitai bot commented Jan 6, 2025

📝 Walkthrough

Walkthrough

A new markdown documentation file for the OneDrive integration has been added to Home Assistant. The file provides comprehensive details about integrating OneDrive with Home Assistant Backups, including setup instructions, configuration requirements, and usage guidelines. It covers obtaining application credentials, supports account linking, and highlights current limitations such as support only for personal OneDrive accounts.

Changes

File Change Summary
source/_integrations/onedrive.markdown New documentation file created for OneDrive integration, detailing setup process, configuration flow, credential requirements, and usage instructions

Sequence Diagram

sequenceDiagram
    participant User
    participant HomeAssistant
    participant OneDrive
    participant AzurePortal

    User->>AzurePortal: Create client credentials
    AzurePortal-->>User: Provide Client ID and Secret
    User->>HomeAssistant: Configure OneDrive Integration
    HomeAssistant->>OneDrive: Request Authorization
    OneDrive-->>HomeAssistant: Grant Access
    HomeAssistant->>OneDrive: Create Backup in App Folder
Loading

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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. (Beta)
  • @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)
source/_integrations/onedrive.markdown (3)

16-16: Fix grammatical error

The sentence structure needs improvement.

-Backups will be created in the `App Folder` of your OneDrive, the integration does have no access to any other parts of your OneDrive except its own folder.
+Backups will be created in the `App Folder` of your OneDrive. The integration has no access to any other parts of your OneDrive except its own folder.

32-32: Fix typo in limitations

There's a grammatical error in the limitation statement.

-Only personal OneDrives are supported a the moment
+Only personal OneDrives are supported at the moment
🧰 Tools
🪛 LanguageTool

[grammar] ~32-~32: Two determiners in a row. Choose either “a” or “the”.
Context: ...- Only personal OneDrives are supported a the moment ## Removing the integration Th...

(DT_DT)


1-38: Consider enhancing the documentation

To make the documentation more comprehensive, consider adding:

  1. A list of prerequisites (e.g., OneDrive account requirements)
  2. Examples of common use cases
  3. Troubleshooting section for common issues
  4. Information about backup retention policies or storage limits

Would you like me to help draft these additional sections?

🧰 Tools
🪛 LanguageTool

[misspelling] ~27-~27: Did you mean “ever”?
Context: ...one in the user context, so nobody will every have access to your data except you. Ho...

(EVERY_EVER)


[grammar] ~32-~32: Two determiners in a row. Choose either “a” or “the”.
Context: ...- Only personal OneDrives are supported a the moment ## Removing the integration Th...

(DT_DT)

🪛 Markdownlint (0.37.0)

26-26: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


27-27: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


28-28: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)

🪛 GitHub Actions: home-assistant.io Test

[error] 26-26: Incorrect usage of the term: "Home assistant", use "Home Assistant" instead

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1bcb56d and feac41b.

📒 Files selected for processing (1)
  • source/_integrations/onedrive.markdown (1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/onedrive.markdown

[misspelling] ~27-~27: Did you mean “ever”?
Context: ...one in the user context, so nobody will every have access to your data except you. Ho...

(EVERY_EVER)


[grammar] ~32-~32: Two determiners in a row. Choose either “a” or “the”.
Context: ...- Only personal OneDrives are supported a the moment ## Removing the integration Th...

(DT_DT)

🪛 Markdownlint (0.37.0)
source/_integrations/onedrive.markdown

26-26: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


27-27: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


28-28: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)

🪛 GitHub Actions: home-assistant.io Test
source/_integrations/onedrive.markdown

[error] 26-26: Incorrect usage of the term: "Home assistant", use "Home Assistant" instead

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Redirect rules - home-assistant-docs
  • GitHub Check: Header rules - home-assistant-docs
  • GitHub Check: Pages changed - home-assistant-docs
🔇 Additional comments (2)
source/_integrations/onedrive.markdown (2)

34-38: LGTM!

The removal instructions are clear and follow the standard template.


4-4: Verify the release version

The release version is set to 2025.2. Please ensure this aligns with the planned release schedule and the parent PR in the core repository.

✅ Verification successful

Release version 2025.2 is correctly set

The version aligns with other new integrations in the documentation, particularly the Overseerr integration which also targets the 2025.2 release.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check the version in the core PR
gh api repos/home-assistant/core/pulls/134584 | jq -r '.body' | grep -i "version\|release"

Length of output: 308


Script:

#!/bin/bash
# Check manifest.json in the integration directory
fd manifest.json --exec cat {} \; | grep -i "version"

# Also check other recent integration docs for version patterns
fd -e markdown -p 'source/_integrations' --changed-within 3months --exec grep -l "ha_release: 2025" {} \;

Length of output: 534


Script:

#!/bin/bash
# Check the exact version numbers in the found integration docs
for file in ./source/_integrations/{harvey,cookidoo,peblar,slide_local,overseerr,powerfox,ohme,onedrive,eheimdigital}.markdown; do
  echo "=== $file ==="
  grep "ha_release:" "$file"
done

Length of output: 2834

Comment on lines 26 to 28
This integration comes with a predefined set of [application credentials](https://www.home-assistant.io/integrations/application_credentials/) through Home assistant account linking.
Everything is done in the user context, so nobody will every have access to your data except you. However, because you want to your own credentials this is possible,
follow [this guide](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app?tabs=certificate) to create your own client ID and secret
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix multiple text issues

There are several issues in this section that need to be addressed:

  1. Incorrect capitalization of "Home assistant"
  2. Typo: "every" should be "ever"
  3. Incomplete/unclear sentence about custom credentials
-This integration comes with a predefined set of [application credentials](https://www.home-assistant.io/integrations/application_credentials/) through Home assistant account linking. 
-Everything is done in the user context, so nobody will every have access to your data except you. However, because you want to your own credentials this is possible, 
-follow [this guide](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app?tabs=certificate) to create your own client ID and secret 
+This integration comes with a predefined set of [application credentials](https://www.home-assistant.io/integrations/application_credentials/) through Home Assistant account linking. 
+Everything is done in the user context, so nobody will ever have access to your data except you. However, if you want to use your own credentials, 
+follow [this guide](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app?tabs=certificate) to create your own client ID and secret.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
This integration comes with a predefined set of [application credentials](https://www.home-assistant.io/integrations/application_credentials/) through Home assistant account linking.
Everything is done in the user context, so nobody will every have access to your data except you. However, because you want to your own credentials this is possible,
follow [this guide](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app?tabs=certificate) to create your own client ID and secret
This integration comes with a predefined set of [application credentials](https://www.home-assistant.io/integrations/application_credentials/) through Home Assistant account linking.
Everything is done in the user context, so nobody will ever have access to your data except you. However, if you want to use your own credentials,
follow [this guide](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app?tabs=certificate) to create your own client ID and secret.
🧰 Tools
🪛 LanguageTool

[misspelling] ~27-~27: Did you mean “ever”?
Context: ...one in the user context, so nobody will every have access to your data except you. Ho...

(EVERY_EVER)

🪛 Markdownlint (0.37.0)

26-26: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


27-27: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


28-28: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)

🪛 GitHub Actions: home-assistant.io Test

[error] 26-26: Incorrect usage of the term: "Home assistant", use "Home Assistant" instead

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: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between feac41b and 25faeee.

📒 Files selected for processing (1)
  • source/_integrations/onedrive.markdown (1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/onedrive.markdown

[grammar] ~32-~32: Two determiners in a row. Choose either “a” or “the”.
Context: ...- Only personal OneDrives are supported a the moment ## Removing the integration Th...

(DT_DT)

🪛 Markdownlint (0.37.0)
source/_integrations/onedrive.markdown

26-26: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


27-27: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Redirect rules - home-assistant-docs
  • GitHub Check: Header rules - home-assistant-docs
  • GitHub Check: Pages changed - home-assistant-docs
🔇 Additional comments (2)
source/_integrations/onedrive.markdown (2)

4-4: Verify the release version

The release version 2025.2 seems unusually far in the future. Please confirm if this is the intended version or if it should be adjusted to a closer release.


26-28: LGTM! Clear and well-structured credentials section

The application credentials section provides clear instructions and good security context for users.

🧰 Tools
🪛 Markdownlint (0.37.0)

26-26: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


27-27: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


## Known Limitations

- Only personal OneDrives are supported a the moment
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Fix grammatical error

There's a grammatical error in the limitations statement.

-Only personal OneDrives are supported a the moment
+Only personal OneDrives are supported at the moment
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Only personal OneDrives are supported a the moment
- Only personal OneDrives are supported at the moment
🧰 Tools
🪛 LanguageTool

[grammar] ~32-~32: Two determiners in a row. Choose either “a” or “the”.
Context: ...- Only personal OneDrives are supported a the moment ## Removing the integration Th...

(DT_DT)

---

This integration allows you to use [OneDrive](https://www.microsoft.com/en-us/microsoft-365/onedrive/online-cloud-storage) for use with Home Assistant Backups.
Backups will be created in the `App Folder` of your OneDrive, the integration does have no access to any other parts of your OneDrive except its own folder.
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Improve grammar and clarity

The sentence contains a grammatical error and could be clearer.

-Backups will be created in the `App Folder` of your OneDrive, the integration does have no access to any other parts of your OneDrive except its own folder.
+Backups will be created in the `App Folder` of your OneDrive. The integration only has access to this folder and cannot access any other parts of your OneDrive.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Backups will be created in the `App Folder` of your OneDrive, the integration does have no access to any other parts of your OneDrive except its own folder.
Backups will be created in the `App Folder` of your OneDrive. The integration only has access to this folder and cannot access any other parts of your OneDrive.

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 (1)
source/_integrations/onedrive.markdown (1)

51-51: Improve precision in limitations statement

Consider making the limitation statement more precise.

-Only personal OneDrives are supported at the moment
+Only personal OneDrive accounts are currently supported
🧰 Tools
🪛 LanguageTool

[style] ~51-~51: For conciseness, consider replacing this expression with an adverb.
Context: ...- Only personal OneDrives are supported at the moment ## Removing the integration This inte...

(AT_THE_MOMENT)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 25faeee and e1c8f83.

📒 Files selected for processing (1)
  • source/_integrations/onedrive.markdown (1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/onedrive.markdown

[misspelling] ~18-~18: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...ive. The integration only has access to a application specific home-assistant f...

(EN_A_VS_AN)


[uncategorized] ~35-~35: Loose punctuation mark.
Context: ... to work: - Files.ReadWrite.AppFolder: Grants the application permission to re...

(UNLIKELY_OPENING_PUNCTUATION)


[style] ~51-~51: For conciseness, consider replacing this expression with an adverb.
Context: ...- Only personal OneDrives are supported at the moment ## Removing the integration This inte...

(AT_THE_MOMENT)

🪛 Markdownlint (0.37.0)
source/_integrations/onedrive.markdown

41-41: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


42-42: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)

🔇 Additional comments (4)
source/_integrations/onedrive.markdown (4)

20-30: LGTM! Configuration section is well structured

The configuration section follows the standard template and clearly documents the required parameters.


31-38: LGTM! Clear explanation of permissions

The permissions section clearly explains each required permission and its purpose, helping users understand the security implications.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~35-~35: Loose punctuation mark.
Context: ... to work: - Files.ReadWrite.AppFolder: Grants the application permission to re...

(UNLIKELY_OPENING_PUNCTUATION)


39-48: LGTM! Application credentials section is clear and accurate

The section provides clear instructions for both default and custom credentials setup, with appropriate warnings about Azure requirements.

🧰 Tools
🪛 Markdownlint (0.37.0)

41-41: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


42-42: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


4-4: Verify the release version

The release version is set to 2025.2. Please ensure this aligns with the planned release schedule and the parent PR in the core repository.

✅ Verification successful

Release version 2025.2 is valid

The version aligns with other documented 2025.x releases and follows the established versioning pattern.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the version exists in the core repository
gh api repos/home-assistant/core/branches | jq -r '.[].name' | grep -E "release-202[0-9]\.[0-9]"

Length of output: 98


Script:

#!/bin/bash
# Find recent ha_release versions in integration files
rg "ha_release: 202[0-9]\.[0-9]" "source/_integrations/" -l | while read -r file; do
  echo "=== $file ==="
  grep "ha_release:" "$file"
done

Length of output: 68983

This integration allows you to use [OneDrive](https://www.microsoft.com/en-us/microsoft-365/onedrive/online-cloud-storage) for use with Home Assistant Backups.

Backups will be created in a folder called `home-assistant\backups` in the `App Folder` of your OneDrive.
The integration only has access to a application specific `home-assistant` folder in the `App Folder` and cannot access any other parts of your OneDrive.
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Fix grammatical error

Use "an" instead of "a" before "application".

-The integration only has access to a application specific `home-assistant` folder in the `App Folder` and cannot access any other parts of your OneDrive.
+The integration only has access to an application specific `home-assistant` folder in the `App Folder` and cannot access any other parts of your OneDrive.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
The integration only has access to a application specific `home-assistant` folder in the `App Folder` and cannot access any other parts of your OneDrive.
The integration only has access to an application specific `home-assistant` folder in the `App Folder` and cannot access any other parts of your OneDrive.
🧰 Tools
🪛 LanguageTool

[misspelling] ~18-~18: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...ive. The integration only has access to a application specific home-assistant f...

(EN_A_VS_AN)

@c0ffeeca7 c0ffeeca7 added the new-integration This PR adds documentation for a new Home Assistant integration label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-parent This PR has a parent PR in a other repo new-integration This PR adds documentation for a new Home Assistant integration next This PR goes into the next branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants