Events
Home Assistant Events
Home Assistant provides an Event Bus that integrations can use to publish real-time information for low-latency automations and triggers.
Events are ideal for transient signals and instantaneous state changes that should be reacted to immediately, rather than stored as long-lived sensor states.
For a general introduction to how events work in Home Assistant, see:
Home Assistant Event integration documentation.
Event Streams
On-track Incident
F1 Sensor publishes likely stopped-car and on-track incident changes under the event type f1_sensor_incident.
Use this event for notifications and automations that should react immediately to incident lifecycle changes.
For the full user-facing behavior, see Incident Detection.
The event describes a likely stopped car or on-track incident. It does not guarantee that a crash happened. Keep notification wording neutral unless Race Control explicitly says more.
When F1TV Auth is configured and extra live car data is available, F1 Sensor can also publish earlier candidate events from low-speed car movement correlated with yellow flag, Virtual Safety Car, Safety Car, or red flag context. These candidates are useful for advanced automations, but they are not confirmed incidents until public timing or Race Control provides stronger evidence.
When Track Map data is available, the event can include useful location context such as position status and sector. Location fields can be null when fresh context is not available.
Phases
| Phase | Meaning |
|---|---|
candidate | Early possible incident. Normally useful for advanced automations, not default push alerts |
confirmed | Strong enough evidence for an on-track incident alert |
updated | New information for the same incident_id, such as higher confidence |
cleared | The incident appears to be over |
Confidence
| Confidence | Meaning |
|---|---|
low | Weak or early signal, normally not user-facing |
medium | Reasonable incident candidate, such as a stopped car that is not in pit lane or an auth-based low-speed candidate with flag context |
high | Strong context, such as stopped timing data combined with yellow flag, Safety Car, red flag, or Race Control context |
Example payload
event_type: f1_sensor_incident
data:
entry_id: "abc123"
incident_id: "2026-miami-race-10-2026-05-03T20:14:22Z"
phase: "confirmed"
confidence: "high"
reason: "timing_stopped_with_race_control"
driver:
racing_number: "10"
tla: "GAS"
name: "Pierre Gasly"
team: "Alpine"
session:
meeting_name: "Miami Grand Prix"
session_name: "Race"
session_type: "race"
track_status:
status: "YELLOW"
message: "Yellow"
race_control:
message: "DOUBLE YELLOW IN TURN 7"
category: "Flag"
flag: "DOUBLE YELLOW"
location:
status: "OnTrack"
source: "live"
stale: false
confidence: "high"
description: "on track, sector 2"
sector: 2
corner: null
pit_lane: false
track_segment: 42
distance_to_track: 4.2
updated_at: "2026-05-03T20:14:27Z"
signals:
- "timing_stopped"
- "race_control_yellow"
- "track_map_location"
started_at: "2026-05-03T20:14:22Z"
updated_at: "2026-05-03T20:14:28Z"
data_quality: "live"
Use phase, confidence, session.session_type, and driver.tla as the main automation fields. session.session_type uses lowercase values such as race, sprint, qualifying, practice, testing, or unknown. The payload uses neutral names so it can represent stopped cars, spins, technical failures, and other likely on-track incidents without calling them crashes.
The location object is optional context. Its fields may be null when Track Map context is unavailable. Treat location.stale: true or location.confidence: low as informational only.
Event vs sensor
Use f1_sensor_incident when you want one notification per incident update. Use binary_sensor.f1_on_track_incident when you want a dashboard indicator or a simple state trigger while any confirmed incident is active.
Race Control
Race Control messages are available both as a sensor and as events in Home Assistant.
Events are published under the event type f1_sensor_race_control_event and act as a real-time complement to the Race Control sensor.
They include flags, steward notes, incident reports, and other live race control communications.
Example payloads
event_type: f1_sensor_race_control_event
data:
message:
Utc: "2025-09-19T12:40:18"
Category: Flag
Flag: CLEAR
Scope: Sector
Sector: 6
Message: CLEAR IN TRACK SECTOR 6
received_at: "2025-09-19T12:40:44+00:00"
origin: LOCAL
time_fired: "2025-09-19T12:40:44.106956+00:00"
event_type: f1_sensor_race_control_event
data:
message:
Utc: "2025-09-19T12:40:07"
Category: Flag
Flag: YELLOW
Scope: Sector
Sector: 6
Message: YELLOW IN TRACK SECTOR 6
received_at: "2025-09-19T12:40:44+00:00"
event_type: f1_sensor_race_control_event
data:
message:
Utc: "2025-09-19T12:40:06"
Category: Other
Message: INCIDENT INVOLVING CAR 81 (PIA) NOTED - YELLOW FLAG INFRINGEMENT
received_at: "2025-09-19T12:40:44+00:00"
Race Control is now exposed both as a sensor (for dashboards and history) and as events (for real-time automations and triggers). Events remain available as a complementary, low-latency trigger source alongside the sensor.
For example automations using these events, see the Automation page.
Race Control vs incident events
Race Control events forward official messages as they arrive. Incident events combine stopped-car and track context into a neutral alert lifecycle with phases and confidence.
Future Event Streams
The Event Bus support in F1 Sensor is designed to be extensible. Race Control and incident events are currently documented here. This page will be extended as new event types are introduced.