50 lines
1.7 KiB
YAML
50 lines
1.7 KiB
YAML
template: forecast-solar
|
|
products:
|
|
- brand: Forecast.Solar
|
|
requirements:
|
|
description:
|
|
en: "[forecast.solar](https://forecast.solar) can be used for free. Paid plans can also be used by specifying an API key."
|
|
de: "[forecast.solar](https://forecast.solar) kann kostenlos verwendet werden. Kostenpflichtige Pläne können ebenfalls verwendet werden, indem ein API-Key angegeben wird."
|
|
evcc: ["skiptest"]
|
|
group: solar
|
|
params:
|
|
- preset: forecast-base
|
|
- name: az
|
|
description:
|
|
en: Azimuth
|
|
de: Azimut
|
|
help:
|
|
en: -180 = north, -90 = east, 0 = south, 90 = west, 180 = north
|
|
de: -180 = Norden, -90 = Osten, 0 = Süden, 90 = Westen, 180 = Norden
|
|
example: 180
|
|
required: true
|
|
- name: horizon
|
|
description:
|
|
en: Horizon
|
|
de: Horizont
|
|
help:
|
|
en: Simulates terrain shadows, [more information](https://doc.forecast.solar/horizon)
|
|
de: Simuliert Verschattung durch Gelände, [mehr Informationen](https://doc.forecast.solar/horizon)
|
|
example: 0,0,15,30,45,60,60,60,45,30,15,0
|
|
advanced: true
|
|
- name: apikey
|
|
description:
|
|
en: API key
|
|
de: API-Key
|
|
advanced: true
|
|
- name: interval
|
|
default: 1h
|
|
advanced: true
|
|
render: |
|
|
type: custom
|
|
tariff: solar
|
|
forecast:
|
|
source: http
|
|
uri: https://api.forecast.solar/{{ if .apikey }}{{ .apikey }}/{{ end }}estimate/{{ .lat }}/{{ .lon }}/{{ .dec }}/{{ .az }}/{{ .kwp }}?time=utc&full=1&resolution=60{{ if .horizon }}&horizon={{ unquote .horizon }}{{ end }}
|
|
jq: |
|
|
[ .result.watts | to_entries.[] | {
|
|
"start": (.key | strptime("%FT%T%z") | strftime("%FT%TZ")),
|
|
"end": (.key | strptime("%FT%T%z") | mktime+3600 | strftime("%FT%TZ")),
|
|
"value": .value
|
|
} ] | tostring
|
|
interval: {{ .interval }}
|