Skip to content

Commit 4fcb8b5

Browse files
committed
fixed current, cycle charge
1 parent f3aa0fc commit 4fcb8b5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

custom_components/bms_ble/plugins/seplos_v2_bms.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ class BMS(BaseBMS):
4646
list[tuple[str, int, int, int, bool, Callable[[int], int | float]]]
4747
] = [
4848
(ATTR_VOLTAGE, 0x61, 2, 2, False, lambda x: float(x / 100)),
49-
(ATTR_CURRENT, 0x61, 0, 2, True, lambda x: float(x / 10)),
50-
(ATTR_CYCLE_CHRG, 0x61, 4, 2, False, lambda x: float(x / 10)),
49+
(ATTR_CURRENT, 0x61, 0, 2, True, lambda x: float(x / 100)), # /10 for 0x62
50+
(ATTR_CYCLE_CHRG, 0x61, 4, 2, False, lambda x: float(x / 100)), # /10 for 0x62
5151
(ATTR_CYCLES, 0x61, 13, 2, False, lambda x: x),
5252
(ATTR_BATTERY_LEVEL, 0x61, 9, 2, False, lambda x: float(x / 10)),
5353
] # Protocol Seplos V2 (parallel data 0x62, device manufacturer info 0x51)

tests/test_seplos_v2_bms.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ async def test_update(monkeypatch, reconnect_fixture) -> None:
103103
"cell_count": 16,
104104
"temp_sensors": 6,
105105
"voltage": 53.0,
106-
"current": 68.5,
106+
"current": 6.85,
107107
"battery_level": 51.4,
108-
"cycle_charge": 1439.4,
108+
"cycle_charge": 143.94,
109109
"cycles": 128,
110110
"temperature": 23.6,
111-
"cycle_capacity": 76288.2,
112-
"power": 3630.5,
111+
"cycle_capacity": 7628.82,
112+
"power": 363.05,
113113
"battery_charging": True,
114114
"cell#0": 3.312,
115115
"cell#1": 3.313,

0 commit comments

Comments
 (0)