diff --git a/README.md b/README.md index 1d2efc5..0fd2def 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ esphome run esp32-ble-example.yaml [11:50:17][D][binary_sensor:036]: 'daly-bms-ble balancing': Sending state ON [11:50:17][D][binary_sensor:036]: 'daly-bms-ble charging': Sending state OFF [11:50:17][D][binary_sensor:036]: 'daly-bms-ble discharging': Sending state ON -[D][sensor:094]: 'daly-bms-ble delta cell voltage': Sending state 0.02040 V with 4 decimals of accuracy +[D][sensor:094]: 'daly-bms-ble delta cell voltage': Sending state 0.204 V with 3 decimals of accuracy [D][sensor:094]: 'daly-bms-ble power': Sending state 0.00000 W with 0 decimals of accuracy [D][sensor:094]: 'daly-bms-ble charging power': Sending state 0.00000 W with 0 decimals of accuracy [D][sensor:094]: 'daly-bms-ble discharging power': Sending state 0.00000 W with 0 decimals of accuracy diff --git a/components/daly_bms_ble/daly_bms_ble.cpp b/components/daly_bms_ble/daly_bms_ble.cpp index cce68f6..c7e3479 100644 --- a/components/daly_bms_ble/daly_bms_ble.cpp +++ b/components/daly_bms_ble/daly_bms_ble.cpp @@ -281,7 +281,7 @@ void DalyBmsBle::decode_status_data_(const std::vector &data) { ESP_LOGV(TAG, "Average cell voltage: %.3f V", daly_get_16bit(113) * 0.001f); // 115 2 0x01 0x41 Delta cell voltage - this->publish_state_(this->delta_cell_voltage_sensor_, daly_get_16bit(115) * 0.0001f); + this->publish_state_(this->delta_cell_voltage_sensor_, daly_get_16bit(115) * 0.001f); // 117 2 0x00 0x2A Power float power = daly_get_16bit(117) * 1.0f; diff --git a/components/daly_bms_ble/sensor.py b/components/daly_bms_ble/sensor.py index ab014d3..0e33708 100644 --- a/components/daly_bms_ble/sensor.py +++ b/components/daly_bms_ble/sensor.py @@ -224,7 +224,7 @@ cv.Optional(CONF_DELTA_CELL_VOLTAGE): sensor.sensor_schema( unit_of_measurement=UNIT_VOLT, icon=ICON_EMPTY, - accuracy_decimals=4, + accuracy_decimals=3, device_class=DEVICE_CLASS_VOLTAGE, state_class=STATE_CLASS_MEASUREMENT, ),