Tesla BLE: add caching (#26861)
Some checks failed
Release / call-build-workflow (push) Has been cancelled
Release / Publish Docker :release (push) Has been cancelled
Release / Github & APT (push) Has been cancelled
Release / Demo (push) Has been cancelled
Release / Hassio Addon (push) Has been cancelled

This commit is contained in:
andig 2026-01-21 12:11:59 +01:00 • committed by GitHub
parent 6bf8b46f2a
commit 479e5c361f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,6 +27,8 @@ params:
help:
de: Port des Tesla BLE HTTP Proxy
en: Port of the Tesla BLE HTTP Proxy
- name: timeout
default: 30s
render: |
type: custom
{{- include "vehicle-common" . }}
@ -47,23 +49,27 @@ render: |
source: http
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/vehicle_data?endpoints=charge_state
jq: .response.response.charge_state.battery_level
timeout: 30s
timeout: {{ .timeout }}
cache: 1s
getmaxcurrent:
source: http
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/vehicle_data?endpoints=charge_state
jq: .response.response.charge_state.charge_amps
timeout: 30s
timeout: {{ .timeout }}
cache: 1s
limitsoc:
source: http
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/vehicle_data?endpoints=charge_state
jq: .response.response.charge_state.charge_limit_soc
timeout: 30s
timeout: {{ .timeout }}
cache: 1s
range:
source: http
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/vehicle_data?endpoints=charge_state
jq: .response.response.charge_state.battery_range
scale: 1.60934
timeout: 30s
timeout: {{ .timeout }}
cache: 1s
status:
source: http
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/vehicle_data?endpoints=charge_state
@ -73,4 +79,5 @@ render: |
elif (.response.response.charge_state.charging_state == "NoPower") then "B"
elif (.response.response.charge_state.charging_state == "Complete") then "B"
else "A" end)
timeout: 30s
timeout: {{ .timeout }}
cache: 1s