syssi / esphome-jk-bms

ESPHome component to monitor and control a Jikong Battery Management System (JK-BMS) via UART-TTL or BLE
Apache License 2.0
442 stars 148 forks source link

Increase precision of temperature measurements #298

Closed octal-ip closed 1 year ago

octal-ip commented 1 year ago

In _jk_bmsble/sensor.py, accuracy_decimals is set to 0 for all temperature sensors (see lines 613, 620, 627).

However the true accuracy can be 1 decimal place, as defined in _jk_bms_ble/jk_bmsble.cpp (see lines 581, 584 and 592).

I recommend altering _CONF_TEMPERATURE_SENSOR1, _CONF_TEMPERATURE_SENSOR2 and _CONF_POWER_TUBETEMPERATURE to use accuracy_decimals=1.

syssi commented 1 year ago

Good catch! I will prepare a fix!

octal-ip commented 1 year ago

Thank you, is there any way I can donate as a token of appreciation for your work?

syssi commented 1 year ago

There is a buy me a coffee button on the top right corner of the README. Thanks in advance!