hacf-fr / renault-api

https://readthedocs.org/projects/renault-api/
MIT License
109 stars 38 forks source link

Display range and total mileage in miles with en_GB locale set #186

Open TheBluProject opened 3 years ago

TheBluProject commented 3 years ago

With locale en_GB set, Range estimate and Total mileage still displaying in kilometers

epenet commented 3 years ago

It shouldn't be based on locale, but should be an independent option. I'm open to PR...

You can take a look at https://github.com/hacf-fr/renault-api/blob/main/src/renault_api/cli/__main__.py#L150 for adding options to CLI. And you can take a look at https://github.com/hacf-fr/renault-api/blob/main/src/renault_api/cli/renault_vehicle.py#L25 for retrieving an option (I'm not sure it's necessary to prompt - probably just default back to km if it isn't set)