{"id":26788703,"url":"https://github.com/marcokreeft87/formulaone-card","last_synced_at":"2025-04-05T14:03:03.631Z","repository":{"id":60937958,"uuid":"545945955","full_name":"marcokreeft87/formulaone-card","owner":"marcokreeft87","description":"Present the data of Formula One in a pretty way","archived":false,"fork":false,"pushed_at":"2025-03-26T15:31:20.000Z","size":4341,"stargazers_count":184,"open_issues_count":3,"forks_count":15,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T13:18:53.112Z","etag":null,"topics":["card","f1","formula1","formulaone","hacs","home-assistant","homeassistant-frontend","lovelace","lovelace-custom-card","lovelace-ui"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcokreeft87.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-05T08:50:17.000Z","updated_at":"2025-03-28T07:57:27.000Z","dependencies_parsed_at":"2023-02-19T05:31:36.551Z","dependency_job_id":"2fbe3404-2881-4168-9901-97bce84a96c1","html_url":"https://github.com/marcokreeft87/formulaone-card","commit_stats":null,"previous_names":[],"tags_count":75,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcokreeft87%2Fformulaone-card","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcokreeft87%2Fformulaone-card/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcokreeft87%2Fformulaone-card/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcokreeft87%2Fformulaone-card/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcokreeft87","download_url":"https://codeload.github.com/marcokreeft87/formulaone-card/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345848,"owners_count":20924102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["card","f1","formula1","formulaone","hacs","home-assistant","homeassistant-frontend","lovelace","lovelace-custom-card","lovelace-ui"],"created_at":"2025-03-29T13:19:07.221Z","updated_at":"2025-04-05T14:03:03.596Z","avatar_url":"https://github.com/marcokreeft87.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Formula 1"],"sub_categories":["Tools and Apps"],"readme":"# FormulaOne Card\n\n[![GH-release](https://img.shields.io/github/v/release/marcokreeft87/formulaone-card.svg?style=flat-square)](https://github.com/marcokreeft87/formulaone-card/releases)\n[![GH-last-commit](https://img.shields.io/github/last-commit/marcokreeft87/formulaone-card.svg?style=flat-square)](https://github.com/marcokreeft87/formulaone-card/commits/master)\n[![GH-code-size](https://img.shields.io/github/languages/code-size/marcokreeft87/formulaone-card.svg?color=red\u0026style=flat-square)](https://github.com/marcokreeft87/formulaone-card)\n[![hacs_badge](https://img.shields.io/badge/HACS-Default-41BDF5.svg?style=flat-square)](https://github.com/hacs/default)\n[![Codecov Coverage](https://img.shields.io/codecov/c/github/marcokreeft87/formulaone-card/main.svg?style=flat-square)](https://codecov.io/gh/marcokreeft87/formulaone-card/)\n[![CodeFactor](https://www.codefactor.io/repository/github/marcokreeft87/formulaone-card/badge?style=flat-square)](https://www.codefactor.io/repository/github/marcokreeft87/formulaone-card)\n\n\nPresent the data of [Formula One](https://ergast.com/mrd/) in a pretty way \n\nWatch a demo of the card by BeardedTinker!\n\n[![Demo of BeardedTinker](https://img.youtube.com/vi/z7blY6D-Qmk/0.jpg)](https://www.youtube.com/watch?v=z7blY6D-Qmk)\n\n## Installation\n\n\n### HACS (recommended)\nMake sure you have [HACS](https://hacs.xyz/) (Home Assistant Community Store) installed.\n\u003cbr\u003e\n\u003csub\u003e_HACS is a third party community store and is not included in Home Assistant out of the box._\u003c/sub\u003e\n\nJust click here to directly go to the repository in HACS and click \"Download\": [![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=marcokreeft87\u0026repository=formulaone-card\u0026category=plugin)\n\nOr: \n- Open HACS\n- Go to \"Frontend\" section\n- Click button with \"+\" icon\n- Search for \"formulaone-card\"\n- Click \"Download\" button and install repository in HACS\n\nIn both situations:\n- _If u are using YAML mode then add this to your_ [Lovelace resources](https://my.home-assistant.io/redirect/lovelace_resources/)\n  ```yaml\n  url: /hacsfiles/formulaone-card/formulaone-card.js\n  type: module\n  ```\n- Refresh your browser\n\n### Manual install\nManually download [formulaone-card.js](https://raw.githubusercontent.com/marcokreeft87/formulaone-card/master/formulaone-card.js) and add it \nto your `\u003cconfig\u003e/www/` folder and add the following to the `configuration.yaml` file:\n```yaml\nlovelace:\n  resources:\n    - url: /local/formulaone-card.js\n      type: module\n```\n\n\nThe above configuration can be managed directly in the Configuration -\u003e Lovelace Dashboards -\u003e Resources panel when not using YAML mode,\nor added by clicking the \"Add to lovelace\" button on the HACS dashboard after installing the plugin.\n\n## Configuration\n\n| Name              | Type          | Default                             | Description                                      |\n| ----------------- | ------------- | ----------------------------------- | ------------------------------------------------ |\n| type              | string        | **Required**                        | `custom:formulaonecard`                          |\n| card_type         | string        | **Required**                        | The type of card you want to display (driver_standings,constructor_standings,next_race,schedule,last_result,results,countdown)            |\n| title             | string        |                                     | The header of the card ( hidden when null or empty)            |\n| date_locale       | string        |                                     | Override the locale used for the date and time formatting. [Available options listed here](https://www.w3.org/International/O-charset-lang.html)|\n| image_clickable   | boolean       | `false`                             | Click on image leads to wikipedia, or not   |\n| show_carnumber    | boolean       | `false`                             | Show the number of the car   |\n| show_raceinfo     | boolean       | `false`                             | Show the info of the race in the countdown and next_race card |\n| hide_tracklayout  | boolean       | `false`                             | Hide the track layout image in the card |\n| hide_racedatetimes | boolean       | `false`                        | Hide the race information (dates and times of the qualifications/race/sprint) in the card |\n| f1_font           | boolean       | `false`                             | Use the official F1 font for headers |\n| location_clickable| boolean       | `false`                             | Click on the location leads to wikipedia   |\n| previous_race     | enum          |                           |   Hide/strikethrough or make the past races italic options are (hide, strikethrough or italic) |\n| standings         | object        |                                     | Configuration for the driver standings card     |\n| translations      | dictionary    |  _[translations](#Translations)_          | Dictionary to override the default translation  |\n| actions           | object        |  _[Actions](#actions)_                                    | The tap, double tap or hold actions set on the image of the countdown, last_result, results, qualifying_results and next-race cards |\n| row_limit         | number        |                                     | Limit the schedule, results, last_result, driver_standings and constructor_standings to this amount of row |\n| countdown_type    | string or array | 'race'                              | Set the event to countdown to (race,qualifying,practice1,practice2,practice3,sprint,sprint_qualifying) |\n| show_weather      | boolean       | `false`                             | Show the _[weather forecast](#Forecast)_ of the upcoming race |\n| next_race_delay   | number        |                                     | Delay (in hours) before the card switches to the next race |\n| show_lastyears_result | boolean   | `false`                             | Show the winner of last year (next_race, countdown) |\n| only_show_date    | boolean       | `false`                             | Show the date of the next race (next_race)          |\n| tabs_order        | array         |'results', 'qualifying', 'sprint'    | Determine the order of the tabs (result)    |\n| show_refresh      | boolean       |`false`                              | Show the refresh button (top right)    |\n| next_race_display | enum          |`date`                               | Show the date, time or both for the next race (date,time,datetime)    |\n\n\n### Actions\n\nThis card supports all the default HA actions, except from more-info and toggle. See [Lovelace Actions](https://www.home-assistant.io/lovelace/actions/)\nfor more detailed descriptions and examples.\n\n| Name            | Type        | Default      | Description                                                                                |\n| --------------- | ----------- | ------------ | ------------------------------------------------------------------------------------------ |\n| action          | string      | **Required** | `call-service`, `url`, `navigate`, `fire-dom-event`, `none`         |\n| service         | string      |              | Service to call when `action` is `call-service`                                            |\n| service_data    | object      |              | Optional data to include when `action` is `call-service`                                   |\n| url_path        | string      |              | URL to open when `action` is `url`                                                         |\n| navigation_path | string      |              | Path to navigate to when `action` is `navigate`                                            |\n| confirmation    | bool/object | `false`      | Enable confirmation dialog                                                                 |\n| haptic          | string      | `none`       | Haptic feedback (`success`, `warning`, `failure`, `light`, `medium`, `heavy`, `selection`) |\n\nActions example:\n\n```yaml\ntype: custom:formulaone-card\ncard_type: next_race\nshow_raceinfo: true\nactions:\n  tap_action:\n    action: navigate\n    navigation_path: /lovelace/overview\n\n```\n\n## Example configurations\n\n### Next race\n\n```yaml\ntype: custom:formulaone-card\ncard_type: next_race\ntitle: Next Race\ndate_locale: nl\nimage_clickable: false\n```\n\n![image](https://user-images.githubusercontent.com/10223677/194120592-3df715bc-888d-460b-8743-ec1ab6017b96.png)\n\n### Constructor standings\n\n```yaml\ntype: custom:formulaone-card\ncard_type: constructor_standings\ntitle: Constructor Standings\n```\n\n![image](https://user-images.githubusercontent.com/10223677/194120698-b981aac2-8678-4f35-afc9-ca6bb8514566.png)\n\n```yaml\ntype: custom:formulaone-card\ncard_type: constructor_standings\ntitle: Constructor Standings\nstandings:\n  show_teamlogo: true\n```\n\n![image](https://user-images.githubusercontent.com/10223677/213992061-91ade5f2-68bb-4572-84a1-5d5cf38e0645.png)\n\n### Driver standings\n\n```yaml\ntype: custom:formulaone-card\ncard_type: driver_standings\ntitle: Driver Standings\n\n```\n![image](https://user-images.githubusercontent.com/10223677/194120796-28532a9d-a62d-44bb-8cb8-403bfa434a8b.png)\n\nThis card can also show the flags and team names of the driver:\n\n```yaml\ntype: custom:formulaone-card\ncard_type: driver_standings\ntitle: Driver Standings\nstandings:\n  show_flag: true\n  show_team: true\n  show_teamlogo: true\n  \n```\n\n### Schedule\n\n```yaml\ntype: custom:formulaone-card\ncard_type: schedule\ntitle: Schedule\ndate_locale: nl\n\n```\n\n![image](https://user-images.githubusercontent.com/10223677/194120864-be0db0e9-dd0b-42aa-8829-d094c23ef0a5.png)\n\nThis card can also show the flags of the countries of the tracks:\n\n```yaml\ntype: custom:formulaone-card\ncard_type: schedule\nstandings:\n  show_flag: true\n\n```\n\n### Last results\n\n```yaml\ntype: custom:formulaone-card\ncard_type: last_result\ntitle: Last Result\n\n```\n![image](https://user-images.githubusercontent.com/10223677/194120925-5fc6c1a7-8b2a-4c58-b89c-d0316d70efe9.png)\n\n### Results\n\n```yaml\ntype: custom:formulaone-card\ncard_type: results\ntitle: Results\n```\n![image](https://user-images.githubusercontent.com/10223677/216916869-4d2dc991-3429-45f8-b286-0b08d538031f.png)\n\nThis card can also show the flags and team names of the driver, alongside the logo of the teams:\n\n```yaml\ntype: custom:formulaone-card\ncard_type: results\ntitle: Results\nstandings:\n  show_flag: true\n  show_team: true\n  show_teamlogo: true\n  \n```\n\n### Countdown\n\n```yaml\ntype: custom:formulaone-card\ncard_type: countdown\n```\n![image](https://user-images.githubusercontent.com/10223677/213435405-fdb2ff7c-3364-43d5-80b0-0f253d9b60c8.png)\n\n```yaml\ntype: custom:formulaone-card\ncard_type: countdown\nf1_font: true\n```\n![image](https://user-images.githubusercontent.com/10223677/215340692-898a03ef-2f66-46fd-92da-6e842d413500.png)\n\n## Icons\nThe following icons can be altered.\n| Card type(s)                        | Key           | Default value                       |\n| ----------------------------------- | ------------- | ----------------------------------- |\n| results                             | results       | mdi:trophy                          |        \n| results                             | qualifying    | mdi:timer-outline                   |\n| results                             | sprint        | mdi:flag-checkered                  |\n\n## Translations\n\nThe following texts can be translated or altered.\n\n| Card type(s) | Key | Default value |\n| ----------------------------------- | ------------- | ----------------------------------- |\n| next_race, schedule | date | 'Date' |\n| next_race, countdown | practice1 | 'Practice 1' |\n| next_race, countdown | practice2 | 'Practice 2' |\n| next_race, countdown | practice3 | 'Practice 3' |\n| next_race, countdown | race | 'Race' |\n| schedule | round | 'Race' |\n| next_race, countdown | racename | 'Race name' |\n| next_race, countdown | circuitname | 'Circuit name' |\n| next_race, countdown, schedule | location' | 'Location' |\n| next_race, countdown | city | 'City' |\n| next_race, countdown | sprint | 'Sprint' |\n| next_race, countdown | qualifying | 'Qualifying' |\n| next_race, countdown | sprint_qualifying : 'Sprint Qualifying' |\n| next_race, countdown, schedule | endofseason | 'Season is over. See you next year!' |\n| constructor_standings | constructor | 'Constructor' |\n| constructor_standings, driver_standings, last_result | points | 'Pts' |\n| constructor_standings, driver_standings | wins | 'Wins' |\n| driver_standings, results | team | 'Team' |\n| driver_standings, last_result, results | driver | 'Driver' |\n| last_result | grid | 'Grid' |\n| last_result | status | 'Status' |\n| schedule | time | 'Time' |\n| results | raceheader | 'Race' | \n| results | seasonheader | 'Season' | \n| results | selectseason | 'Select season' | \n| results | selectrace | 'Select race' | \n| results | noresults | 'Please select a race thats already been run' | \n| countdown | days | 'd' |\n| countdown | hours | 'h' |\n| countdown | minutes | 'm' |\n| countdown | seconds | 's' |\n| countdown | until | 'Until' |\n| constructor_standings, driver_standings | no_standings | 'No standings available yet' |\n\n\nExample:\n\n```yaml\ntype: custom:formulaone-card\ncard_type: next_race\ntitle: Next Race\ndate_locale: nl\nimage_clickable: true\ntranslations: \n  'date' : 'Date'  \n  'practice1' : 'Practice 1'\n  'practice2' : 'Practice 2'\n  'practice3' : 'Practice 3'\n  'race' : 'Race'\n  'racename' : 'Race name'\n  'circuitname' : 'Circuit name'\n  'location' : 'Location'\n  'racetime' : 'Race'\n  'sprint' : 'Sprint'\n  'qualifying' : 'Qualifying'\n  'endofseason' : 'Season is over. See you next year!!'\n\n```\n\n## Result card status translation\n\nYou can translate the status of the result and last_result card. But only the status column.\nIt works the same way as the other translations.\n\nThe possible values for the status column are:\n\nHere are all possible values for the status property with their default translation:\n\n```yaml\n'Finished' : 'Finished',\n'+1 Lap' : '+1 Lap',\n'Engine' : 'Engine',\n'+2 Laps' : '+2 Laps',\n'Accident' : 'Accident',\n'Collision' : 'Collision',\n'Gearbox' : 'Gearbox',\n'Spun off' : 'Spun off',\n'+3 Laps' : '+3 Laps',\n'Suspension' : 'Suspension',\n'+4 Laps' : '+4 Laps',\n'Transmission' : 'Transmission',\n'Electrical' : 'Electrical',\n'Brakes' : 'Brakes',\n'Withdrew' : 'Withdrew',\n'+5 Laps' : '+5 Laps',\n'Clutch' : 'Clutch',\n'Lapped' : 'Lapped',\n'Retired' : 'Retired',\n'Not classified' : 'Not classified',\n'Fuel system' : 'Fuel system',\n'+6 Laps' : '+6 Laps',\n'Disqualified' : 'Disqualified',\n'Turbo' : 'Turbo',\n'Hydraulics' : 'Hydraulics',\n'Overheating' : 'Overheating',\n'Ignition' : 'Ignition',\n'Oil leak' : 'Oil leak',\n'Throttle' : 'Throttle',\n'Out of fuel' : 'Out of fuel'\n```\n\n## Weather forecast\n\nFor this feature to work you have to get an API key [here](https://www.visualcrossing.com/sign-up)\n\n```yaml\nshow_weather: true\nweather_options:\n  unit: metric\n  api_key: [YOUR API KEY HERE]\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcokreeft87%2Fformulaone-card","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcokreeft87%2Fformulaone-card","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcokreeft87%2Fformulaone-card/lists"}