diff --git a/templates/definition/vehicle/ioBroker.bmw.yaml b/templates/definition/vehicle/ioBroker.bmw.yaml new file mode 100644 index 0000000000..97cdfcefdc --- /dev/null +++ b/templates/definition/vehicle/ioBroker.bmw.yaml @@ -0,0 +1,66 @@ +template: ioBroker.bmw +products: + - description: + generic: ioBroker.bmw +group: generic +requirements: + description: + en: ioBroker BMW Adapter. Requires ioBroker.bmw and ioBroker.simple-api + de: ioBroker BMW Adapter. Benötigt ioBroker.bmw und ioBroker.simple-api +params: + - name: title + - name: icon + default: car + advanced: true + - name: capacity + type: float + - name: phases + advanced: true + - name: vin + example: WBMW... + - preset: vehicle-identify + - name: uri + help: + generic: ioBroker URL + - name: id + default: 0 + type: number + help: + de: Instanz-ID + en: Instance ID + advanced: true + - name: coarsecurrent + advanced: true + - name: welcomecharge + advanced: true +render: | + type: custom + {{ include "vehicle-common" . }} + {{ include "vehicle-identify" . }} + soc: + source: http + uri: {{ .uri }}/getPlainValue/bmw.{{ .id }}.{{ .vin }}.state.electricChargingState.chargingLevelPercent + status: + source: combined + plugged: + source: http + uri: {{ .uri }}/getPlainValue/bmw.{{ .id }}.{{ .vin }}.state.electricChargingState.isChargerConnected + charging: + source: http + uri: {{ .uri }}/getPlainValue/bmw.{{ .id }}.{{ .vin }}.state.electricChargingState.chargingStatus + jq: '. == "CHARGING"' + range: + source: http + uri: {{ .uri }}/getPlainValue/bmw.{{ .id }}.{{ .vin }}.state.electricChargingState.range + odometer: + source: http + uri: {{ .uri }}/getPlainValue/bmw.{{ .id }}.{{ .vin }}.state.currentMileage + {{- if or (eq .coarsecurrent "true") (eq .welcomecharge "true") }} + features: + {{- if eq .coarsecurrent "true" }} + - coarsecurrent + {{- end }} + {{- if eq .welcomecharge "true" }} + - welcomecharge + {{- end }} + {{- end }}