Skip to content

Commit d6887ec

Browse files
Add documentation for the OpenWeatherMap agent (#111)
1 parent d9be4e7 commit d6887ec

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
sidebar_position: 17
3+
---
4+
5+
# OpenWeatherMap
6+
7+
This agent enables integration with [OpenWeatherMap](https://openweathermap.org/), providing access to weather data via the [One Call 3.0 API](https://openweathermap.org/api/one-call-3#current).
8+
9+
- Periodically retrieves **current**, **hourly**, and **daily** forecast data from OpenWeatherMap
10+
- Updates the current and predicted values of linked attributes
11+
- Supports both current conditions and forecasted hourly and daily data
12+
- Can optionally provision a complete **Weather Asset** with preconfigured attributes and links
13+
14+
---
15+
16+
## Agent configuration
17+
The following table describes the supported configuration attributes and their purpose:
18+
19+
| Attribute | Description | Required | Default |
20+
| ---------- | ------------ | -------- | -------- |
21+
| **API key** | API key for the OpenWeatherMap API. Must have access to the One Call 3.0 API. | Yes | - |
22+
| **Polling millis** | Polling interval in milliseconds. | No | `3600000` |
23+
24+
**Polling millis** is an optional attribute and does not need to be set, the agent will by default update the weather values every hour.
25+
26+
---
27+
28+
### Provision weather asset
29+
**Provision weather asset** is a helper attribute that provisions a **Weather Asset** with the appropriate attributes and agent links when checked. After the asset is created, the checkbox resets automatically. The provisioned asset will appear as a child of the agent.
30+
31+
---
32+
33+
## Agent Link
34+
For attributes linked to this agent, the following table describes the supported **Agent Link** fields, in addition to the standard [Agent Link](overview.md#agent-links) fields:
35+
36+
| Attribute | Description | Required | Default |
37+
| ---------- | ------------ | -------- | -------- |
38+
| **Weather property** | The weather property to use for the linked attribute. | Yes | - |
39+
40+
Example when linking an attribute that represents the current/forecasted temperature, the **Weather property** should be set to `TEMPERATURE`.
41+
42+
---
43+
44+
## Important notes
45+
- The asset containing the linked attribute(s) **must have a location set**. The agent uses this location to retrieve weather data from the OpenWeatherMap API.
46+
- Weather values of the linked attributes are updated each time the polling interval is reached. It may take some time before the linked attributes are updated. Note, disabling and re-enabling the agent will trigger an immediate update of the linked attributes.

0 commit comments

Comments
 (0)