krauskopf / node-red-contrib-car-bmw

Node-RED nodes for BMW ConnectedDrive
Other
11 stars 8 forks source link

Distances in miles instead of km #17

Closed oemlerm closed 2 years ago

oemlerm commented 2 years ago

It seems that the BMW API changed its defaulting. In the Response from the "List" node I get units in imperial format ("mi" instead of "km" and "gal" instead of "l"). It seems that only the "Status" element with its sub elements is affected, the "properties" element is still metric.

Example from msg.payload.status: {"lastUpdatedAt":"2022-06-14T06:14:51Z","currentMileage":{"mileage":4970,"units":"mi","formattedMileage":"4,970"}, ...}

Affected elements are:

I found a related issue and fix on https://github.com/bimmerconnected/bimmer_connected/pull/449

oemich commented 2 years ago

I created the PR #18 to fix this