Templates: support class-local include files (#32871)
This commit is contained in:
parent
9034f45355
commit
de3f8995cd
116 changed files with 285 additions and 212 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{{ define "charger-features" }}
|
||||
{{ define "features" }}
|
||||
{{- if or (eq .heating "true") (eq .integrateddevice "true") }}
|
||||
features:
|
||||
{{- if eq .heating "true" }}
|
||||
|
|
@ -213,4 +213,4 @@ render: |
|
|||
- {{ .voltageL3 }}
|
||||
{{- end }}
|
||||
phases: {{ .phaseswitch }}
|
||||
{{ include "charger-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -4,3 +4,6 @@ import "embed"
|
|||
|
||||
//go:embed charger/*.yaml meter/*.yaml vehicle/*.yaml tariff/*.yaml messenger/*.yaml circuit/*.yaml hems/*.yaml
|
||||
var YamlTemplates embed.FS
|
||||
|
||||
//go:embed */*.tpl
|
||||
var TemplateIncludes embed.FS
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ params:
|
|||
- preset: tariff-base
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
forecast:
|
||||
source: http
|
||||
uri: https://api.allinpower.nl/troodon/api/p/spot_market/prices/?product_type=ELK
|
||||
|
|
|
|||
|
|
@ -20,4 +20,4 @@ render: |
|
|||
token: {{ .token }}
|
||||
siteid: {{ .siteid }}
|
||||
channel: {{ .channel }}
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
|
|
|
|||
|
|
@ -13,4 +13,4 @@ params:
|
|||
render: |
|
||||
type: awattar
|
||||
region: {{ .region }}
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{{ define "tariff-base" }}
|
||||
{{ define "base" }}
|
||||
{{- if .charges }}
|
||||
charges: {{ .charges }}
|
||||
{{- end }}
|
||||
|
|
@ -14,7 +14,7 @@ params:
|
|||
default: 0.081
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
forecast:
|
||||
source: http
|
||||
uri: https://api.bkw.ch/api/dyntariffs/v1/tariffs
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ params:
|
|||
default: 0.081
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
forecast:
|
||||
source: http
|
||||
uri: https://e-ckw-public-data.de-c1.eu1.cloudhub.io/api/v1/netzinformationen/energie/dynamische-preise?tariff_type=integrated&tariff_name={{ .tariff }}&start_timestamp={{ `{{ (now.AddDate 0 0 -1).Format "2006-01-02T00:00:00Z" }}` }}&end_timestamp={{ `{{ (now.AddDate 0 0 3).Format "2006-01-02T00:00:00Z" }}` }}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ params:
|
|||
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
forecast:
|
||||
source: js
|
||||
script: |
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ params:
|
|||
advanced: true
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
forecast:
|
||||
source: http
|
||||
uri: https://api.tariffs.ekz.ch/v1/tariffs?tariff_name=integrated_{{ .tariff_name }}&start_timestamp={{ `{{ now.Local | date "2006-01-02T15" }}` }}:00:00%2B02%3A00&end_timestamp={{ `{{ addDate now.Local 0 0 2 | date "2006-01-02T15" }}` }}:00:00
|
||||
|
|
|
|||
|
|
@ -18,4 +18,4 @@ params:
|
|||
render: |
|
||||
type: elering
|
||||
region: {{ .region }}
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ params:
|
|||
- preset: tariff-base
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
forecast:
|
||||
source: http
|
||||
uri: https://api.energidataservice.dk/dataset/DayAheadPrices?start=now&filter={"PriceArea":["{{ .region }}"]}
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@ params:
|
|||
render: |
|
||||
type: energinet
|
||||
region: {{ .region }}
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ params:
|
|||
- preset: tariff-features
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "tariff-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
forecast:
|
||||
source: http
|
||||
uri: https://api.energy-charts.info/price?bzn={{ .bzn }}&end={{ `{{ addDate now 0 0 1 | date "2006-01-02" }}` }}
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ params:
|
|||
- preset: tariff-features
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "tariff-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
forecast:
|
||||
source: http
|
||||
uri: https://www.energyforecast.de/api/v1/predictions/next_96_hours?resolution=QUARTER_HOURLY&fixed_cost_cent=0&vat=0&token={{ .token }}{{ if .domain }}&market_zone={{ .domain }}{{ end }}
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ params:
|
|||
- preset: tariff-features
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "tariff-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
forecast:
|
||||
source: http
|
||||
uri: https://api.energypriceforecast.eu/api/v1/evcc/tariff?country={{.region}}&type=grid¤cy={{.currency}}&hours={{.horizon}}
|
||||
|
|
|
|||
|
|
@ -52,8 +52,8 @@ params:
|
|||
advanced: true
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "tariff-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
forecast:
|
||||
source: go
|
||||
script: |
|
||||
|
|
|
|||
|
|
@ -118,5 +118,5 @@ render: |
|
|||
type: entsoe
|
||||
securitytoken: {{ .securitytoken }}
|
||||
domain: "{{ .domain }}"
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "tariff-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ params:
|
|||
- preset: tariff-features
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "tariff-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
forecast:
|
||||
source: http
|
||||
uri: {{ .uri }}/prices?region={{ .region }}&unit=EUR_PER_KWH&timezone=UTC
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ params:
|
|||
advanced: true
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
forecast:
|
||||
source: http
|
||||
uri: https://epexprijzen.nl/api/v1/prices/{{ .provider }}/{{ index . "price-interval" }}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ params:
|
|||
- preset: tariff-base
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
forecast:
|
||||
source: http
|
||||
uri: https://api.esios.ree.es/indicators/{{ .indicator }}?start_date={{ now | date "2006-01-02" }}T00:00&end_date={{ (now.AddDate 0 0 1) | date "2006-01-02" }}T23:59
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{{ define "tariff-features" }}
|
||||
{{ define "features" }}
|
||||
{{- if eq .average "true" }}
|
||||
features: ["average"]
|
||||
{{- end }}
|
||||
|
|
@ -37,4 +37,4 @@ render: |
|
|||
months: {{ .months }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
|
|
|
|||
|
|
@ -15,4 +15,4 @@ params:
|
|||
render: |
|
||||
type: fixed
|
||||
price: {{ .price }}
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ params:
|
|||
render: |
|
||||
type: custom
|
||||
features: ["cacheable"]
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
forecast:
|
||||
source: http
|
||||
uri: https://api.tariffs.groupe-e.ch/v2/tariffs?start_timestamp={{ `{{ now.UTC | mustDateModify "-1h" | date "2006-01-02T15" }}` }}:00:00Z&end_timestamp={{ `{{ addDate now.UTC 0 0 2 | date "2006-01-02T15" }}` }}:00:00Z
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ params:
|
|||
- preset: tariff-features
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "tariff-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
forecast:
|
||||
source: go
|
||||
script: |
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ params:
|
|||
- preset: tariff-features
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "tariff-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
forecast:
|
||||
source: http
|
||||
uri: https://www.omie.es/sites/default/files/dados/NUEVA_SECCION/INT_PBC_EV_H_ACUM.TXT
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ params:
|
|||
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
forecast:
|
||||
source: http
|
||||
uri: https://api.pstryk.pl/integrations/meter-data/unified-metrics/?metrics=pricing&resolution=hour&window_start={{ `{{ now.UTC | mustDateModify "-24h" | date "2006-01-02" }}` }}:00:00Z&window_end={{ `{{ now.UTC | mustDateModify "+72h" | date "2006-01-02" }}` }}:00:00Z
|
||||
|
|
|
|||
|
|
@ -21,5 +21,5 @@ params:
|
|||
en: Italian electricity market zone. If no zone is specified, the national unit price (PUN) is used.
|
||||
render: |
|
||||
type: pun
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
zone: {{ .zone }}
|
||||
|
|
|
|||
|
|
@ -11,4 +11,4 @@ params:
|
|||
- preset: tariff-base
|
||||
render: |
|
||||
type: smartenergy
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ params:
|
|||
- preset: tariff-base
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
forecast:
|
||||
source: http
|
||||
uri: https://i.spottyenergie.at/api/prices/{{ .pricetype }}/{{ unquote .contractid }}
|
||||
|
|
|
|||
|
|
@ -55,5 +55,5 @@ params:
|
|||
render: |
|
||||
type: stekker
|
||||
region: {{ .region }}
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "tariff-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ params:
|
|||
- preset: tariff-features
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "tariff-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
forecast:
|
||||
source: http
|
||||
uri: https://api.energypriceforecast.eu/api/v1/evcc/tariff?country={{.region}}&type=grid¤cy={{.currency}}&hours={{.horizon}}
|
||||
|
|
|
|||
|
|
@ -26,4 +26,4 @@ render: |
|
|||
type: tibber
|
||||
token: {{ .token }}
|
||||
homeid: {{ .homeid }}
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "base" . }}
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ params:
|
|||
render: |
|
||||
type: custom
|
||||
features: ["cacheable"]
|
||||
{{ include "tariff-base" . }}
|
||||
{{ include "tariff-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
forecast:
|
||||
source: http
|
||||
uri: https://voltcast.com/api/v1/forecasts/{{ .zone }}?horizon=48h
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ params:
|
|||
required: true
|
||||
render: |
|
||||
type: aiways
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -6,5 +6,5 @@ params:
|
|||
- preset: vehicle-features
|
||||
render: |
|
||||
type: myalpine
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -40,5 +40,5 @@ params:
|
|||
render: |
|
||||
type: drivesomethinggreater
|
||||
brand: Audi
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "vehicle-features" (merge (dict "basefeatures" (list "streaming")) .) }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" (merge (dict "basefeatures" (list "streaming")) .) }}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{{ define "vehicle-base" }}
|
||||
{{ define "base" }}
|
||||
user: {{ .user }}
|
||||
password: {{ .password }}
|
||||
vin: {{ .vin }}
|
||||
{{ template "vehicle-common" . }}
|
||||
{{ template "common" . }}
|
||||
{{- if .cache }}
|
||||
cache: {{ .cache }}
|
||||
{{- end }}
|
||||
|
|
@ -29,9 +29,9 @@ params:
|
|||
- preset: vehicle-features
|
||||
render: |
|
||||
type: bmw
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "base" . }}
|
||||
{{- if ne .region "EU" }}
|
||||
region: {{ .region }}
|
||||
{{- end }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
hcaptcha: {{ .hcaptcha }}
|
||||
|
|
|
|||
|
|
@ -72,5 +72,5 @@ render: |
|
|||
type: cardata
|
||||
vin: {{ .vin }}
|
||||
clientid: {{ .clientid }}
|
||||
{{ include "vehicle-common" . }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "common" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ params:
|
|||
- preset: vehicle-online
|
||||
render: |
|
||||
type: carwings
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,6 @@ render: |
|
|||
tokens:
|
||||
access: {{ .accessToken }}
|
||||
refresh: {{ .refreshToken }}
|
||||
{{ include "vehicle-common" . }}
|
||||
{{ include "common" . }}
|
||||
cache: {{ .cache }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{{ define "vehicle-common" }}
|
||||
{{ define "common" }}
|
||||
{{- if .title }}
|
||||
title: {{ .title }}
|
||||
{{- end }}
|
||||
|
|
@ -40,6 +40,6 @@ render: |
|
|||
domain: {{ .domain }}
|
||||
namespace: {{ .namespace }}
|
||||
vin: {{ .vin }}
|
||||
{{ include "vehicle-common" . }}
|
||||
{{ include "common" . }}
|
||||
cache: {{ .cache }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -6,5 +6,5 @@ params:
|
|||
- preset: vehicle-features
|
||||
render: |
|
||||
type: dacia
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -58,5 +58,5 @@ params:
|
|||
render: |
|
||||
type: drivesomethinggreater
|
||||
brand: {{ .brand }}
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "vehicle-features" (merge (dict "basefeatures" (list "streaming")) .) }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" (merge (dict "basefeatures" (list "streaming")) .) }}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,6 @@ render: |
|
|||
tokens:
|
||||
access: {{ .accessToken }}
|
||||
refresh: {{ .refreshToken }}
|
||||
{{ include "vehicle-common" . }}
|
||||
{{ include "common" . }}
|
||||
cache: {{ .cache }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ params:
|
|||
- preset: vehicle-online
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "vehicle-common" . }}
|
||||
{{ include "common" . }}
|
||||
{{- if eq .apiversion "3" }}
|
||||
soc:
|
||||
source: http
|
||||
|
|
@ -45,4 +45,4 @@ render: |
|
|||
uri: https://app.evnotify.de/extended?akey={{ urlEncode .akey }}&token={{ urlEncode .token }}
|
||||
jq: .charging
|
||||
{{- end }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{{ define "vehicle-features" }}
|
||||
{{ define "features" }}
|
||||
{{- if or .basefeatures (eq .coarsecurrent "true") (eq .welcomecharge "true") (eq .streaming "true") (eq .climaterdisabled "true") (eq .autodetectdisabled "true") (eq .wakeupdisabled "true") }}
|
||||
features:
|
||||
{{- range .basefeatures }}
|
||||
|
|
@ -13,8 +13,8 @@ params:
|
|||
- preset: vehicle-features
|
||||
render: |
|
||||
type: fiat
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "base" . }}
|
||||
{{- if .pin }}
|
||||
pin: {{ .pin }} # mandatory to wake up, deep refresh Soc & start/stop charge
|
||||
{{- end }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ params:
|
|||
advanced: true
|
||||
render: |
|
||||
type: custom
|
||||
{{- include "vehicle-common" . }}
|
||||
{{- include "common" . }}
|
||||
soc:
|
||||
{{- include "source" . | indent 2 }}
|
||||
jq: .energy[0].level
|
||||
|
|
@ -73,4 +73,4 @@ render: |
|
|||
uri: {{ trimSuffix "/" .url }}/get_vehicleinfo/{{ .vin }}?from_cache=1
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,6 @@ render: |
|
|||
id: {{ .clientid }}
|
||||
secret: {{ .clientsecret }}
|
||||
redirecturi: {{ .redirecturi }}
|
||||
{{ include "vehicle-common" . }}
|
||||
{{ include "common" . }}
|
||||
cache: {{ .cache }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,6 @@ render: |
|
|||
tokens:
|
||||
access: {{ .accessToken }}
|
||||
refresh: {{ .refreshToken }}
|
||||
{{ include "vehicle-common" . }}
|
||||
{{ include "common" . }}
|
||||
cache: {{ .cache }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,6 @@ params:
|
|||
- preset: vehicle-language
|
||||
render: |
|
||||
type: genesis
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "vehicle-language" . }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "language" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -158,8 +158,8 @@ params:
|
|||
default: true
|
||||
render: |
|
||||
type: homeassistant
|
||||
{{ include "vehicle-common" . }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "common" . }}
|
||||
{{ include "features" . }}
|
||||
uri: {{ .uri }}
|
||||
home: {{ .home }} # deprecated
|
||||
insecure: {{ .insecure }}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,6 @@ params:
|
|||
de: Wird von Bluelink (US) benötigt, um Fernkommandos zu autorisieren.
|
||||
render: |
|
||||
type: hyundai-us
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "base" . }}
|
||||
pin: {{ quote .pin }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,6 @@ params:
|
|||
render: |
|
||||
type: hyundai
|
||||
region: {{ .region }}
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "vehicle-language" . }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "language" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ params:
|
|||
default: true
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "vehicle-common" . }}
|
||||
{{ include "common" . }}
|
||||
soc:
|
||||
source: http
|
||||
uri: {{ .uri }}/getPlainValue/bmw.{{ .id }}.{{ .vin }}.stream.vehicle.drivetrain.batteryManagement.header.value?noStringify
|
||||
|
|
@ -65,4 +65,4 @@ render: |
|
|||
source: http
|
||||
uri: {{ .uri }}/getPlainValue/bmw.{{ .id }}.{{ .vin }}.stream.vehicle.drivetrain.electricEngine.charging.timeRemaining.value?noStringify
|
||||
jq: if (. == null) or (. == 0) or (type != "number") or (. < 0) then null else (now + (. * 60) | strftime("%Y-%m-%dT%H:%M:%SZ")) end
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ params:
|
|||
deprecated: true
|
||||
render: |
|
||||
type: custom
|
||||
{{ include "vehicle-common" . }}
|
||||
{{ include "vehicle-features" (merge (dict "basefeatures" (list "offline")) .) }}
|
||||
{{ include "common" . }}
|
||||
{{ include "features" (merge (dict "basefeatures" (list "offline")) .) }}
|
||||
soc:
|
||||
source: const
|
||||
value: 0
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ params:
|
|||
- preset: vehicle-online
|
||||
render: |
|
||||
type: jaguar
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@ params:
|
|||
- preset: vehicle-language
|
||||
render: |
|
||||
type: kia
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "vehicle-language" . }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "language" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
{{ define "vehicle-language" }}
|
||||
{{ define "language" }}
|
||||
language: {{ .language }}
|
||||
{{- end }}
|
||||
|
|
@ -20,9 +20,9 @@ params:
|
|||
default: 15m
|
||||
render: |
|
||||
type: lexus
|
||||
{{ include "vehicle-common" . }}
|
||||
{{ include "common" . }}
|
||||
user: {{ .user }}
|
||||
password: {{ .password }}
|
||||
vin: {{ .vin }}
|
||||
cache: {{ .cache }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ params:
|
|||
default: 720h
|
||||
render: |
|
||||
type: custom
|
||||
{{- include "vehicle-common" . }}
|
||||
{{- include "common" . }}
|
||||
soc:
|
||||
source: mqtt
|
||||
topic: mazda2mqtt/{{ .vin }}/chargeInfo/batteryLevelPercentage
|
||||
|
|
@ -36,4 +36,4 @@ render: |
|
|||
source: mqtt
|
||||
topic: mazda2mqtt/{{ .vin }}/chargeInfo/drivingRangeKm
|
||||
timeout: {{ .timeout }}
|
||||
{{ include "vehicle-features" (merge (dict "basefeatures" (list "streaming")) .) }}
|
||||
{{ include "features" (merge (dict "basefeatures" (list "streaming")) .) }}
|
||||
|
|
|
|||
|
|
@ -33,5 +33,5 @@ render: |
|
|||
tokens:
|
||||
access: {{ .accessToken }}
|
||||
refresh: {{ .refreshToken }}
|
||||
{{ include "vehicle-common" . }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "common" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,6 @@ params:
|
|||
advanced: true
|
||||
render: |
|
||||
type: mg
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "base" . }}
|
||||
region: {{ .region }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ params:
|
|||
default: 1h
|
||||
render: |
|
||||
type: custom
|
||||
{{- include "vehicle-common" . }}
|
||||
{{- include "common" . }}
|
||||
soc: # battery soc (%)
|
||||
source: mqtt
|
||||
topic: saic/{{ .user }}/vehicles/{{ .vin }}/drivetrain/soc
|
||||
|
|
@ -63,4 +63,4 @@ render: |
|
|||
source: mqtt
|
||||
topic: saic/{{ .user }}/vehicles/{{ .vin }}/refresh/mode/set
|
||||
timeout: {{ .timeout }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ params:
|
|||
- preset: vehicle-features
|
||||
render: |
|
||||
type: mini
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "base" . }}
|
||||
{{- if ne .region "EU" }}
|
||||
region: {{ .region }}
|
||||
{{- end }}
|
||||
hcaptcha: {{ .hcaptcha }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ params:
|
|||
advanced: true
|
||||
render: |
|
||||
type: custom
|
||||
{{- include "vehicle-common" . }}
|
||||
{{- include "common" . }}
|
||||
soc:
|
||||
source: mqtt
|
||||
topic: mz2mqtt/{{ .vin }}/chargeInfo/batteryLevelPercentage
|
||||
|
|
@ -37,4 +37,4 @@ render: |
|
|||
source: mqtt
|
||||
topic: mz2mqtt/{{ .vin }}/chargeInfo/drivingRangeKm
|
||||
timeout: {{ .timeout }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,6 @@ params:
|
|||
render: |
|
||||
type: nissan
|
||||
version: v2
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "base" . }}
|
||||
expiry: {{ .expiry }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ params:
|
|||
- preset: vehicle-online
|
||||
render: |
|
||||
type: nissan
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -32,4 +32,4 @@ render: |
|
|||
password: {{ .password }} # NIU app password
|
||||
serial: {{ .serial }} # NIU E-Scooter serial number like shown in app
|
||||
capacity: {{ .capacity }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -44,10 +44,10 @@ params:
|
|||
default: 15m
|
||||
render: |
|
||||
type: octopus-de
|
||||
{{- include "vehicle-common" . }}
|
||||
{{- include "common" . }}
|
||||
email: {{ .email }}
|
||||
password: {{ .password }}
|
||||
accountnumber: {{ .accountnumber }}
|
||||
device: {{ .device }}
|
||||
cache: {{ .cache }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -44,10 +44,10 @@ params:
|
|||
default: 15m
|
||||
render: |
|
||||
type: octopus-it
|
||||
{{- include "vehicle-common" . }}
|
||||
{{- include "common" . }}
|
||||
email: {{ .email }}
|
||||
password: {{ .password }}
|
||||
accountnumber: {{ .accountnumber }}
|
||||
device: {{ .device }}
|
||||
cache: {{ .cache }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ params:
|
|||
deprecated: true
|
||||
render: |
|
||||
type: custom
|
||||
{{- include "vehicle-common" . }}
|
||||
{{ include "vehicle-features" (merge (dict "basefeatures" (list "offline")) .) }}
|
||||
{{- include "common" . }}
|
||||
{{ include "features" (merge (dict "basefeatures" (list "offline")) .) }}
|
||||
soc:
|
||||
source: const
|
||||
value: 0
|
||||
|
|
|
|||
|
|
@ -29,6 +29,6 @@ render: |
|
|||
tokens:
|
||||
access: {{ .accessToken }}
|
||||
refresh: {{ .refreshToken }}
|
||||
{{ include "vehicle-common" . }}
|
||||
{{ include "common" . }}
|
||||
cache: {{ .cache }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ params:
|
|||
advanced: true
|
||||
render: |
|
||||
type: custom
|
||||
{{- include "vehicle-common" . }}
|
||||
{{- include "common" . }}
|
||||
soc:
|
||||
source: mqtt
|
||||
topic: phev/battery/level
|
||||
|
|
@ -38,4 +38,4 @@ render: |
|
|||
topic: phev/climate/status
|
||||
timeout: {{ .timeout }}
|
||||
jq: (. != "off")
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@ params:
|
|||
default: 15m
|
||||
render: |
|
||||
type: ovms
|
||||
{{- include "vehicle-common" . }}
|
||||
{{- include "common" . }}
|
||||
user: {{ .user }}
|
||||
password: {{ .password }}
|
||||
vehicleid: {{ .vehicleid }}
|
||||
server: {{ .server }}
|
||||
cache: {{ .cache }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,6 @@ render: |
|
|||
tokens:
|
||||
access: {{ .accessToken }}
|
||||
refresh: {{ .refreshToken }}
|
||||
{{ include "vehicle-common" . }}
|
||||
{{ include "common" . }}
|
||||
cache: {{ .cache }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -10,5 +10,5 @@ params:
|
|||
example: LPSVS...
|
||||
render: |
|
||||
type: polestar-grpc
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ params:
|
|||
- preset: vehicle-online
|
||||
render: |
|
||||
type: porsche
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,6 @@ params:
|
|||
advanced: true
|
||||
render: |
|
||||
type: renault
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
wakeupmode: {{ .wakeupmode }}
|
||||
|
|
|
|||
|
|
@ -35,5 +35,5 @@ params:
|
|||
render: |
|
||||
type: drivesomethinggreater
|
||||
brand: Cupra
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "vehicle-features" (merge (dict "basefeatures" (list "streaming")) .) }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" (merge (dict "basefeatures" (list "streaming")) .) }}
|
||||
|
|
|
|||
|
|
@ -37,5 +37,5 @@ params:
|
|||
render: |
|
||||
type: drivesomethinggreater
|
||||
brand: Seat
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "vehicle-features" (merge (dict "basefeatures" (list "streaming")) .) }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" (merge (dict "basefeatures" (list "streaming")) .) }}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,6 @@ params:
|
|||
- name: timeout
|
||||
render: |
|
||||
type: skoda
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "base" . }}
|
||||
timeout: {{ .timeout }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ params:
|
|||
- preset: vehicle-features
|
||||
render: |
|
||||
type: smart-hello
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -35,5 +35,5 @@ render: |
|
|||
tokens:
|
||||
access: {{ .accessToken }}
|
||||
refresh: {{ .refreshToken }}
|
||||
{{ include "vehicle-common" . }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "common" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -12,5 +12,5 @@ params:
|
|||
example: JF...
|
||||
render: |
|
||||
type: subaru
|
||||
{{ include "vehicle-base" . }}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "base" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ params:
|
|||
default: 30s
|
||||
render: |
|
||||
type: custom
|
||||
{{- include "vehicle-common" . }}
|
||||
{{- include "common" . }}
|
||||
chargeEnable:
|
||||
source: http
|
||||
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/command/{{`{{ if .chargeenable }}charge_start{{ else }}charge_stop{{ end }}`}}
|
||||
|
|
@ -86,4 +86,4 @@ render: |
|
|||
else "A" end)
|
||||
timeout: {{ .timeout }}
|
||||
cache: 1s
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -84,6 +84,6 @@ render: |
|
|||
refresh: {{ .refreshToken }}
|
||||
commandProxy: {{ .commandProxy }}
|
||||
proxyToken: {{ .proxyToken }}
|
||||
{{ include "vehicle-common" . }}
|
||||
{{ include "vehicle-features" (merge (dict "basefeatures" (list "coarsecurrent")) .) }}
|
||||
{{ include "common" . }}
|
||||
{{ include "features" (merge (dict "basefeatures" (list "coarsecurrent")) .) }}
|
||||
cache: {{ .cache }}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ params:
|
|||
advanced: true
|
||||
render: |
|
||||
type: custom
|
||||
{{- include "vehicle-common" . }}
|
||||
{{- include "common" . }}
|
||||
{{- define "teslafi_source" }}
|
||||
source: http
|
||||
uri: https://www.teslafi.com/feed.php?command=lastGood{{ if .vin }}&vin={{ .vin }}{{ end }}
|
||||
|
|
@ -44,4 +44,4 @@ render: |
|
|||
limitsoc:
|
||||
{{- include "teslafi_source" . | indent 2 }}
|
||||
jq: .charge_limit_soc
|
||||
{{ include "vehicle-features" (merge (dict "basefeatures" (list "coarsecurrent")) .) }}
|
||||
{{ include "features" (merge (dict "basefeatures" (list "coarsecurrent")) .) }}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ params:
|
|||
default: 5000
|
||||
render: |
|
||||
type: custom
|
||||
{{- include "vehicle-common" . }}
|
||||
{{- include "common" . }}
|
||||
soc: # battery soc (%)
|
||||
source: http
|
||||
uri: {{ .url }}:{{ .port }}/currentjson/{{ .id }}
|
||||
|
|
@ -66,4 +66,4 @@ render: |
|
|||
maxcurrent:
|
||||
source: http
|
||||
uri: {{ .url }}:{{ .port }}/command/{{ .id }}/set_charging_amps?${maxcurrent}
|
||||
{{ include "vehicle-features" . }}
|
||||
{{ include "features" . }}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ params:
|
|||
default: 720h # 30d
|
||||
render: |
|
||||
type: custom
|
||||
{{- include "vehicle-common" . }}
|
||||
{{- include "common" . }}
|
||||
soc:
|
||||
source: mqtt
|
||||
topic: teslamate/cars/{{ .id }}/usable_battery_level
|
||||
|
|
@ -69,4 +69,4 @@ render: |
|
|||
source: mqtt
|
||||
topic: teslamate/cars/{{ .id }}/is_preconditioning
|
||||
timeout: {{ .timeout }}
|
||||
{{ include "vehicle-features" (merge (dict "basefeatures" (list "coarsecurrent")) .) }}
|
||||
{{ include "features" (merge (dict "basefeatures" (list "coarsecurrent")) .) }}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ params:
|
|||
required: true
|
||||
render: |
|
||||
type: custom
|
||||
{{- include "vehicle-common" . }}
|
||||
{{- include "common" . }}
|
||||
soc: # battery state of charge (%)
|
||||
source: http
|
||||
uri: https://api.tessie.com/{{ .vin }}/state?use_cache=true
|
||||
|
|
@ -116,4 +116,4 @@ render: |
|
|||
headers:
|
||||
Authorization: Bearer {{ .token }}
|
||||
method: POST
|
||||
{{ include "vehicle-features" (merge (dict "basefeatures" (list "coarsecurrent")) .) }}
|
||||
{{ include "features" (merge (dict "basefeatures" (list "coarsecurrent")) .) }}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue