Skip to main content

Driver List

Look up drivers, team colors, and headshots for your dashboard. Use sensor.f1_driver_list 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

Live roster of drivers with identity and team information for the session.

State

  • Integer: number of drivers in the list.

Example

20

Attributes

AttributeTypeDescription
driverslistList of driver information, sorted by car number

Each entry in drivers contains:

FieldTypeDescription
racing_numberstringCar number
tlastringThree-letter abbreviation (driver code)
namestringFull name
first_namestringFirst name
last_namestringLast name
teamstringTeam name
team_colorstringTeam color as hex code (e.g., "#3671C6")
team_color_rgblistTeam color as RGB values (e.g., [54, 113, 198])
headshot_smallstringURL to small driver headshot image
headshot_largestringURL to large driver headshot image
referencestringExternal reference URL or ID
JSON Structure Example
{
"drivers": [
{
"racing_number": "1",
"tla": "VER",
"name": "Max VERSTAPPEN",
"first_name": "Max",
"last_name": "Verstappen",
"team": "Red Bull Racing",
"team_color": "#3671C6",
"team_color_rgb": [54, 113, 198],
"headshot_small": "https://media.formula1.com/content/dam/fom-website/drivers/M/MAXVER01_Max_Verstappen/maxver01.png",
"headshot_large": "https://media.formula1.com/content/dam/fom-website/drivers/M/MAXVER01_Max_Verstappen/maxver01-large.png",
"reference": "max_verstappen"
},
{
"racing_number": "44",
"tla": "HAM",
"name": "Lewis HAMILTON",
"first_name": "Lewis",
"last_name": "Hamilton",
"team": "Ferrari",
"team_color": "#ED1131",
"team_color_rgb": [237, 17, 49],
"headshot_small": "https://media.formula1.com/content/dam/fom-website/drivers/L/LEWHAM01_Lewis_Hamilton/lewham01.png",
"headshot_large": "https://media.formula1.com/content/dam/fom-website/drivers/L/LEWHAM01_Lewis_Hamilton/lewham01-large.png",
"reference": "lewis_hamilton"
}
]
}
Jinja2 Template Examples

Get a driver's headshot URL:

{% set drivers = state_attr('sensor.f1_driver_list', 'drivers') %}
{% set ver = drivers | selectattr('tla', 'eq', 'VER') | first %}
{% if ver %}
{{ ver.headshot_large }}
{% endif %}

Get team color for styling:

{% set drivers = state_attr('sensor.f1_driver_list', 'drivers') %}
{% set driver = drivers | selectattr('racing_number', 'eq', '44') | first %}
{% if driver %}
background-color: {{ driver.team_color }};
{% endif %}

Set a light to a driver's team color:

{% set drivers = state_attr('sensor.f1_driver_list', 'drivers') %}
{% set ver = drivers | selectattr('tla', 'eq', 'VER') | first %}
{% if ver and ver.team_color_rgb %}
service: light.turn_on
data:
entity_id: light.living_room
rgb_color: {{ ver.team_color_rgb }}
{% endif %}

List all drivers for a team:

{% set drivers = state_attr('sensor.f1_driver_list', 'drivers') %}
{% for d in drivers if d.team == 'Ferrari' %}
{{ d.name }} (#{{ d.racing_number }})
{% endfor %}

Create a driver lookup by TLA:

{% set drivers = state_attr('sensor.f1_driver_list', 'drivers') %}
{% set lookup = dict.from_keys(drivers | map(attribute='tla') | list, drivers) %}
{{ lookup.VER.name }} drives for {{ lookup.VER.team }}

Generate image elements for all drivers:

{% set drivers = state_attr('sensor.f1_driver_list', 'drivers') %}
{% for d in drivers %}
<img src="{{ d.headshot_small }}" alt="{{ d.name }}" style="border: 2px solid {{ d.team_color }}">
{% endfor %}
Headshot Images

The headshot URLs are provided by F1 and may change between sessions. This sensor retains its last known state between sessions to support dashboard graphics even when no session is active.

Next steps