dannerph / keba-kecontact

Python library for controlling KEBA charging stations.
MIT License
23 stars 10 forks source link

Separating curr and currtime #5

Closed tpulatha closed 1 year ago

tpulatha commented 2 years ago

Wouldn't it make sense to separate the usage of curr and currtime? In the end, what you do with curr is set the limit of the Wallbox basically forever. But in most cases, if you for example want to charge your car based on solar production, you probably only want to set the current for the ongoing charging session and have it reset for the next. (Which is what currtime does).

As far as I can see in the current implementation it uses currtime if a delay is given. But a delay argument is basically never passed, so it always uses curr.

dannerph commented 1 year ago

It seems that the KEBA P20 does not work with currtime (according to the older version of the udp programmers guide). I fixed this behaviour in the latest release but I am not able to test it.

I added a new method to directly ues curr instead of currtime, which is no the default for set_current, if the charging station is not a P20.

tpulatha commented 1 year ago

awesome, thx!