-
-
Notifications
You must be signed in to change notification settings - Fork 29k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tesla does not sleep with default polling interval #30778
Comments
If you want to test out different algorithms, you can use the update switch to see what works (admittedly, we don't directly expose the online state so you'd have to look at the logs for attempted wake_ups; probably will expose the online sensor in the next set of PRs). Five minutes used to be enough to allow my Model S and Model 3 to sleep, but perhaps we need to bump the default config up to 660 as you proposed. Since other apps are out there, I assume someone on the internet has documented the sleep threshold and we can just adopt that without experimentation. |
@alandtse thanks for your reply. Including some information about sleepstates below https://support.teslafi.com/knowledge-bases/2/articles/161-my-vehicle-is-not-sleeping But as it's depending on the installed firmware it should have a high level approach so we can handle all use cases and future changes from Tesla. One solution to make it easier to automate around could be to be able to combine the update switch with on the fly configuring/toggle of the update interval.. To make it easy for users, what if we have a switch that we can toggle the integration to use to a aggressive interval (300 sec) or a more relaxed (660 sec) that is configurable from the config flow page? We probably will need a documentation update ;) |
I'm not sure a switch is appropriate since it's going to be hard to know what someone considers aggressive/conservative. The default used to allow sleeping while also giving reasonable updates. The default should replicate that behavior generally. If people want to be more aggressive they should set their own settings. Part of the reason we have to be conservative is that there are real costs if the vampire drain is too high. Yes, I agree updating the documentation to explain this is important. The purpose of the update switch was specifically to allow automations to control it. For example, I have an automation that stops updates if I haven't charged it for 24 hours (since I'm reliably charging at home and only wouldn't if I'm traveling). You could do it for airports, etc. |
When the online state is exposed (and hopefully shift_state to detect driving) , I think most needs are solvable with a automation in combination with the update switch. |
Anyone who wants to play around, see here to expose state and the shift_state. |
Home Assistant release with the issue: 0.104.0b5 (all)
Last working Home Assistant release (if known): N/A
Operating environment (Hass.io/Docker/Windows/etc.): Hassio
Integration: Tesla
Description of problem:
When integration is active with default polling interval my car never sleeps. (Model 3 LR with with firmware 2019.40.50.7 ad132c7)
If the update interval is 11 minutes (660seconds) or more the car is able to sleep. (Needs behavior confirmation with other models/firmware's)
Exactly what the requirements are for the car to go to sleep is unknown, but if the polling time is under 11 minutes it never sleeps.
Other Tesla integrations/app have implemented schedules when different polling rates/types should be active in combination with delay's after last active mode (!idle)
Below is my thoughts of how this could be solved. (Without knowing about what is suitable in regards to the code)
standard polling could be restored when asleep state is detected to aid in early detection changed state)
The text was updated successfully, but these errors were encountered: