fl4p / batmon-ha

Add-on for Home Assistant to connect JK, JBD, Daly, ANT, SOK and Supervolt BMS via Bluetooth
MIT License
246 stars 53 forks source link

Algorithms not working for Jikong BMS #234

Open alexeyklots opened 2 weeks ago

alexeyklots commented 2 weeks ago

I tried to use Algorithms feature with JIKONG BMS But got an error

Paste log output between BEGIN and END:
15:00:24 INFO [algorithm] Max Soc reached, stop charging
15:00:24 ERROR [sampling] jk2 error (#1): BatterySwitches.__init__() got an unexpected keyword argument 'balance'
Traceback (most recent call last):
  File "/app/bmslib/sampling.py", line 155, in __call__
    s = await self._sample_inner()
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/bmslib/sampling.py", line 283, in _sample_inner
    BatterySwitches(**sample.switches), res)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: BatterySwitches.__init__() got an unexpected keyword argument 'balance'

Potentially related to the added Balance switch feature to Jikong bms

Thanks for such a great solution!