tesla
tesla copied to clipboard
Polling Toggle - Existing state doesn't survive Restart
Version 3.19.8 (previous versions as well)
Describe the bug
Setting Polling to Off via the toggle resets to the On position when HA restarts.
I would expect the behavior to remember the state .
The integration config has a checkbox for "force awake on restart" that usually works to get the latest data to solve this
The integration config has a checkbox for "force awake on restart" that usually works to get the latest data to solve this
The problem is just the opposite. I need the polling to remain off due to an upstream issue with Teslamate that triggers older vehicles with the MCU2 upgrade not to sleep properly, thus causing excessive vampire drain. I have automations that manually poll when I need to until the issue is resolved.
Regardless of the Teslamate issue, the toggle state should be restored to its previous state (OFF) after a restart. By default it turns back on when the integration loads.
I noticed it was doing this also, as I have an MCU1 car which seems to never sleep and i'm trying to figure out why.
Just tested this on my instance, safe to say this looks like a bug. As a temp fix, you could have an automation that fires after HA restart that could set the switch back to off
after a reboot (not ideal but hopefully stops you hitting the drain issue you mentioned)
@skipishere, I have an automation currently doing as you suggested. The upstream sleep issue has been discussed for quite a few months, and I just finally got around to submitting the bug issue here. It's not an end of the world issue.
I have the same issue. Unfortunately the integration automation to turn off polling kicks in after an initial poll. I tried disabling the switch, but that didn't do anything. Hopefully this bug gets fixed sooner than later!
I've done some research and I believe async def async_setup(hass, base_config):
in the file __init__py needs to be modified to add the Polling state. Unfortunately I do not have the time right now to put a proper PR request together for this issue.
Have same issue, I have multiple cars and don't need to polling them all, but unable to remove cars from integration and polling settings aren't saved permanently.
Saving non-Tesla saved settings on restart is an enhancement and not a bug. Regardless, we'll take a PR to add this if someone wants to include it.
By design, the integration will not poll a sleeping car. However, on HA restart, the integration has no idea when it last polled. By default we set a 660 second poll. You can change that in options to be even longer. Of course, this was before the fleet API and does not account for any other services that may communicate with your car.