From c231846cab357a23b7554d110703039a00de346f Mon Sep 17 00:00:00 2001 From: Josef Zweck Date: Fri, 7 Mar 2025 20:05:51 +0100 Subject: [PATCH] Add upload service docs to OneDrive (#37637) * add service docs * Update onedrive.markdown * Fix OneDrive config entry description * Apply suggestions from code review * Apply suggestions from code review --------- Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --- source/_integrations/onedrive.markdown | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/source/_integrations/onedrive.markdown b/source/_integrations/onedrive.markdown index 891a7893090..28e1986e52a 100644 --- a/source/_integrations/onedrive.markdown +++ b/source/_integrations/onedrive.markdown @@ -18,7 +18,7 @@ ha_platforms: - sensor --- -This integration allows you to use [Microsoft OneDrive](https://www.microsoft.com/en-us/microsoft-365/onedrive/online-cloud-storage) for [Home Assistant Backups](/common-tasks/general/#backups). +This integration allows you to use [OneDrive](https://www.microsoft.com/en-us/microsoft-365/onedrive/online-cloud-storage) for [Home Assistant Backups](/common-tasks/general/#backups) as well as uploading generic files to your OneDrive. Backups will be created in a folder called `Home Assistant\backups_` in the `App Folder` of your OneDrive by default. `id` is part of your Home Assistant instance's unique id to allow backups from multiple instances to the same OneDrive account. @@ -85,6 +85,25 @@ The integration provides the following sensors, which are updated every 5 minute A drive that is in **Drive state** `Exceeded` will be automatically frozen (meaning you can't upload any more backups & files), until you clear up enough storage. {% endnote %} +## Actions + +This integration provides the following actions: + +### Action `onedrive.upload` + +You can use the `onedrive.upload` action to upload files from Home Assistant +to OneDrive. For example, to upload `camera` snapshots. + +{% details "Upload action details" %} + +| Data attribute | Optional | Description | Example | +| ---------------------- | -------- | ----------- | --------| +| `filename` | no | Path to the file to upload. | /media/image.jpg | +| `destination_folder` | no | Folder inside your `Apps/Home Assistant` app folder that is the destination for the uploaded content. Will be created if it does not exist. Supports subfolders. | Snapshots/2025 | +| `config_entry_id` | no | The ID of the OneDrive config entry (the OneDrive you want to upload to). | a1bee602deade2b09bc522749bbce48e | + +{% enddetails %} + ## Automations Get started with these automation examples.