mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-22 08:46:51 +00:00
Add documentation for two new service methods (#10235)
* Add documentation for two new service methods * Change method name to match latest change in PR
This commit is contained in:
parent
b3c3cbd2c5
commit
e15a3de518
@ -153,6 +153,14 @@ trained medical professional.
|
||||
|
||||
Perform an on-demand update of OpenUV data.
|
||||
|
||||
### `openuv.update_uv_index_data`
|
||||
|
||||
Perform an on-demand update of OpenUV sensor data including current UV index, but not the `uv_protection_window`, saving an API call over `update_data`.
|
||||
|
||||
### `openuv.update_protection_data`
|
||||
|
||||
Perform an on-demand update of OpenUV `uv_protection_window` data, but not the sensors, saving an API call.
|
||||
|
||||
## Examples of Updating Data
|
||||
|
||||
One method to retrieve data every 30 minutes and still leave plenty of API key
|
||||
@ -175,6 +183,34 @@ automation:
|
||||
service: openuv.update_data
|
||||
```
|
||||
|
||||
Update only the sensors every 20 minutes while the sun is at least 10 degrees above the horizon:
|
||||
|
||||
```yaml
|
||||
automation:
|
||||
- alias: Update OpenUV every 20 minutes while the sun is at least 10 degrees above the horizon
|
||||
trigger:
|
||||
platform: time_pattern
|
||||
minutes: '/20'
|
||||
condition:
|
||||
condition: numeric_state
|
||||
entity_id: sun.sun
|
||||
value_template: '{{ state.attributes.elevation }}'
|
||||
above: 10
|
||||
action:
|
||||
service: openuv.update_uv_index_data
|
||||
```
|
||||
|
||||
Update the protection window once a day:
|
||||
```yaml
|
||||
automation:
|
||||
- alias: Update OpenUV protection window once a day
|
||||
trigger:
|
||||
platform: time
|
||||
at: "02:12:00"
|
||||
action:
|
||||
service: openuv.update_protection_data
|
||||
```
|
||||
|
||||
Another method (useful when monitoring locations other than the HASS latitude
|
||||
and longitude, in locations where there is a large amount of sunlight per day,
|
||||
etc.) might be to simply query the API less often:
|
||||
|
Loading…
x
Reference in New Issue
Block a user