Present the data of Formula One in a pretty way
OR Manually add formulaone-card.js
to your <config>/www/
folder and add the following to the configuration.yaml
file:
lovelace:
resources:
- url: /local/formulaone-card.js
type: module
OR install using HACS and add this (if in YAML mode):
lovelace:
resources:
- url: /hacsfiles/formulaone-card/formulaone-card.js
type: module
The above configuration can be managed directly in the Configuration -> Lovelace Dashboards -> Resources panel when not using YAML mode, or added by clicking the "Add to lovelace" button on the HACS dashboard after installing the plugin.
Name | Type | Default | Description |
---|---|---|---|
type | string | Required | custom:formulaonecard |
card_type | string | Required | The type of card you want to display (driver_standings,constructor_standings,next_race,schedule,last_result,results,countdown) |
title | string | The header of the card ( hidden when null or empty) | |
date_locale | string | Override the locale used for the date and time formatting | |
image_clickable | boolean | false |
Click on image leads to wikipedia, or not |
show_carnumber | boolean | false |
Show the number of the car |
location_clickable | boolean | false |
Click on the location leads to wikipedia |
previous_race | enum | Hide/strikethrough or make the past races italic options are (hide, strikethrough or italic) | |
standings | object | Configuration for the driver standings card | |
translations | dictionary | translations | Dictionary to override the default translation |
type: custom:formulaone-card
card_type: next_race
title: Next Race
date_locale: nl
image_clickable: false
type: custom:formulaone-card
card_type: constructor_standings
title: Constructor Standings
type: custom:formulaone-card
card_type: driver_standings
title: Driver Standings
This card can also show the flags and team names of the driver:
type: custom:formulaone-card
card_type: driver_standings
title: Driver Standings
standings:
show_flag: true
show_team: true
type: custom:formulaone-card
card_type: schedule
title: Schedule
date_locale: nl
type: custom:formulaone-card
card_type: last_result
title: Last Result
type: custom:formulaone-card
card_type: results
title: Results
type: custom:formulaone-card
card_type: countdown
The following texts can be translated or altered.
Card type(s) | Key | Default value |
---|---|---|
next_race, schedule | date | 'Date' |
next_race | practice1 | 'Practice 1' |
next_race | practice2 | 'Practice 2' |
next_race | practice3 | 'Practice 3' |
next_race, schedule | race' | 'Race' |
next_race | racename | 'Race name' |
next_race | circuitname | 'Circuit name' |
next_race, schedule | location' | 'Location' |
next_race | city | 'City' |
next_race | racetime | 'Race' |
next_race | sprint | 'Sprint' |
next_race | qualifying | 'Qualifying' |
next_race, schedule | endofseason | 'Season is over. See you next year!' |
constructor_standings | constructor | 'Constructor' |
constructor_standings, driver_standings, last_result | points | 'Pts' |
constructor_standings, driver_standings | wins | 'Wins' |
driver_standings | team | 'Team' |
driver_standings, last_result | driver | 'Driver' |
last_result | grid | 'Grid' |
last_result | status | 'Status' |
schedule | time | 'Time' |
results | raceheader | 'Race' |
results | seasonheader | 'Season' |
results | selectseason | 'Select season' |
results | selectrace | 'Select race' |
results | noresults | 'Please select a race thats already been run' |
countdown | days | 'd' |
countdown | hours' : 'h' | |
countdown | minutes' : 'm' | |
countdown | seconds' : 's' |
Example:
type: custom:formulaone-card
card_type: next_race
title: Next Race
date_locale: nl
image_clickable: true
translations:
'date' : 'Date'
'practice1' : 'Practice 1'
'practice2' : 'Practice 2'
'practice3' : 'Practice 3'
'race' : 'Race'
'racename' : 'Race name'
'circuitname' : 'Circuit name'
'location' : 'Location'
'racetime' : 'Race'
'sprint' : 'Sprint'
'qualifying' : 'Qualifying'
'endofseason' : 'Season is over. See you next year!!'
- Convert Ergast client to use fetch to reduce library size
- Use F1 font