tesla icon indicating copy to clipboard operation
tesla copied to clipboard

Car won't start charging when recently charged

Open iancg opened this issue 1 year ago • 3 comments

Version of the custom_component

v3.11.0

Configuration

service: switch.turn_on
data: {}
target:
  entity_id: switch.tesla_charger

Describe the bug

When the car has previously charged to the charge limit, but vampire drain means the current SoC is below the charge limit the car may refuse to start charging (you can see this in the app when the Start Charge button is not present - changing the Max SoC to 100 then back to the previous level causes the Start Charge button to appear).

I think the ideal fix would be to expose whether the Start Charge button is available as a separate sensor (sensor._charging_available?)- otherwise automations can repeatedly attempt to start the charging process only for it to do nothing other than keep the car awake (which makes the vampire drain worse).

Debug log

Interestingly, while turning it off while it isn't on causes an error, turning it on when it refuses to turn on appears to be silent

2023-04-20 05:00:05.548 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall switch.turn_off (*************): entity_id=['switch.tesla_charger']>

iancg avatar Apr 20 '23 10:04 iancg

We don't control this. If the Tesla API isn't letting you charge after hitting the limit, then it's something to raise with Tesla. All we're doing is passing the endpoint commands to Tesla.

That said I'll merge a workaround PR, but this should really be fixed by Tesla.

alandtse avatar Apr 20 '23 15:04 alandtse

So the API doesn't expose if the "start charging" button should be displayed in the app or not? I assumed it would rather than being some heuristic in the app.

My workaround has been to either wait until the car is at least 4% below the target state of charge or ( sensor.tesla_enery_added is 0 and SoC is below target SoC). The 4% was from empirical observation.

iancg avatar Apr 20 '23 15:04 iancg

Yah I don't work for Tesla so have no idea. You can search the API that timdorr publishes and see if it's there if you want. It may help whoever decides to submit a PR.

alandtse avatar Apr 20 '23 18:04 alandtse