github Nicxe/f1_sensor v1.0.0

latest releases: v2.0.0, v2.0.0_RC, v2.0.0-RC...
2 months ago

This version introduces a significant internal refactor focused on aligning with Home Assistant's development best practices, improving long-term maintainability, and cleaning up the sensor structure.

⚠️ Breaking Changes

IMPORTANT:
Please remove the integration before upgrading to v1.0.0.
Otherwise, all entities will be re-created with a _2 suffix and previous ones will show as unavailable.

  • sensor.f1_race_week has been converted to a binary sensor: binary_sensor.f1_race_week
  • All entities will be recreated due to changes in unique_id and platform structure

✅ Improvements

  • Replaced custom aiohttp.ClientSession with Home Assistant’s async_get_clientsession(hass)
  • Moved binary_sensor to a separate platform (now declared in PLATFORMS)
  • Stabilized unique_id generation by detaching it from the user-defined name
  • Added translation support (translations/en.json)
  • Sensors now include device_info for correct device registry linking
  • Restructured codebase: smaller modules, improved maintainability
  • Prepped for testing and code linting (PEP8 via ruff)

🧠 Background

Previous implementation had several structural issues:

  • All sensors lived in a single module
  • Binary sensor was implemented despite not being listed in PLATFORMS
  • unique_id changed when the config name was edited
  • No translation support
  • No proper device registry linkage
    2
    These are now resolved to future-proof the integration and ensure full HA compatibility.

Don't miss a new f1_sensor release

NewReleases is sending notifications on new releases.