mlowijs / tesla_api

Lightweight Python API client for the Tesla API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to set vehicle charge limit

pascal876 opened this issue · comments

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

Hi! You are saying a call like vehicle.charge.set_charge_limit(95) does not work as expected?

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.