diff --git a/templates/definition/vehicle/ioBroker.bmw.yaml b/templates/definition/vehicle/ioBroker.bmw.yaml index e78db2de6..caed183b7 100644 --- a/templates/definition/vehicle/ioBroker.bmw.yaml +++ b/templates/definition/vehicle/ioBroker.bmw.yaml @@ -30,6 +30,8 @@ params: en: Instance ID advanced: true - preset: vehicle-features + - name: streaming + default: true render: | type: custom {{ include "vehicle-common" . }} @@ -62,5 +64,5 @@ render: | finishtime: source: http uri: {{ .uri }}/getPlainValue/bmw.{{ .id }}.{{ .vin }}.stream.vehicle.drivetrain.electricEngine.charging.timeRemaining.value?noStringify - jq: if . == null or . == 0 then null else (now + (. * 60) | strftime("%Y-%m-%dT%H:%M:%SZ")) end + jq: if (. == null) or (. == 0) or (type != "number") or (. < 0) then null else (now + (. * 60) | strftime("%Y-%m-%dT%H:%M:%SZ")) end {{ include "vehicle-features" . }}