Skip to content

Commit

Permalink
Add TeslaLogger vehicle (#13046)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adminius authored Mar 25, 2024
1 parent 55aa5f5 commit d47f97d
Showing 1 changed file with 84 additions and 0 deletions.
84 changes: 84 additions & 0 deletions templates/definition/vehicle/teslalogger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
template: teslalogger
products:
- description:
generic: TeslaLogger
group: generic
requirements:
description:
de: Open Source Tesla Datenlogger https://github.com/bassmaster187/TeslaLogger
en: Open source Tesla data logger https://github.com/bassmaster187/TeslaLogger
params:
- name: title
- name: id
description:
de: TeslaLogger CarID
en: TeslaLogger CarID
default: 1
- name: url
required: true
example: http://192.0.2.2
- name: port
example: 5000
default: 5000
- name: capacity
- name: phases
advanced: true
- name: icon
default: car
advanced: true
- preset: vehicle-identify

render: |
type: custom
{{- if .title }}
title: {{ .title }}
{{- end }}
{{- if .icon }}
icon: {{ .icon }}
{{- end }}
{{- if .capacity }}
capacity: {{ .capacity }}
{{- end }}
{{- if .phases }}
phases: {{ .phases }}
{{- end }}
{{- include "vehicle-identify" . }}
soc: # battery soc (%)
source: http
uri: {{ .url }}:{{ .port }}/currentjson/{{ .id }}
jq: .battery_level
status:
source: combined
plugged:
source: http
uri: {{ .url }}:{{ .port }}/currentjson/{{ .id }}
jq: .plugged_in
charging:
source: http
uri: {{ .url }}:{{ .port }}/currentjson/{{ .id }}
jq: .charging
range:
source: http
uri: {{ .url }}:{{ .port }}/currentjson/{{ .id }}
jq: .battery_range_km
odometer:
source: http
uri: {{ .url }}:{{ .port }}/currentjson/{{ .id }}
jq: .odometer
climater:
source: http
uri: {{ .url }}:{{ .port }}/currentjson/{{ .id }}
jq: .is_preconditioning
getMaxCurrent:
source: http
uri: {{ .url }}:{{ .port }}/currentjson/{{ .id }}
jq: .charge_current_request
wakeup:
source: http
uri: {{ .url }}:{{ .port }}/command/{{ .id }}/wake_up
chargeEnable:
source: http
uri: {{ .url }}:{{ .port }}/command/{{ .id }}/charge_start_stop?${enable}
maxcurrent:
source: http
uri: {{ .url }}:{{ .port }}/command/{{ .id }}/set_charging_amps?${maxcurrent}

0 comments on commit d47f97d

Please sign in to comment.