diff --git a/templates/definition/vehicle/flobz.yaml b/templates/definition/vehicle/flobz.yaml index 91c10fcbd..9fba23211 100644 --- a/templates/definition/vehicle/flobz.yaml +++ b/templates/definition/vehicle/flobz.yaml @@ -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 }} diff --git a/templates/docs/vehicle/flobz_0.yaml b/templates/docs/vehicle/flobz_0.yaml index a1c76dc2c..15ced0421 100644 --- a/templates/docs/vehicle/flobz_0.yaml +++ b/templates/docs/vehicle/flobz_0.yaml @@ -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)