Skip to content

Vehicle data polling interval #38798

Open
@Sw1zero

Description

@Sw1zero

Feedback

Perhaps we could integrate some sort of instructions about the vehicle data polling intervall section in the documentation:

This is the actual text:
The integration is configured to poll each vehicle every 10 minutes while it’s awake. This is long enough that a single vehicle can be polled 24/7 without exceeding the USD$10 credit Tesla provides. It is expected that most vehicles are asleep over 50% of the day, so the defaults should also suit users with multiple vehicles or that want to run automated commands.

If the default polling interval does not suit your needs, you can define a custom polling interval.

In a specific use case you want to have a shorter polling intervall and after that use case you want to put it back to "normal". You can do that with automations but I'm not a good "coder" and with the help of AI I made it work. I think it would help many people who are using this integration to know that with an example?


My example would be like this:

Dynamic Polling for Vehicle Location / Garage Door Automation (User Implementation)

A prime example is tracking a vehicle to trigger a garage door opening upon arrival. The default ~10-minute polling interval is too slow for this; the garage might open long after the car has already arrived or passed by.

To achieve the necessary responsiveness while minimizing API calls and battery drain, users like myself currently implement complex workarounds. My current setup involves three automations:

Executor Automation: Triggers every minute (platform: time_pattern, minutes: /1) and calls homeassistant.update_entity on the car's location tracker (device_tracker.car_location). This automation is disabled by default.
'Enable Fast Polling' Automation: Activates the Executor automation. This is triggered when the car starts driving (e.g., platform: state, entity_id: sensor.car_gear, from: 'P') OR when the car leaves the home zone (platform: state, entity_id: device_tracker.car_location, from: 'home'). The condition ensures the car is actually driving (not is_state('sensor.car_gear', 'P')) AND away from home (state: 'not_home').
'Disable Fast Polling' Automation: Deactivates the Executor automation. This is triggered when the car is parked (e.g., platform: state, entity_id: sensor.car_gear, to: 'P') OR when the car enters the home zone (platform: zone, entity_id: device_tracker.car_location, zone: zone.home, event: enter).

Benefits & Limitations of this Workaround:

This multi-automation setup successfully achieves the goal: location is updated frequently (every minute) only when the car is driving and away, allowing timely triggers for things like opening the garage. Compared to polling every minute constantly, this method drastically reduces unnecessary API calls and minimizes battery drain when parked or at home.


Perhaps you'd like to integrate this text on the website?

thanks in advance!

URL

https://www.home-assistant.io/integrations/tesla_fleet/

Version

2025.4.4

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions