Unable to set vehicle charge limit
pascal876 opened this issue · 4 comments
pascal876 commented
Many thanks for your work with this project
I have an issue with using set_charge_limit(percentage) in class Charge:
Whenever value provided between 50-100, the vehicle is set to 50%, but no error is returned.
I would like to set the vehicle for example to 95%
Does it work for you or is there an issue?
Many thanks in advance for your help
mlowijs commented
Hi! You are saying a call like vehicle.charge.set_charge_limit(95)
does not work as expected?
pascal876 commented
Hi Michiel,
Yes, if i do vehicle.charge.set_charge_limit(95), the car is set to 50% !
Kind regards,
Pascal
mlowijs commented
Hi! I just ran the following code:
import asyncio
from tesla_api import TeslaApiClient
async def main():
client = TeslaApiClient("my@email.com", "my@password.com")
for v in await client.list_vehicles():
await v.charge.set_charge_limit(80)
asyncio.run(main())
And that works fine.
This is with Python 3.8 and the tesla_api 2.0.0 package.
pascal876 commented
Hi Michiel,
Yes, many thanks: it works now!