Flobz: use uri instead of host/port (#7317) (#7505)

This commit is contained in:
mdkeil 2023-04-17 09:59:51 +02:00 • committed by GitHub
parent 6e1b3e3093
commit fceb2b6304
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View file

@ -5,8 +5,13 @@ products:
generic: PSA Car Controller (flobz)
params:
- name: title
- name: url
required: true
example: http://192.0.2.2
- name: host
deprecated: true
- name: port
deprecated: true
- name: vin
required: true
help:
@ -56,5 +61,9 @@ render: |
jq: .preconditionning.air_conditioning.status != "Disabled"
{{- define "source" }}
source: http
{{- if .host }}
uri: http://{{ .host }}{{ if .port }}:{{ .port }}{{ end }}/get_vehicleinfo/{{ .vin }}?from_cache=1
{{- else }}
uri: {{ trimSuffix "/" .url }}/get_vehicleinfo/{{ .vin }}?from_cache=1
{{- end }}
{{- end }}

View file

@ -6,16 +6,14 @@ render:
type: template
template: flobz
title: # Wird in der Benutzeroberfläche angezeigt (Optional)
host: 192.0.2.2 # IP-Adresse oder Hostname
port: # Port (Optional)
url: http://192.0.2.2
vin: W... # Erforderlich
capacity: 50 # Akkukapazität in kWh (Optional)
advanced: |
type: template
template: flobz
title: # Wird in der Benutzeroberfläche angezeigt (Optional)
host: 192.0.2.2 # IP-Adresse oder Hostname
port: # Port (Optional)
url: http://192.0.2.2
vin: W... # Erforderlich
capacity: 50 # Akkukapazität in kWh (Optional)
phases: 3 # Die maximale Anzahl der Phasen welche genutzt werden können (Optional)