evcc-io/templates/definition/vehicle/evnotify.yaml

48 lines
1.2 KiB
YAML

template: evnotify
products:
- description:
generic: evNotify
group: generic
params:
- name: akey
required: true
description:
generic: API Key
- name: token
required: true
- name: apiversion
type: choice
choice: ["2", "3"]
default: "2"
description:
en: API version
de: API-Version
- preset: vehicle-common
- preset: vehicle-online
render: |
type: custom
{{ include "common" . }}
{{- if eq .apiversion "3" }}
soc:
source: http
uri: https://api.evnotify.de/logs/{{ urlEncode .akey }}/last-sync
headers:
Authorization: {{ .akey }} {{ .token }}
jq: .socDisplay
{{- else }}
soc:
source: http
uri: https://app.evnotify.de/soc?akey={{ urlEncode .akey }}&token={{ urlEncode .token }}
jq: .soc_display
status:
source: combined
plugged:
source: http
uri: https://app.evnotify.de/extended?akey={{ urlEncode .akey }}&token={{ urlEncode .token }}
jq: .normal_charge_port
charging:
source: http
uri: https://app.evnotify.de/extended?akey={{ urlEncode .akey }}&token={{ urlEncode .token }}
jq: .charging
{{- end }}
{{ include "features" . }}