Tesla BLE: add caching (#26861)
Some checks failed
Some checks failed
This commit is contained in:
parent
6bf8b46f2a
commit
479e5c361f
1 changed files with 12 additions and 5 deletions
|
|
@ -27,6 +27,8 @@ params:
|
||||||
help:
|
help:
|
||||||
de: Port des Tesla BLE HTTP Proxy
|
de: Port des Tesla BLE HTTP Proxy
|
||||||
en: Port of the Tesla BLE HTTP Proxy
|
en: Port of the Tesla BLE HTTP Proxy
|
||||||
|
- name: timeout
|
||||||
|
default: 30s
|
||||||
render: |
|
render: |
|
||||||
type: custom
|
type: custom
|
||||||
{{- include "vehicle-common" . }}
|
{{- include "vehicle-common" . }}
|
||||||
|
|
@ -47,23 +49,27 @@ render: |
|
||||||
source: http
|
source: http
|
||||||
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/vehicle_data?endpoints=charge_state
|
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/vehicle_data?endpoints=charge_state
|
||||||
jq: .response.response.charge_state.battery_level
|
jq: .response.response.charge_state.battery_level
|
||||||
timeout: 30s
|
timeout: {{ .timeout }}
|
||||||
|
cache: 1s
|
||||||
getmaxcurrent:
|
getmaxcurrent:
|
||||||
source: http
|
source: http
|
||||||
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/vehicle_data?endpoints=charge_state
|
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/vehicle_data?endpoints=charge_state
|
||||||
jq: .response.response.charge_state.charge_amps
|
jq: .response.response.charge_state.charge_amps
|
||||||
timeout: 30s
|
timeout: {{ .timeout }}
|
||||||
|
cache: 1s
|
||||||
limitsoc:
|
limitsoc:
|
||||||
source: http
|
source: http
|
||||||
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/vehicle_data?endpoints=charge_state
|
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/vehicle_data?endpoints=charge_state
|
||||||
jq: .response.response.charge_state.charge_limit_soc
|
jq: .response.response.charge_state.charge_limit_soc
|
||||||
timeout: 30s
|
timeout: {{ .timeout }}
|
||||||
|
cache: 1s
|
||||||
range:
|
range:
|
||||||
source: http
|
source: http
|
||||||
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/vehicle_data?endpoints=charge_state
|
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/vehicle_data?endpoints=charge_state
|
||||||
jq: .response.response.charge_state.battery_range
|
jq: .response.response.charge_state.battery_range
|
||||||
scale: 1.60934
|
scale: 1.60934
|
||||||
timeout: 30s
|
timeout: {{ .timeout }}
|
||||||
|
cache: 1s
|
||||||
status:
|
status:
|
||||||
source: http
|
source: http
|
||||||
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/vehicle_data?endpoints=charge_state
|
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 == "NoPower") then "B"
|
||||||
elif (.response.response.charge_state.charging_state == "Complete") then "B"
|
elif (.response.response.charge_state.charging_state == "Complete") then "B"
|
||||||
else "A" end)
|
else "A" end)
|
||||||
timeout: 30s
|
timeout: {{ .timeout }}
|
||||||
|
cache: 1s
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue