mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-08 18:06:54 +00:00
Add documentation for onedrive sensor platform. (#37393)
* Update onedrive.markdown * Update OneDrive alert description for clarity * Remove empty metadata field in OneDrive integration * Fix typo in OneDrive integration documentation * implement feedback from rabbit Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * update ids --------- Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
parent
980c2fc8f0
commit
110ae2eca7
@ -61,6 +61,59 @@ If you set the integration up with the default credentials and switch to custom
|
|||||||
You will need an Azure tenant with an active Azure subscription to create your own client credentials.
|
You will need an Azure tenant with an active Azure subscription to create your own client credentials.
|
||||||
{% endtip %}
|
{% endtip %}
|
||||||
|
|
||||||
|
## Sensors
|
||||||
|
|
||||||
|
The integration provides the following sensors, which are updated every 5 minutes:
|
||||||
|
|
||||||
|
- **Total available storage**: The total size of your drive (disabled by default)
|
||||||
|
- **Used storage**: The amount of storage you have used up
|
||||||
|
- **Remaining storage**: The amount of storage that is left in your drive
|
||||||
|
- **Drive state**: Calculated state of your drive, based on the storage left. Possible values: `Normal`, `Nearing limit`, `Critical`, `Exceeded`
|
||||||
|
|
||||||
|
{% note %}
|
||||||
|
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 %}
|
||||||
|
|
||||||
|
## Automations
|
||||||
|
|
||||||
|
Get started with these automation examples.
|
||||||
|
|
||||||
|
### Send alert when drive is near storage limit
|
||||||
|
|
||||||
|
Send an alert when the drive usage is close to the storage limit and needs cleanup.
|
||||||
|
|
||||||
|
{% details "Example YAML configuration" %}
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
alias: Alert when OneDrive is close to storage limit
|
||||||
|
description: Send notification to phone when drive needs cleanup.
|
||||||
|
triggers:
|
||||||
|
- trigger: state
|
||||||
|
entity_id:
|
||||||
|
- sensor.my_drive_drive_state
|
||||||
|
from: "normal"
|
||||||
|
to: "nearing"
|
||||||
|
- trigger: state
|
||||||
|
entity_id:
|
||||||
|
- sensor.my_drive_drive_state
|
||||||
|
from: "nearing"
|
||||||
|
to: "critical"
|
||||||
|
actions:
|
||||||
|
- action: notify.mobile_app_iphone
|
||||||
|
data:
|
||||||
|
title: OneDrive is almost full!
|
||||||
|
message: >
|
||||||
|
OneDrive has used up {{ states('sensor.my_drive_used_storage') }} of {{
|
||||||
|
states('sensor.my_drive_total_available') }}GB. Only {{ states('sensor.my_drive_remaining_storage') }}GB remaining.
|
||||||
|
mode: single
|
||||||
|
```
|
||||||
|
|
||||||
|
{% endraw %}
|
||||||
|
{% enddetails %}
|
||||||
|
|
||||||
|
|
||||||
## Known limitations
|
## Known limitations
|
||||||
|
|
||||||
- Only personal OneDrives are supported at the moment.
|
- Only personal OneDrives are supported at the moment.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user