Skip to content

Commit 8e8eb40

Browse files
authored
Tariff Plugin: price > value (#777)
1 parent 97418ec commit 8e8eb40

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

Diff for: docs/tariffs.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ tariffs:
212212
forecast:
213213
source: http
214214
uri: https://api.allinpower.nl/troodon/api/p/spot_market/prices/?product_type=ELK
215-
jq: '[.timestamps, .prices] | transpose | map({ "start": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | strftime("%Y-%m-%dT%H:%M:%SZ")), "end": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | mktime + 3600 | strftime("%Y-%m-%dT%H:%M:%SZ")), "price": .[1] }) | tostring'
215+
jq: '[.timestamps, .prices] | transpose | map({ "start": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | strftime("%Y-%m-%dT%H:%M:%SZ")), "end": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | mktime + 3600 | strftime("%Y-%m-%dT%H:%M:%SZ")), "value": .[1] }) | tostring'
216216
```
217217

218218
Das Plugin muss eine JSON-Struktur zurückgeben, welches eine Liste von Zeiträumen und Preisen enthält.
@@ -221,8 +221,8 @@ Siehe nachfolgendes Beispiel:
221221

222222
```js
223223
[
224-
{ "start": "2025-01-01T00:00:00Z", "end": "2025-01-01T01:00:00Z", "price": 25.0 },
225-
{ "start": "2025-01-01T01:00:00Z", "end": "2025-01-01T02:00:00Z", "price": 30.0 },
224+
{ "start": "2025-01-01T00:00:00Z", "end": "2025-01-01T01:00:00Z", "value": 25.0 },
225+
{ "start": "2025-01-01T01:00:00Z", "end": "2025-01-01T02:00:00Z", "value": 30.0 },
226226
]
227227
```
228228

Diff for: docs/tariffs/_dynamischer_strompreis.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ tariffs:
2424
forecast:
2525
source: http
2626
uri: https://api.allinpower.nl/troodon/api/p/spot_market/prices/?product_type=ELK
27-
jq: '[.timestamps, .prices] | transpose | map({ "start": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | strftime("%Y-%m-%dT%H:%M:%SZ")), "end": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | mktime + 3600 | strftime("%Y-%m-%dT%H:%M:%SZ")), "price": .[1] }) | tostring'
27+
jq: '[.timestamps, .prices] | transpose | map({ "start": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | strftime("%Y-%m-%dT%H:%M:%SZ")), "end": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | mktime + 3600 | strftime("%Y-%m-%dT%H:%M:%SZ")), "value": .[1] }) | tostring'
2828
```
2929
3030
Das Plugin muss eine JSON-Struktur zurückgeben, welches eine Liste von Zeiträumen und Preisen enthält.
@@ -33,8 +33,8 @@ Siehe nachfolgendes Beispiel:
3333

3434
```js
3535
[
36-
{ "start": "2025-01-01T00:00:00Z", "end": "2025-01-01T01:00:00Z", "price": 25.0 },
37-
{ "start": "2025-01-01T01:00:00Z", "end": "2025-01-01T02:00:00Z", "price": 30.0 },
36+
{ "start": "2025-01-01T00:00:00Z", "end": "2025-01-01T01:00:00Z", "value": 25.0 },
37+
{ "start": "2025-01-01T01:00:00Z", "end": "2025-01-01T02:00:00Z", "value": 30.0 },
3838
]
3939
```
4040

Diff for: i18n/en/docusaurus-plugin-content-docs/current/tariffs.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ tariffs:
218218
forecast:
219219
source: http
220220
uri: https://api.allinpower.nl/troodon/api/p/spot_market/prices/?product_type=ELK
221-
jq: '[.timestamps, .prices] | transpose | map({ "start": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | strftime("%Y-%m-%dT%H:%M:%SZ")), "end": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | mktime + 3600 | strftime("%Y-%m-%dT%H:%M:%SZ")), "price": .[1] }) | tostring'
221+
jq: '[.timestamps, .prices] | transpose | map({ "start": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | strftime("%Y-%m-%dT%H:%M:%SZ")), "end": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | mktime + 3600 | strftime("%Y-%m-%dT%H:%M:%SZ")), "value": .[1] }) | tostring'
222222
```
223223

224224
The plugin must return a JSON structure containing a list of time periods and prices.
@@ -227,8 +227,8 @@ See the following example:
227227

228228
```js
229229
[
230-
{ "start": "2025-01-01T00:00:00Z", "end": "2025-01-01T01:00:00Z", "price": 25.0 },
231-
{ "start": "2025-01-01T01:00:00Z", "end": "2025-01-01T02:00:00Z", "price": 30.0 },
230+
{ "start": "2025-01-01T00:00:00Z", "end": "2025-01-01T01:00:00Z", "value": 25.0 },
231+
{ "start": "2025-01-01T01:00:00Z", "end": "2025-01-01T02:00:00Z", "value": 30.0 },
232232
]
233233
```
234234

Diff for: i18n/en/docusaurus-plugin-content-docs/current/tariffs/_dynamic_electricity_price.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ tariffs:
2424
forecast:
2525
source: http
2626
uri: https://api.allinpower.nl/troodon/api/p/spot_market/prices/?product_type=ELK
27-
jq: '[.timestamps, .prices] | transpose | map({ "start": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | strftime("%Y-%m-%dT%H:%M:%SZ")), "end": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | mktime + 3600 | strftime("%Y-%m-%dT%H:%M:%SZ")), "price": .[1] }) | tostring'
27+
jq: '[.timestamps, .prices] | transpose | map({ "start": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | strftime("%Y-%m-%dT%H:%M:%SZ")), "end": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | mktime + 3600 | strftime("%Y-%m-%dT%H:%M:%SZ")), "value": .[1] }) | tostring'
2828
```
2929
3030
The plugin must return a JSON structure containing a list of time periods and prices.
@@ -33,8 +33,8 @@ See the following example:
3333

3434
```js
3535
[
36-
{ "start": "2025-01-01T00:00:00Z", "end": "2025-01-01T01:00:00Z", "price": 25.0 },
37-
{ "start": "2025-01-01T01:00:00Z", "end": "2025-01-01T02:00:00Z", "price": 30.0 },
36+
{ "start": "2025-01-01T00:00:00Z", "end": "2025-01-01T01:00:00Z", "value": 25.0 },
37+
{ "start": "2025-01-01T01:00:00Z", "end": "2025-01-01T02:00:00Z", "value": 30.0 },
3838
]
3939
```
4040

Diff for: static/rest-api.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ components:
11231123
end:
11241124
description: End of charging interval
11251125
$ref: "#/components/schemas/Timestamp"
1126-
price:
1126+
value:
11271127
description: Cost of charging interval
11281128
type: number
11291129
minimum: 0

0 commit comments

Comments
 (0)