Formula One API will be down for the remaining of the season while I work on a solution to update the data and prevent polling the API. The terms and condition of the API prevent polling.
Formula One API Integration Into Home Assistant: Bring live information the current season!
2022-10-05 - This sensor was seperated into 4 new sensors. Please check the frontend.md to correct the visuals
2023-01-11 - I will be shutting down the project on February 15th if nobody takes over. The cost of the server and the strain on it are too much.
- Copy the
formulaone_api
folder to thecustom_components
folder in your Home Assistant configuration directory. - Restart Home Assistant to allow the required packages to be installed.
- Add the following minimum code in your
configuration.yaml
file. See Configuration for more advanced options:
sensor:
- platform: formulaone_api
- Restart Home Assistant one final time.
This method assumes you have HACS already installed.
OR Manually
- In the HACS Store, click
Custom Repository
from the top right menu. - Enter
delzear/hass-formulaoneapi
in theURL
textbox and Integration in theCategory
. - Click
Install
- Restart Home Assistant to allow the required packages to be installed.
- Add the following code in your
configuration.yaml
file. See Configuration for more advanced options:
sensor:
- platform: formulaone_api
- Restart Home Assistant one final time.
key | required | type | usage |
---|---|---|---|
platform | true | string | formulaone_api |
The sensor will expose 3 state attributes:
state | description |
---|---|
next_race | The Next race of the current championship season |
races | Array of all the races of the current championship season |
drivers | Sorted array of all drivers of the current championship season ordered by descending points |
constructors | Sorted array of all constructors of the current championship season ordered by descending points |
last_result | Sorted array of the last race result |
The sensor will return the following state attributes whether or not a game is in progress:
Use the FormulaOne-Card for displaying the information OR use the markdown card: frontend.md
- Consume Formula One Stats API locally with the least amount of resources possible.
- Pass information to Home Assistant as sensor data. (ex. Next game scheduled, live scores, goal description, etc.)
- Create a "live" event platform to use as a trigger for automations.
- Display the information in the front-end in its own Lovelace card.
- Add support for
HACS
. - Add notification service for qualifying, sprint and race