-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
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 Fleet is polling too often #141462
Comments
Hey there @Bre77, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) tesla_fleet documentation |
You can disable polling in the config entry option and setup your own polling logic with an automation and the update entity action on a single vehicle entity. |
Thanks, didn't know that. And provides a solution for now. But, it may be nice to set a default polling interval that makes sure you never hit Tesla's limitation on the 10 dollar (thus free) option? |
What would you suggest? It's currently set to 5 minutes which assumes a vehicle is only awake 50% of the day per day. The problem is some people have vehicles asleep for days at a time and others who rideshare and their vehicles are rarely asleep. No default will suit all people, and a default that will mathematically never hit the $10 credit only does so when you have a single vehicle. Ultimately if you want a good data experience you should use a paid service like Teslemetry instead. |
Hi Bre77, |
Unless you have an old Model S / X or haven't firmware updates your new model, that shouldn't be happening.
Not allowed to do that in the Home Assistant project. You have to use the method I linked above. |
Turn debug logging on for the integration for 30-60 minutes and share that with me so I can troubleshoot this. If you don't want to post them to GitHub email admin@teslemetry.com |
Hi Bre77, I have a 2023 model 3. Always update when released asap. Also seeing a 3x increase like smougenot. |
Looks like I've some debug logs ... but not much (every 5').
Also added an automation to manually trigger the update (for test purposes). No more log are generated. automation definition- id: '1743289658517' alias: update_entity_tut_tut description: '' triggers: [] conditions: [] actions: - action: homeassistant.update_entity metadata: {} data: entity_id: - sensor.tut_tut_bolide_charge_energy_added - sensor.tut_tut_bolide_tire_pressure_front_left - sensor.tut_tut_bolide_odometer - sensor.tut_tut_bolide_battery_level mode: single Also added some credit on Tesla developer (1$). No change
|
If I raise a PR that allows the user to configure the coordinator refresh interval it will be rejected, because the Home Assistant project doesn't allow that. If users want to change the polling interval they must use a custom automation to do so. |
That looks correct, and the change your seeing is likely a result of this PR I did #138576 So long story short if you don't want your vehicle polled every 5 minutes when awake, disabled entity updates and create your own automation. |
Thank you for the explanation The older way with a "dynamic rate" for Tesla API calls looked much more effective to me
It would be nice to revert to the dynamic rate or at least let us choose to disable it with a warning about costs and efficiency. |
Agree @smougenot I am a bit surprised about that PR, as I don't agree there no longer is a rate limit. There is a rate limit, unless you decide to pay. It would be an option to configure this in the integration:
|
That's a good point, and that is something I can solve. I could independently populate the status entity every minute since its API is free. That said, if you simply want to set the polling rate to a fixed rate (like 10 minutes) you don't need to know if the vehicle is awake. The integration never wakes your vehicle for data. |
Why not reverting the change (simple, efficient) that reduced the functionality (in both quality and cost). It looks like the reduced functionality is intentional. Maybe it is a conflit of interest with another project. |
Because it was causing the integration to stop polling for long periods and someone complained about that. I think the rate limit code has been removed from the library so a straight rollback isn't possible.
Making the integration more predictable and easier to maintain helps. I'm code owner of 6 different integrations so I do have to prioritise my time, and first priority is the integration people pay me money to develop and support (Teslemetry). This is open source, anyone can contribute. |
Maybe we could crowdsource a nice automation (or even a blueprint) to implement "best practices" for dynamic polling? https://community.home-assistant.io/t/dynamic-polling-of-tesla-fleet/875314 |
The problem
The Tesla Fleet integration is polling too often. I just received an e-mail that the monthly limits have been reached. As a result, the fleet connection is disabled.
If I look at the stats at the Tesla Developers site, I see about 286 polls each day. Some days are lower, for reasons unknown to me.
I think we either make polling configurable or make polling dynamic. For example, increase polling rate when charging, etc.
What version of Home Assistant Core has the issue?
2025.3.4
What was the last working version of Home Assistant Core?
2025.3.4
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Tesla Fleet
Link to integration documentation on our website
https://www.home-assistant.io/integrations/tesla_fleet
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: