Tesla controlled charge rate based on power sensor

Has Tesla closed access to the home assistant ? Or has this been solved? I can’t find any discussions on this on reddit for example.

Background: I was looking for a solution of this type to charge my two-week Tesla (used but new to me) and just discovered home assistant, IamMeter and this blueprint. I was just about to buy an IAMMETER with the intent to try to make it work with your script. I hope this is solved or was not an issue…

Hey @Enquirer0566, thanks for posting.
The automation uses the Tesla car API at the moment, not the wall connector currently (which is what @PsychoMnts is referring to) and that is working fine for me. So I don’t believe there are any issues at the moment.
If you haven’t already, you can check the Tesla integration by connecting your car to HA using the HACS Tesla integration. Check you can change the charging amps via the integration.

Actually no, I cannot change the amps of the tesla itself using the HACS intergration.

Maybe check if anyone else is having the same problem and raise an issue here. GitHub - alandtse/tesla: Tesla custom integration for Home Assistant. This requires a refresh token be generated by third-party apps to login.

I am in a similar situation. I recently buy a new Tesla and a Wall connector, but I couldn’t figure out why it’s not working. Then, I came across this information on
Tesla Fleet API ( 2023-11-17 )

It appears that we need to utilize the “vehicle API” (GitHub - teslamotors/vehicle-command) and register as a developer. However, even with that, it seems quite complex for such a straightforward task, like reducing charging amps.

Thanks @DataBitz for a great Blueprint!

I can confirm that the Tesla car API is working fine as of January 9. I am using the token and not the username/password login to the Tesla custom integration.

I have a Tesla Wallbox gen 3 and wanted to implement load balancing based on the numbers of amps rather than power. I also have a 3-phase connection. My fork https://gist.github.com/Alvinger/acd26922158af0391bd90fe5a1396466 requires a max/min sensor containing the max single phase amps of the three phases. If you only use one phase you can use the phase’s current sensor directly.

The blueprint will start decreasing the number of charging amps by 1 as long as the higher threshold is reached. If the charging amps reach the lower threshold it will start to increase the number of charging amps by 1. If the number of amps exceeds the max number of amps the charging amps will immediately be set to the minimum amps level. This aims to keep the number of amps as close as possible to the upper threshold while not exceeding the max limit.

It seems that Tesla is closing down the API but not for everyone.
Maybe it depends where you live? I’m in The Netherlands.

I’m pretty sure the API worked fine before 1st of Januari.

EDIT:

The API works again. Didn’t change anything. Just noticed that the charging amps dropped suddenly.

1 Like

I’ve just had the original API shutdown for me too, I am in New Zealand. I can still read settings from the car but cannot change anything via the Tesla custom integration for HA.
The Tesla custom integration that this blueprint depends on, can still function but requires a Fleet API proxy and something to host that on and be accessible by Tesla (via internet).
alandtse/tesla: Tesla custom integration for Home Assistant. This requires a refresh token be generated by third-party apps to login. (github.com)

Hello, I had my API switched to the new Fleet API and I have made the necessary changes to make the Tesla integration work again. However, it seems I have problems with this blueprint. It’s throwing me an Error: TeslaException at the last step of the automation (Increase charging rate by 1 amp).

Any ideas why? How can I solve it?

EDIT: found this teslajsonpy.exceptions.TeslaException: HTTP 406: not_a_JSON_request · Issue #231 · alandtse/tesla · GitHub now trying to understand what to do about it.

EDIT 2: found this issue is posted in the HACS integration Setting the car current charge rate (with fleet mode) throws an exception · Issue #973 · alandtse/tesla · GitHub

Thanks for checking into this.
Unfortunately, I haven’t been able to get the Fleet API working yet myself to test.

hi I reopen this thread, I’m using Shelly EM for power output, maximum power not over 6,6 kw. How do I indicate in the BP 6000 or 6? The Bp works but I’m not able to change amp in the Tesla from home assistant. Last question how do I set second sensor? Thanks

The Shelly EM I think gives values in kW, to double check go into Developer tools\States and search for the sensor your using with the blueprint. So you would use 6.

If you have the HACS Tesla integration and if you go directly to the Tesla’s device page and cannot change the charge rate, then unfortunately this is because Tesla have changed access to there API’s. You’ll need to look at moving to the new Fleet API.

Power Sensor 2 can be used to point at either the same sensor as Power Sensor 1 but with a higher value. i.e. 8kW, or if you have an additional sensor from another high-load device like a clothes dryer or kitchen oven set to that device’s sensor and an appropriate value like 2kW. The only purpose of this is to provide an additional trigger to quickly knock back the charging rate.