Skip to main content

Tyre Statistics

Aggregated tyre statistics per compound. Use sensor.f1_tyre_statistics in dashboards, templates, and automations.

See live data availability for session and data-source requirements. The details below describe any additional conditions for this entity.

Find your entity

These are standard entity IDs. If Home Assistant assigned a different ID, or you renamed an entity, use your existing ID in the examples.

State and attributes

sensor.f1_tyre_statistics - Aggregated tyre performance statistics per compound, showing fastest times and usage across all drivers.

State

  • String: name of the fastest compound (e.g., "SOFT"), or unknown when not available.

Example

SOFT

Attributes

AttributeTypeDescription
fastest_timestringOverall fastest lap time across all compounds
fastest_time_secsnumberFastest lap time in seconds
deltasobjectTime delta to fastest for each compound (e.g., {"MEDIUM": "+0.342", "HARD": "+0.891"})
start_compoundslistList of compounds used at race start, one entry per driver with racing number and compound
compoundsobjectDetailed statistics per compound

Each entry in compounds (keyed by compound name) contains:

FieldTypeDescription
best_timeslistTop 3 fastest lap times on this compound
total_lapsnumberTotal laps completed on this compound
sets_usednumberNumber of new tyre sets used
sets_used_totalnumberTotal stints on this compound
compound_colorstringHex color code for the compound
compound_color_rgblistCompound color as RGB values (e.g., [255, 0, 0] for soft)

Each entry in best_times contains:

FieldTypeDescription
timestringLap time (e.g., "1:31.234")
racing_numberstringCar number
tlastringDriver code

Each entry in start_compounds contains:

FieldTypeDescription
racing_numberstringCar number
compoundstringTyre compound used at race start
JSON Structure Example
{
"fastest_time": "1:31.234",
"fastest_time_secs": 91.234,
"deltas": {
"SOFT": "+0.000",
"MEDIUM": "+0.342",
"HARD": "+0.891"
},
"start_compounds": [
{ "racing_number": "1", "compound": "MEDIUM" },
{ "racing_number": "44", "compound": "HARD" },
{ "racing_number": "4", "compound": "MEDIUM" }
],
"compounds": {
"SOFT": {
"best_times": [
{ "time": "1:31.234", "racing_number": "1", "tla": "VER" },
{ "time": "1:31.456", "racing_number": "4", "tla": "NOR" },
{ "time": "1:31.567", "racing_number": "44", "tla": "HAM" }
],
"total_laps": 45,
"sets_used": 8,
"sets_used_total": 12,
"compound_color": "#FF0000",
"compound_color_rgb": [255, 0, 0]
},
"MEDIUM": {
"best_times": [
{ "time": "1:31.576", "racing_number": "1", "tla": "VER" },
{ "time": "1:31.789", "racing_number": "16", "tla": "LEC" }
],
"total_laps": 120,
"sets_used": 15,
"sets_used_total": 20,
"compound_color": "#FFFF00",
"compound_color_rgb": [255, 255, 0]
},
"HARD": {
"best_times": [
{ "time": "1:32.125", "racing_number": "63", "tla": "RUS" }
],
"total_laps": 80,
"sets_used": 6,
"sets_used_total": 8,
"compound_color": "#FFFFFF",
"compound_color_rgb": [255, 255, 255]
}
}
}
Jinja2 Template Examples

Get the fastest compound:

Fastest compound: {{ states('sensor.f1_tyre_statistics') }}

Get fastest time on a specific compound:

{% set compounds = state_attr('sensor.f1_tyre_statistics', 'compounds') %}
{% if compounds and compounds.SOFT %}
{% set best = compounds.SOFT.best_times | first %}
Fastest on SOFT: {{ best.time }} by {{ best.tla }}
{% endif %}

Show delta between compounds:

{% set deltas = state_attr('sensor.f1_tyre_statistics', 'deltas') %}
{% if deltas %}
MEDIUM vs SOFT: {{ deltas.MEDIUM | default('N/A') }}
HARD vs SOFT: {{ deltas.HARD | default('N/A') }}
{% endif %}

Count drivers who started on each compound:

{% set starts = state_attr('sensor.f1_tyre_statistics', 'start_compounds') %}
{% if starts %}
{% set mediums = starts | selectattr('compound', 'eq', 'MEDIUM') | list | length %}
{% set hards = starts | selectattr('compound', 'eq', 'HARD') | list | length %}
Started on MEDIUM: {{ mediums }}
Started on HARD: {{ hards }}
{% endif %}

Get total laps on all compounds:

{% set compounds = state_attr('sensor.f1_tyre_statistics', 'compounds') %}
{% if compounds %}
{% set total = namespace(laps=0) %}
{% for name, data in compounds.items() %}
{% set total.laps = total.laps + (data.total_laps | default(0)) %}
{% endfor %}
Total tyre laps recorded: {{ total.laps }}
{% endif %}
Compound Colors

Use the compound_color field to style your dashboard elements. The colors match the official Pirelli tyre colors: SOFT (red), MEDIUM (yellow), HARD (white), INTERMEDIATE (green), WET (blue).

Next steps