marq24 / ha-evcc

Home Assistant integration for evcc☀️🚘- optimized charging of electric vehicles, connecting your EV charger with your PV system. The integration use local polling (interval configurable) of the evcc API. Please note, that this integration is not official and not supported by the evcc developers. This project is not affiliated with evcc in any way.
Apache License 2.0
67 stars 3 forks source link

Increase precision of the smart cost limit #16

Closed JonisK closed 2 months ago

JonisK commented 2 months ago

Description

If the user sets a smart cost limit, evcc will suggest prices with an interval of 0.005€/kWh in most cases. Currently, the integration rounds to cents with the call round(float(value), 2). it would be great if you could increase the number of decimals to at least 3 so Home Assistant can track whether evcc wants to charge based on the cost limit.

I guess you would need to edit the two occurences of round(float(value), 2) in number.py but might overlook something here.

Btw, thank you very much for creating this integration!

API Keys

No response

marq24 commented 2 months ago

@JonisK can this issue be closed?

JonisK commented 2 months ago

Oh yes, absolutely. Thank you for implementing it so quickly. Didn’t know it was my turn to close :)