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

Merged
merged 21 commits into from
Jan 29, 2025
Merged

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 comprehensive 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 6bb6acb
🔍 Latest deploy log https://app.netlify.com/sites/home-assistant-docs/deploys/6799ff44d341510008a60e43
😎 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)

source/_integrations/onedrive.markdown Outdated Show resolved Hide resolved
source/_integrations/onedrive.markdown Outdated Show resolved Hide resolved
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

source/_integrations/onedrive.markdown Outdated Show resolved Hide resolved
@c0ffeeca7 c0ffeeca7 added the new-integration This PR adds documentation for a new Home Assistant integration label Jan 7, 2025
@home-assistant home-assistant bot closed this Jan 8, 2025
@zweckj zweckj reopened this Jan 8, 2025
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@c0ffeeca7 c0ffeeca7 marked this pull request as draft January 9, 2025 13:39
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: 0

🧹 Nitpick comments (1)
source/_integrations/onedrive.markdown (1)

44-46: Remove trailing spaces

Please remove the trailing spaces at the end of these lines for consistency with markdown formatting standards.

🧰 Tools
🪛 Markdownlint (0.37.0)

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

(MD009, no-trailing-spaces)


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

(MD009, no-trailing-spaces)

📜 Review details

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

📥 Commits

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

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

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

(UNLIKELY_OPENING_PUNCTUATION)


[style] ~54-~54: 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

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

(MD009, no-trailing-spaces)


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

4-4: Verify the release version

The release version is set to 2025.2. Please confirm if this is the intended version or if it should be adjusted to match the actual planned release schedule.


18-21: Well-structured introduction and clear folder access explanation!

The introduction effectively communicates the integration's purpose, and the folder structure explanation clearly defines the scope of access.


23-32: Configuration section follows documentation standards!

The configuration section properly uses templates and clearly documents the available options.


34-41: Clear and comprehensive permissions documentation!

The permissions section effectively explains each required permission and its purpose.

🧰 Tools
🪛 LanguageTool

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

(UNLIKELY_OPENING_PUNCTUATION)


52-60: Clear limitations and removal instructions!

The section effectively communicates the current limitations and provides appropriate removal instructions.

🧰 Tools
🪛 LanguageTool

[style] ~54-~54: 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)

@zweckj zweckj marked this pull request as ready for review January 10, 2025 08:08
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: 0

🧹 Nitpick comments (5)
source/_integrations/onedrive.markdown (5)

26-30: Enhance configuration descriptions

Consider adding more context about the default values and when users might want to use custom credentials.

 Client ID:
-  description: "Application Id of the app registration to be used with the integration. Uses Home Assistant provided by default."
+  description: "Application Id of the app registration. Leave empty to use Home Assistant's official credentials (recommended for most users)."
 Client secret:
-  description: "Application secret for the app registration. Uses Home Assistant provided by default."
+  description: "Application secret for the app registration. Leave empty to use Home Assistant's official credentials (recommended for most users)."

37-41: Improve formatting consistency

The permissions section would benefit from consistent punctuation.

-The integration will request the following permissions on your OneDrive for the integration to work:
+The integration requires the following permissions:

-  - `Files.ReadWrite.AppFolder`: Grants the application permission to read and write in its own, app-specific folder inside your OneDrive
-  - `offline_access`: Grants the application permission to refresh its authentication token without requiring your manual intervention
+- `Files.ReadWrite.AppFolder`: Grants the application permission to read and write in its own, app-specific folder inside your OneDrive.
+- `offline_access`: Grants the application permission to refresh its authentication token without requiring your manual intervention.
🧰 Tools
🪛 LanguageTool

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

(UNLIKELY_OPENING_PUNCTUATION)


46-46: Fix grammar in credentials explanation

Minor grammatical improvements would enhance readability.

-Nobody will ever have access to your data except you, as the app does not have permission to do anything on its own. It only works with a signed in user (it only has `delegated` not `application permissions`).
+Nobody will ever have access to your data except you, as the app does not have permission to do anything on its own. It only works with a signed-in user (it only has `delegated` permissions, not `application permissions`).
🧰 Tools
🪛 LanguageTool

[grammar] ~46-~46: When ‘signed-in’ is used as a modifier, it is usually spelled with a hyphen.
Context: ...ything on its own. It only works with a signed in user (it only has delegated not `appl...

(LOGGED_IN_HYPHEN)

🪛 Markdownlint (0.37.0)

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

(MD009, no-trailing-spaces)


55-55: Enhance limitations description

Consider being more specific about future plans or providing a link to track progress.

-Only personal OneDrives are supported at the moment
+Only personal OneDrive accounts are currently supported. Business and educational accounts support is planned for a future release.
🧰 Tools
🪛 LanguageTool

[style] ~55-~55: 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)


61-61: Consider adding a troubleshooting section

It would be helpful to add a troubleshooting section that covers common issues users might encounter, such as:

  • Authentication failures
  • Backup creation failures
  • Permission-related issues

Would you like me to help draft a troubleshooting section?

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e261b1c and 3813b48.

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

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

(UNLIKELY_OPENING_PUNCTUATION)


[grammar] ~46-~46: When ‘signed-in’ is used as a modifier, it is usually spelled with a hyphen.
Context: ...ything on its own. It only works with a signed in user (it only has delegated not `appl...

(LOGGED_IN_HYPHEN)


[style] ~55-~55: 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

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

(MD009, no-trailing-spaces)


46-46: 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 is set to 2025.2. Please confirm if this is the intended version for the integration's release.


18-22: Well-structured introduction with clear security boundaries!

The introduction effectively communicates the integration's purpose, backup location, and access limitations. The multi-instance support through unique IDs is well explained.

c0ffeeca7
c0ffeeca7 previously approved these changes Jan 10, 2025
Copy link
Contributor

@c0ffeeca7 c0ffeeca7 left a comment

Choose a reason for hiding this comment

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

Thank you, @zweckj 👍

@c0ffeeca7 c0ffeeca7 added the awaits-parent Awaits the merge of an parent PR label Jan 10, 2025
c0ffeeca7
c0ffeeca7 previously approved these changes Jan 21, 2025
Copy link
Contributor

@c0ffeeca7 c0ffeeca7 left a comment

Choose a reason for hiding this comment

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

Thank you, @zweckj 👍

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)

48-51: Fix formatting: Remove extra blank lines

There are multiple consecutive blank lines around the image. One blank line is sufficient.

-

<img src='/images/integrations/onedrive/onedrive-permissions.png' alt='Lists of permissions that the application will request.'>


+
<img src='/images/integrations/onedrive/onedrive-permissions.png' alt='Lists of permissions that the application will request.'>
+
🧰 Tools
🪛 Markdownlint (0.37.0)

48-48: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)


51-51: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0773276 and 2a12594.

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

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

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~45-~45: Loose punctuation mark.
Context: ...to get your OneDrive. - offline_access: Grants the application permission to re...

(UNLIKELY_OPENING_PUNCTUATION)

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

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

(MD009, no-trailing-spaces)


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

(MD009, no-trailing-spaces)


48-48: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)


51-51: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

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

4-4: Verify the release version

The release version is set to 2025.2. Please verify if this is the correct target version for this integration.

Comment on lines 20 to 22
Backups will be created in a folder called `home-assistant\backups_<id>` in the `App Folder` of your OneDrive.
`id` is part of your Home Assistant instance's unique id to allow backups from multiple instances to the same OneDrive.
The integration only has write access to an application specific `home-assistant` folder in the `App Folder` and cannot write to 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

Clarify the App Folder location and access permissions

There are two issues to address:

  1. The location of the App Folder in OneDrive's folder structure should be clarified for users.
  2. Line 22 states "write access only" while line 44 mentions read permissions are also requested.
-Backups will be created in a folder called `home-assistant\backups_<id>` in the `App Folder` of your OneDrive.
-`id` is part of your Home Assistant instance's unique id to allow backups from multiple instances to the same OneDrive.
-The integration only has write access to an application specific `home-assistant` folder in the `App Folder` and cannot write to any other parts of your OneDrive.
+Backups will be created in a folder called `home-assistant\backups_<id>` within the special `App Folder` directory of your OneDrive.
+The `id` is part of your Home Assistant instance's unique identifier, allowing you to store backups from multiple instances in the same OneDrive account.
+The integration has read and write access only to its application-specific `home-assistant` folder within 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
Backups will be created in a folder called `home-assistant\backups_<id>` in the `App Folder` of your OneDrive.
`id` is part of your Home Assistant instance's unique id to allow backups from multiple instances to the same OneDrive.
The integration only has write access to an application specific `home-assistant` folder in the `App Folder` and cannot write to any other parts of your OneDrive.
Backups will be created in a folder called `home-assistant\backups_<id>` within the special `App Folder` directory of your OneDrive.
The `id` is part of your Home Assistant instance's unique identifier, allowing you to store backups from multiple instances in the same OneDrive account.
The integration has read and write access only to its application-specific `home-assistant` folder within the `App Folder` and cannot access any other parts of your OneDrive.

@zweckj
Copy link
Member Author

zweckj commented Jan 21, 2025

sorry @c0ffeeca7 for dismissing your review twice now, was still fighting with the API 😅

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

3-3: Enhance the description

The description could be more specific about OneDrive's role.

-description: Instructions on how to setup OneDrive to be used with backups.
+description: Instructions on how to use OneDrive as a cloud storage provider for Home Assistant backups.

47-50: Fix consecutive blank lines

Remove extra blank lines between the permissions list and the image.

- `openid`: Grants the application permission to read basic information, e.g. if you have a OneDrive


<img src='/images/integrations/onedrive/onedrive-permissions.png' alt='Lists of permissions that the application will request.'>


+ `openid`: Grants the application permission to read basic information, e.g. if you have a OneDrive

<img src='/images/integrations/onedrive/onedrive-permissions.png' alt='Lists of permissions that the application will request.'>
🧰 Tools
🪛 Markdownlint (0.37.0)

47-47: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)


50-50: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2a12594 and 13f787c.

⛔ Files ignored due to path filters (1)
  • source/images/integrations/onedrive/onedrive-permissions.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • source/_integrations/onedrive.markdown (1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/onedrive.markdown

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

(UNLIKELY_OPENING_PUNCTUATION)

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

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

(MD009, no-trailing-spaces)


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

(MD009, no-trailing-spaces)


47-47: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)


50-50: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

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

4-4: Verify the release version

The release version 2025.2 seems unusually far in the future. Please verify if this is the intended version number.


Backups will be created in a folder called `home-assistant.io\backups_<id>` in the `App Folder` of your OneDrive.
`id` is part of your Home Assistant instance's unique id to allow backups from multiple instances to the same OneDrive.
The integration only has access to an application specific `home-assistant.io` folder in the `App Folder` and cannot access to 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

There's a redundant "to" in the sentence.

-The integration only has access to an application specific `home-assistant.io` folder in the `App Folder` and cannot access to any other parts of your OneDrive.
+The integration only has access to an application specific `home-assistant.io` 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 an application specific `home-assistant.io` folder in the `App Folder` and cannot access to any other parts of your OneDrive.
The integration only has access to an application specific `home-assistant.io` folder in the `App Folder` and cannot access any other parts of your OneDrive.

source/_integrations/onedrive.markdown Outdated Show resolved Hide resolved
source/_integrations/onedrive.markdown Outdated Show resolved Hide resolved
source/_integrations/onedrive.markdown Outdated Show resolved Hide resolved
source/_integrations/onedrive.markdown Show resolved Hide resolved
@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@home-assistant home-assistant bot marked this pull request as draft January 27, 2025 12:42
@home-assistant home-assistant bot added the parent-merged The parent PR has been merged already label Jan 28, 2025
@c0ffeeca7
Copy link
Contributor

@zweckj, are you still working on this? asking because it is in draft.

@c0ffeeca7
Copy link
Contributor

@abmantis, are you good with the changes?

@zweckj zweckj marked this pull request as ready for review January 29, 2025 10:15
@home-assistant home-assistant bot requested a review from abmantis January 29, 2025 10:15
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: 0

🧹 Nitpick comments (3)
source/_integrations/onedrive.markdown (3)

29-35: Add security note for custom credentials

Consider adding a note about the security implications of using custom credentials.

{% configuration_basic %}
Client ID:
  description: "Application ID of the app registration to be used with the integration. Uses Home Assistant provided by default."
Client secret:
  description: "Application secret for the app registration. Uses Home Assistant provided by default."

+{% note %}
+If you choose to use custom credentials, ensure they are stored securely and the app registration follows security best practices.
+{% endnote %}
{% endconfiguration_basic %}

44-48: Fix formatting: Remove extra blank lines

Remove the extra blank lines to follow markdown formatting guidelines.

- `openid`: Grants the application permission to read basic information, e.g. if you have a OneDrive


<img src='/images/integrations/onedrive/onedrive-permissions.png' alt='Lists of permissions that the application will request.'>


+- `openid`: Grants the application permission to read basic information, e.g. if you have a OneDrive

+<img src='/images/integrations/onedrive/onedrive-permissions.png' alt='Lists of permissions that the application will request.'>
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

45-45: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)


48-48: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)


61-61: Add context about OneDrive support

Consider adding more context about future plans for supporting other OneDrive types (e.g., business accounts).

-Only personal OneDrives are supported at the moment.
+Only personal OneDrives are supported at the moment. Support for business accounts and SharePoint is planned for future releases.
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 13f787c and 6bb6acb.

⛔ Files ignored due to path filters (1)
  • source/images/integrations/onedrive/onedrive-permissions.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • source/_integrations/onedrive.markdown (1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/onedrive.markdown

[uncategorized] ~25-~25: A different word order might sound more natural.
Context: .../1866), the application-specific folder sometimes is called Graph instead of `Home Assista...

(AI_HYDRA_LEO_WORD_ORDER)


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

(UNLIKELY_OPENING_PUNCTUATION)

🪛 markdownlint-cli2 (0.17.2)
source/_integrations/onedrive.markdown

45-45: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)


48-48: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)


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

(MD009, no-trailing-spaces)


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

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

1-16: LGTM! Metadata section is well-structured.

The metadata section follows the standard format and includes all necessary fields.


49-57: LGTM! Clear explanation of credentials and security model.

The section effectively explains the default credentials, security model, and custom credentials setup.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

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

(MD009, no-trailing-spaces)


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

(MD009, no-trailing-spaces)


22-22: ⚠️ Potential issue

Fix grammatical error

Remove the redundant "to" in the sentence.

-The integration only has access to an application specific `Home Assistant` folder in the `App Folder` and cannot access to 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.

Likely invalid or redundant comment.

Copy link
Contributor

@c0ffeeca7 c0ffeeca7 left a comment

Choose a reason for hiding this comment

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

Thank you, @zweckj 👍

@c0ffeeca7 c0ffeeca7 dismissed abmantis’s stale review January 29, 2025 10:19

The requested change has been implemented. A link to the related issue was added.

@c0ffeeca7 c0ffeeca7 merged commit a138781 into home-assistant:next Jan 29, 2025
7 checks passed
@home-assistant home-assistant bot removed parent-merged The parent PR has been merged already awaits-parent Awaits the merge of an parent PR labels Jan 29, 2025
@zweckj zweckj deleted the onedrive/init branch January 29, 2025 10:19
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.

3 participants