From d40cd88d4561207493f96e410f03235831adc841 Mon Sep 17 00:00:00 2001 From: Tom Jason Schwanke Date: Tue, 29 Oct 2024 09:42:51 +0100 Subject: [PATCH 1/6] add custom template for spottyenergy --- templates/definition/tariff/spottyenergy.yaml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 templates/definition/tariff/spottyenergy.yaml diff --git a/templates/definition/tariff/spottyenergy.yaml b/templates/definition/tariff/spottyenergy.yaml new file mode 100644 index 0000000000..1377938752 --- /dev/null +++ b/templates/definition/tariff/spottyenergy.yaml @@ -0,0 +1,23 @@ +template: spottyenergy +products: + - brand: Spotty Energie +requirements: + description: + de: "Nur für Österreich verfügbar." + en: "Only available for Austria." +group: price +params: + - name: contractId + example: ffffffff-4444-6666-2222-aaaaaabbbbbb + required: true + help: + de: "Die Vertragsnummer bekommst du im Kundenportal https://i.spottyenergie.at/" + en: "You can get your contract id from the customer portal https://i.spottyenergie.at/" + - preset: tariff-base +render: | + type: custom + {{ include "tariff-base" . }} + forecast: + source: http + uri: https://i.spottyenergy.at/api/prices/MARKET/{{ .contractId }} + jq: '[.[] | {start: .from, end: (.from | fromdate + 3600 | todate), price: (.price/100)}] | tostring' From 9b54e85f00fe58d46e3b990eef9f72e777648005 Mon Sep 17 00:00:00 2001 From: Tom Jason Schwanke Date: Tue, 29 Oct 2024 10:00:25 +0100 Subject: [PATCH 2/6] fixed URL for spotty energy --- templates/definition/tariff/spottyenergy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/definition/tariff/spottyenergy.yaml b/templates/definition/tariff/spottyenergy.yaml index 1377938752..4418d3e6df 100644 --- a/templates/definition/tariff/spottyenergy.yaml +++ b/templates/definition/tariff/spottyenergy.yaml @@ -19,5 +19,5 @@ render: | {{ include "tariff-base" . }} forecast: source: http - uri: https://i.spottyenergy.at/api/prices/MARKET/{{ .contractId }} + uri: https://i.spottyenergie.at/api/prices/MARKET/{{ .contractId }} jq: '[.[] | {start: .from, end: (.from | fromdate + 3600 | todate), price: (.price/100)}] | tostring' From a7a05a066918ff18d56c66d52e0efd656da96e8e Mon Sep 17 00:00:00 2001 From: Tom Jason Schwanke Date: Wed, 30 Oct 2024 10:15:16 +0100 Subject: [PATCH 3/6] add priceType value for Spotty Energy --- templates/definition/tariff/spottyenergy.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/templates/definition/tariff/spottyenergy.yaml b/templates/definition/tariff/spottyenergy.yaml index 4418d3e6df..8aea09d761 100644 --- a/templates/definition/tariff/spottyenergy.yaml +++ b/templates/definition/tariff/spottyenergy.yaml @@ -13,11 +13,18 @@ params: help: de: "Die Vertragsnummer bekommst du im Kundenportal https://i.spottyenergie.at/" en: "You can get your contract id from the customer portal https://i.spottyenergie.at/" + - name: priceType + example: CONSUMPTION + validvalues: ["MARKET", "CONSUMPTION", "GENERATION"] + required: true + help: + de: "Preistyp, entweder Börsenpreis, Verbrauchspreis oder Einspeisevergütunt (falls vereinbart), siehe https://www.spottyenergie.at/blog/energie-smart-produzieren" + en: "Price type, either spotmarket price, consumption price or generation compensation (if contractually agreed), more info at https://www.spottyenergie.at/blog/energie-smart-produzieren" - preset: tariff-base render: | type: custom {{ include "tariff-base" . }} forecast: source: http - uri: https://i.spottyenergie.at/api/prices/MARKET/{{ .contractId }} + uri: https://i.spottyenergie.at/api/prices/{{ .priceType }}/{{ .contractId }} jq: '[.[] | {start: .from, end: (.from | fromdate + 3600 | todate), price: (.price/100)}] | tostring' From f0c21932e59f92bdcf3bb277e478ca118f05b34d Mon Sep 17 00:00:00 2001 From: Tom Jason Schwanke Date: Wed, 30 Oct 2024 14:04:10 +0100 Subject: [PATCH 4/6] change parameter names to lowercase --- templates/definition/tariff/spottyenergy.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/definition/tariff/spottyenergy.yaml b/templates/definition/tariff/spottyenergy.yaml index 8aea09d761..8adf2ce322 100644 --- a/templates/definition/tariff/spottyenergy.yaml +++ b/templates/definition/tariff/spottyenergy.yaml @@ -7,13 +7,13 @@ requirements: en: "Only available for Austria." group: price params: - - name: contractId + - name: contractid example: ffffffff-4444-6666-2222-aaaaaabbbbbb required: true help: de: "Die Vertragsnummer bekommst du im Kundenportal https://i.spottyenergie.at/" en: "You can get your contract id from the customer portal https://i.spottyenergie.at/" - - name: priceType + - name: pricetype example: CONSUMPTION validvalues: ["MARKET", "CONSUMPTION", "GENERATION"] required: true @@ -26,5 +26,5 @@ render: | {{ include "tariff-base" . }} forecast: source: http - uri: https://i.spottyenergie.at/api/prices/{{ .priceType }}/{{ .contractId }} + uri: https://i.spottyenergie.at/api/prices/{{ .pricetype }}/{{ .contractid }} jq: '[.[] | {start: .from, end: (.from | fromdate + 3600 | todate), price: (.price/100)}] | tostring' From 6ebe8cc49364b5ddf3bfb3e421c0855a73ed9997 Mon Sep 17 00:00:00 2001 From: Tom Jason Schwanke Date: Wed, 30 Oct 2024 14:42:57 +0100 Subject: [PATCH 5/6] Update templates/definition/tariff/spottyenergy.yaml Co-authored-by: andig --- templates/definition/tariff/spottyenergy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/definition/tariff/spottyenergy.yaml b/templates/definition/tariff/spottyenergy.yaml index 8adf2ce322..cf7161fd0a 100644 --- a/templates/definition/tariff/spottyenergy.yaml +++ b/templates/definition/tariff/spottyenergy.yaml @@ -18,7 +18,7 @@ params: validvalues: ["MARKET", "CONSUMPTION", "GENERATION"] required: true help: - de: "Preistyp, entweder Börsenpreis, Verbrauchspreis oder Einspeisevergütunt (falls vereinbart), siehe https://www.spottyenergie.at/blog/energie-smart-produzieren" + de: "Preistyp, entweder Börsenpreis, Verbrauchspreis oder Einspeisevergütung (falls vereinbart), siehe https://www.spottyenergie.at/blog/energie-smart-produzieren" en: "Price type, either spotmarket price, consumption price or generation compensation (if contractually agreed), more info at https://www.spottyenergie.at/blog/energie-smart-produzieren" - preset: tariff-base render: | From 9c3e2803550d5f87a5c969342d28f429a6ade0ea Mon Sep 17 00:00:00 2001 From: Tom Jason Schwanke Date: Wed, 30 Oct 2024 17:18:13 +0100 Subject: [PATCH 6/6] Update templates/definition/tariff/spottyenergy.yaml sane default Co-authored-by: andig --- templates/definition/tariff/spottyenergy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/definition/tariff/spottyenergy.yaml b/templates/definition/tariff/spottyenergy.yaml index cf7161fd0a..61b4909be0 100644 --- a/templates/definition/tariff/spottyenergy.yaml +++ b/templates/definition/tariff/spottyenergy.yaml @@ -14,7 +14,7 @@ params: de: "Die Vertragsnummer bekommst du im Kundenportal https://i.spottyenergie.at/" en: "You can get your contract id from the customer portal https://i.spottyenergie.at/" - name: pricetype - example: CONSUMPTION + default: CONSUMPTION validvalues: ["MARKET", "CONSUMPTION", "GENERATION"] required: true help: