Estimation of electric car consumption (E.g. Renault Zoe)

Hello,
In order to have a robust sensor, and a simplier way, I have written a custom_component :
https://github.com/jugla/battery_consumption