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 asunavailable
.
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’sasync_get_clientsession(hass)
- Moved
binary_sensor
to a separate platform (now declared inPLATFORMS
) - 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.