From 5ce51ec98f7afe80d2af0e74faeb2eeab70d63a5 Mon Sep 17 00:00:00 2001 From: andig Date: Sun, 24 Nov 2024 12:36:13 +0100 Subject: [PATCH 1/3] Add ioBroker.bmw adapter --- .../definition/vehicle/ioBroker.bmw.yaml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 templates/definition/vehicle/ioBroker.bmw.yaml diff --git a/templates/definition/vehicle/ioBroker.bmw.yaml b/templates/definition/vehicle/ioBroker.bmw.yaml new file mode 100644 index 0000000000..2ea0b3fd03 --- /dev/null +++ b/templates/definition/vehicle/ioBroker.bmw.yaml @@ -0,0 +1,64 @@ +template: ioBroker.bmw +products: + - brand: ioBroker.bmw +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 }} From ad21b3316593553a3312a927e1f4c56efffeea4b Mon Sep 17 00:00:00 2001 From: andig Date: Mon, 25 Nov 2024 10:29:42 +0100 Subject: [PATCH 2/3] Update templates/definition/vehicle/ioBroker.bmw.yaml Co-authored-by: Michael Geers --- templates/definition/vehicle/ioBroker.bmw.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/definition/vehicle/ioBroker.bmw.yaml b/templates/definition/vehicle/ioBroker.bmw.yaml index 2ea0b3fd03..183b557eb4 100644 --- a/templates/definition/vehicle/ioBroker.bmw.yaml +++ b/templates/definition/vehicle/ioBroker.bmw.yaml @@ -1,6 +1,7 @@ template: ioBroker.bmw products: - brand: ioBroker.bmw +group: generic requirements: description: en: ioBroker BMW Adapter. Requires ioBroker.bmw and ioBroker.simple-api From 58031796d3976b2b09d3049a9cb30e91d86fee80 Mon Sep 17 00:00:00 2001 From: andig Date: Mon, 25 Nov 2024 10:30:47 +0100 Subject: [PATCH 3/3] Update templates/definition/vehicle/ioBroker.bmw.yaml Co-authored-by: Michael Geers --- templates/definition/vehicle/ioBroker.bmw.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/definition/vehicle/ioBroker.bmw.yaml b/templates/definition/vehicle/ioBroker.bmw.yaml index 183b557eb4..97cdfcefdc 100644 --- a/templates/definition/vehicle/ioBroker.bmw.yaml +++ b/templates/definition/vehicle/ioBroker.bmw.yaml @@ -1,6 +1,7 @@ template: ioBroker.bmw products: - - brand: ioBroker.bmw + - description: + generic: ioBroker.bmw group: generic requirements: description: