flashg1 / TeslaSolarCharger

Home Assistant Blueprint to charge Tesla car using surplus solar electricity and weather forecast.
MIT License
14 stars 5 forks source link

Qeustion about script #19

Open gjaegy opened 5 months ago

gjaegy commented 5 months ago

Hi, thanks a lot for the script, I've downloaded it this morning and it seems to work pretty well !

I had a quick look at the code, and I have a question regarding the way the charging amps value is modified. Why is that done in a loop (i.e. gradually), in 1A increment, rather than in one shot ? Is there any benefit in doing this ?

I wonder because this means more commands sent through the Tesla API, doesn't it ?

Possibly I've misread the script, I'm not familiar with YAML yet, so forgive me if the question is stupid ;)

Thanks again for sharing your effort.

flashg1 commented 5 months ago

Well spotted. You are right about 1A increment and decrement.

I am not an electrical engineer, but I believe a gentle ramp up or down the current is better for the power circuits than a sudden change of current.

Yes, it will take more api calls for the 1A increment/decrement.

May be someone with expertise in this area can comment on whether this is necessary or not.

gjaegy commented 5 months ago

I see, I must admit I have no idea what is the best way to ramp up or down the charging current with regards to the electrical system.

It would be intersting to know what are the advantages of that method, I have no knowledge about that. On that topic, I also wondered whether changing the current so frequently has any impact on the battery or BMS or car, or not, no clue about that either.