Closed carrel-gr closed 5 months ago
This conversion must stop... it is handle by HA core, this is just duplication of efforts and is error prone.
Only one of the properties should be read and the other completely ignored
How does one properly use the core to convert between metric and non-metric? Odometer seems to be read as meters, most other distances are kilometers, and the efficiency is in kWh/100km which there doesn't seem to be a native unit for. I'll happily try to help convert things to "the right way". I'll look for some examples. Can you point me at one?
This conversion must stop... it is handle by HA core, this is just duplication of efforts and is error prone.
Only one of the properties should be read and the other completely ignored
Similar to temperature:
https://developers.home-assistant.io/blog/2021/08/12/sensor_temperature_conversion
Properties must be set:
native_value
, native_unit_of_measurement
and device_class SensorDeviceClass.DISTANCE
no worries, i've already something ready for this. I'll commit them soon
i still need to test, but this should fix the non-metric issue
Fixes #76