Skip to content

Commit

Permalink
Templates: add vehicle-identify for Tronity, EVNotify (evcc-io#7831)
Browse files Browse the repository at this point in the history
  • Loading branch information
andig authored May 5, 2023
1 parent a46ac0e commit 27f0a14
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
5 changes: 3 additions & 2 deletions templates/definition/vehicle/evnotify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ params:
- preset: vehicle-identify
render: |
type: custom
{{- if ne .title "" }}
{{- if .title }}
title: {{ .title }}
{{- end }}
capacity: {{ .capacity }}
{{- if ne .phases "" }}
{{- if .phases }}
phases: {{ .phases }}
{{- end }}
soc:
source: http
uri: https://app.evnotify.de/soc?akey={{ .akey }}&token={{ .token }} # evNotify Server + AKEY
method: GET
jq: .soc_display
{{ include "vehicle-identify" . }}
3 changes: 2 additions & 1 deletion templates/definition/vehicle/niu-e-scooter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ params:
- preset: vehicle-identify
render: |
type: niu
{{- if ne .title "" }}
{{- if .title }}
title: {{ .title }}
{{- end }}
{{- if ne .icon "" }}
Expand All @@ -33,3 +33,4 @@ render: |
password: {{ .password }} # NIU app password
serial: {{ .serial }} # NIU E-Scooter serial number like shown in app
capacity: {{ .capacity }}
{{ include "vehicle-identify" . }}
4 changes: 2 additions & 2 deletions templates/definition/vehicle/offline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ params:
render: |
type: custom
features: ["offline"]
{{- if ne .title "" }}
{{- if .title }}
title: {{ .title }}
{{- end }}
{{- if ne .icon "" }}
icon: {{ .icon }}
{{- end }}
capacity: {{ .capacity }} # kWh
{{- if ne .phases "" }}
{{- if .phases }}
phases: {{ .phases }}
{{- end }}
soc: # fixed - no Soc available
Expand Down
4 changes: 2 additions & 2 deletions templates/definition/vehicle/ovms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ params:
- preset: vehicle-identify
render: |
type: ovms
{{- if ne .title "" }}
{{- if .title }}
title: {{ .title }}
{{- end }}
{{- if ne .icon "" }}
Expand All @@ -36,7 +36,7 @@ render: |
password: {{ .password }}
vehicleid: {{ .vehicleid }} # vehicle id
capacity: {{ .capacity }}
{{- if ne .phases "" }}
{{- if .phases }}
phases: {{ .phases }}
{{- end }}
server: dexters-web.de # used ovms server [dexters-web.de or api.openvehicles.com]
Expand Down
4 changes: 2 additions & 2 deletions templates/definition/vehicle/tesla.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ params:
- preset: vehicle-identify
render: |
type: tesla
{{- if ne .title "" }}
{{- if .title }}
title: {{ .title }}
{{- end }}
{{- if ne .icon "" }}
Expand All @@ -50,7 +50,7 @@ render: |
access: {{ .accessToken }}
refresh: {{ .refreshToken }}
capacity: {{ .capacity }}
{{- if ne .phases "" }}
{{- if .phases }}
phases: {{ .phases }}
{{- end }}
{{- if ne .vin "" }}
Expand Down
5 changes: 3 additions & 2 deletions templates/definition/vehicle/tronity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ params:
- preset: vehicle-identify
render: |
type: tronity
{{- if ne .title "" }}
{{- if .title }}
title: {{ .title }}
{{- end }}
{{- if ne .icon "" }}
Expand All @@ -33,9 +33,10 @@ render: |
id: {{ .user }}
secret: {{ .password }}
capacity: {{ .capacity }}
{{- if ne .phases "" }}
{{- if .phases }}
phases: {{ .phases }}
{{- end }}
{{- if ne .vin "" }}
vin: {{ .vin }}
{{- end }}
{{ include "vehicle-identify" . }}

0 comments on commit 27f0a14

Please sign in to comment.