jonasbkarlsson / ev_smart_charging

Electric vehicle smart charging for Home Assistant.
MIT License
169 stars 25 forks source link

Allow negative price limit #182

Closed janneho closed 1 year ago

janneho commented 1 year ago

Negative price limits not allowed. This change allows setting price limit between -10000 - 10000. I have tested this for couple of weeks without problems.

jonasbkarlsson commented 1 year ago

Thanks for the PR. I checked it and it has a conflict with one of the current behaviours of the intergration. In the documentation of number.ev_smart_charging_electricity_price_limit, it says Also if the price limit is set to zero, there will be no limitations.

With a negative price limit, it doesn't work (and doesn't make sense) to have that behaviour. So I need to remove that in order to be able to merge this PR.