Skip to content

Commit

Permalink
Improve Stookwijzer documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fwestenberg committed Feb 26, 2025
1 parent 26e870a commit 2451408
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 29 deletions.
12 changes: 9 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ GEM
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.17.1-aarch64-linux-gnu)
ffi (1.17.1-arm64-darwin)
ffi (1.17.1-x86_64-linux-gnu)
forwardable-extended (2.6.0)
google-protobuf (4.29.3-aarch64-linux)
bigdecimal
rake (>= 13)
google-protobuf (4.29.3-arm64-darwin)
bigdecimal
rake (>= 13)
Expand Down Expand Up @@ -85,6 +89,8 @@ GEM
multi_json (1.15.0)
mustermann (3.0.3)
ruby2_keywords (~> 0.0.1)
nokogiri (1.18.2-aarch64-linux-gnu)
racc (~> 1.4)
nokogiri (1.18.2-arm64-darwin)
racc (~> 1.4)
nokogiri (1.18.2-x86_64-linux-gnu)
Expand Down Expand Up @@ -139,10 +145,9 @@ GEM
ruby2_keywords (0.0.5)
safe_yaml (1.0.5)
sass (3.4.25)
sass-embedded (1.83.4-arm64-darwin)
google-protobuf (~> 4.29)
sass-embedded (1.83.4-x86_64-linux-gnu)
sass-embedded (1.83.4)
google-protobuf (~> 4.29)
rake (>= 13)
sass-globbing (1.1.5)
sass (>= 3.1)
sassc (2.1.0)
Expand All @@ -169,6 +174,7 @@ GEM
webrick (1.9.1)

PLATFORMS
aarch64-linux
arm64-darwin-23
x86_64-linux

Expand Down
53 changes: 27 additions & 26 deletions source/_integrations/stookwijzer.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ Additionally, various sensor entities are provided:

{% include integrations/config_flow.md %}

## Action `stookwijzer.get_forecast`
## Action: Get Forecast

This action populates [response data](/docs/scripts/perform-actions#use-templates-to-handle-response-data)
The `stookwijzer.get_forecast` action populates [response data](/docs/scripts/perform-actions#use-templates-to-handle-response-data)
with a mapping of the Stookwijzer advice forecast.

```yaml
Expand All @@ -46,11 +46,31 @@ response_variable: stookwijzer_forecast
The response data field contains the `forecast` field.
`forecast` is a list of forecast advice entries at a given time:

| Response data | Description | Example |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
| `datetime` | The time of the forecasted advice. | 2025-01-14T14:00:00+00:00 |
| `advice` | The forecasted advice code. | code_yellow |
| `final` | Indicator whether the advice is final or can still change. | True |
| Response data | Description | Example |
|--------------|-----------------------------------------------------------------------------|---------------------------|
| `datetime` | The time of the forecasted advice. | 2025-01-14T14:00:00+00:00 |
| `advice` | The forecasted advice code. | code_yellow |
| `final` | Indicator whether the advice is final or can still change. | True |

{% details "Example action response" %}

```yaml
forecast:
- datetime: "2025-02-12T17:00:00+01:00"
advice: code_yellow
final: True
- datetime: "2025-02-12T23:00:00+01:00"
advice: code_yellow
final: True
- datetime: "2025-02-13T05:00:00+01:00"
advice: code_orange
final: False
- datetime: "2025-02-13T11:00:00+01:00"
advice: code_red
final: False
```

{% enddetails %}

## Examples

Expand Down Expand Up @@ -89,22 +109,3 @@ template:

{% enddetails %}

{% details "Example action response" %}

```yaml
forecast:
- datetime: "2025-02-12T17:00:00+01:00"
advice: code_yellow
final: True
- datetime: "2025-02-12T23:00:00+01:00"
advice: code_yellow
final: True
- datetime: "2025-02-13T05:00:00+01:00"
advice: code_orange
final: False
- datetime: "2025-02-13T11:00:00+01:00"
advice: code_red
final: False
```

{% enddetails %}

0 comments on commit 2451408

Please sign in to comment.