Skip to content

[Bug]: current_tyres flips to a phantom stint opened with TyresNotChanged #831

Closed

Description

@Tagliax

Prerequisites

  • I am running the latest version of F1 Sensor
  • I have searched existing issues
  • I have restarted Home Assistant
  • All information in this issue, including logs and screenshots, is written in English. Issues containing non-English content will be closed without response.

F1 Sensor Version

5.7.2 (the same code is still in the v5.8.0 tag)

Component

Integration

Device

Raspberry Pi 5

Home Assistant Installation Type

Home Assistant Container

System Architecture

aarch64

Current Behavior

During the 2026 Singapore GP race, sensor.f1_live_drivers_current_tyres for ALO, HAD and STR kept flipping between two values, e.g. for ALO SOFT 22 laps → 6 → 24 → 6 → 26 → 6, although none of them pitted at that time. The official F1 pit stop summary shows a single stop for each: ALO lap 35, HAD lap 33, STR lap 26.

What the feed contains (official static archive, TimingAppData.jsonStream, car 14):

  • before the start the feed opens a second stint without a tyre change: Stints.1 = {Compound: SOFT, New: "true", TyresNotChanged: "1", TotalLaps: 0, StartLaps: 0};
  • its TotalLaps follows stint 0 up to 6, then only stint 0 keeps counting, while stint 1 still receives LapTime / LapNumber updates;
  • at the real stop, stint 1 is overwritten with the new tyres (final state: SOFT 35 laps, MEDIUM 26 laps).

In __init__.py the current tyre is taken with latest = stint_items[-1][1], the last stint of the incoming delta, so the shown stint depends on which stints a message happens to contain. current_stint_index also moves to the phantom index.

Expected Behavior

Ignore stints flagged TyresNotChanged: "1" (no tyre change) and choose the current stint by index, not by message order.

Logs

No error is logged.

Activity

  1. added a commit that references this issue on Oct 12, 2026
    89bddb5
  2. github-actions commented on Oct 12, 2026

    @github-actions
    Contributor

    A fix for this issue is now available in v5.8.0-beta.3, a BETA pre-release of F1 Sensor.

    To test the beta version, open HACS in Home Assistant, go to Integrations, and find F1 Sensor. Click the three-dot menu and select Redownload. Make sure Show beta versions is enabled in the HACS settings for this integration. Alternatively, you can download the release manually from the Releases page.

    Your feedback on the beta is very welcome — please report any issues you run into so they can be addressed before the stable release.

  3. github-actions commented on Oct 16, 2026

    @github-actions
    Contributor

    A fix for this issue is now available in v6.0.0, the latest stable release of F1 Sensor.

    To update via HACS, open Home Assistant, go to HACS → Integrations, find F1 Sensor, and click Update. If you installed it manually, download the latest release from the Releases page and replace the existing files.

    After updating, restart Home Assistant to apply the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions