Tesla component - what are these switches?

Charger switch allows you to start and stop charging (indicates if you are charging).
Maxrange switch is whether or not you’re at 100% charge (Trip Mode) versus the default of 80%.
Update switch turns on/off the automatic polling of the network from the car (to save battery).

Which one is which? If the update switch is enabled, does that mean it will not poll the tesla every 5 min if its in sleep mode?

Am I polling the car or the API every 5 min, meaning the car updates the API with its latest data?

Update switch is your CAR polling TESLA for updates. Don’t believe it happens every 5 minutes, I’m sure it’s a much longer cycle time than that. If you turn it off, then the car will NOT poll Tesla about updates at all. This will save some battery as the car won’t have to wake up in order to poll. It’s not something I would normally turn off unless you know the car will be sitting for a long time.

That’s my understanding, could be incorrect. It was, see below, this is the switch to enable/disable HA from polling the API (which in turn wakes up your car to get data).

So then its not really behaving as the “req” that I saw.

Unless you actually trigger “state”: “online” or something that indicates if the car is updating the Tesla API.
I guess the car updates the Tesla server and we ask the Tesla server and not the car itself?
So if the car is “online” then we can go ahead and do whatever we want but if state is “sleep” (I couldnt find any documentation of which states there are) then we dont poll anything.

Basically.

All of our interactions are with the Tesla server API itself, not the car directly. You’re just giving commands to the Tesla servers to give the car the next time the car polls. I’m not sure what “req” you’re referring to, so I can’t speak to it.

What are you trying to figure out?

I as some of the others wanna make sure we dont drain the battery when the car should be asleep, how can we make sure of this?

If the switch only tells us if we should do a request to the API or not then it more for long term use, but for every day use you want to get the data from the api, perhaps call it every 30sec to get location tracker for automations in different zones, but we dont want to ask every 30sec during the night IF the car is or should be asleep.

This is exposing an API, if you want your car to behave normally, don’t change it.
If you want to understand your phantom drain, then you can use an app like TezLab.

I actually want to use it for automations. Since it only updates every 5min I can use it to tell when my Tesla is home or coming home. I tried to change the zone so that it 5 minutes away to be able to adjust for the delay in the API response but I have noticed that if I drive through that zone within those 5 minutes it doesn’t tell me that i has entered the zone. So i Guess I have to create a Zone that is 5 minutes large. Then I dont get the same granularity as I would have got if I check every 30sec.

I don’t think this is correct.
The update switch is to tell Home Assistant to stop polling the API for data. By turning this off, you will not poll the API for updated data and the car will be allowed to sleep. It has nothing to do with the Car polling for updates from the Tesla servers.

From the documentation: “Update switch to allow you to disable polling of vehicles to conserve battery”

That’s correct, it’s a switch to disable the component itself from checking on the car, which will allow it to deep sleep.

Best use of this would be to set the switch to off as part of an evening routine, then re-enable it as part of a morning routine. That way you’d minimize the battery drain from the API polling the car while it’s just sitting in your garage.

I just noticed (at this moment) the update switch for me does not want to be turned off. When i click it, it for 1 or 2 seconds is in the off position, a grey halo around the circle of the switch, and it automatically switches back on. Anyone an idea what this could be and how to enable it to keep being switched off?

Is there a way to doseage the charger energy?

Does anyone here know whether we can use HA to trigger/start a Tesla software update when one is available?

I have the button linked to the update binary sensor entity and the icon changes color when one is available. Wondering if I can trigger the update as well using HA instead of the app on my phone?

Initially thought the update switch was for that but I understand after reading through that is not the case.

Interesting idea… You would want to include logic to ensure it was parked, and probably at home before doing an update and overnight.

All of which can be done through sensors I believe. But once that is done is there a way to trigger the update?

Anyone else have trouble with the Tesla config in HA. Mine is not working and I have this in the logs:

2021-01-30 14:43:42 ERROR (MainThread) [homeassistant.components.tesla.config_flow] Unable to communicate with Tesla API:

It started about 24 hours back, until then everything was working fine. I can still access the vehicle using the Tesla App and online - with same credentials as provided to HA.

Seems like it should be a problem across the platform and not just me. Hence trying to confirm.

Can confirm, same issue.

1 Like

Hi,

I have the same problem.

It appears that a few days ago Tesla switched up their sign on details. Here’s a link to the tesla API github thread discussing this:

Unfortunately mostly greek to me, but I wanted to share it here in case it helps with coming up with a fix for Home Assistant.

Same here, doesnt work anymore.