hass.tibber_prices/custom_components/tibber_prices/translations
Julian Pawlowski 565397b8ca feat(migrations): add entity auto-migration system with HA repairs
Adds migrations.py with automatic entity registry migration for renamed
sensor keys. Separated from coordinator/repairs.py (runtime issues) and
__init__.py _migrate_config_options() (config format changes).

- ENTITY_KEY_RENAMES dict maps old→new entity keys (extensible)
- _auto_migrate_entity_keys() updates unique_id, preserves entity_id
- Handles partial migration (new entity already exists → remove old)
- Creates persistent HA repair issue after migration via ir.async_create_issue()
- Called in async_setup_entry() after _migrate_config_options()

Migrates: trend_change_in_minutes → next_price_trend_change_in

Repair issue informs users about:
- Auto-migrated entity renames (entity_id preserved, no action needed)
- Duration sensor value unit change (hours → minutes): update automation
  thresholds from `state < 0.25` to `state < 15` for 15-minute checks

All 5 language files (en, de, nb, nl, sv) updated with translations.

BREAKING CHANGE: Duration sensors (remaining time, starts in, period
duration, trend change countdown) now report state values in minutes
instead of hours. Display unit in dashboards remains hours by default.
Update numeric comparisons in automations accordingly.

Impact: Users upgrading from previous releases see an informational
repair notice guiding them through any required automation updates.
Entity renames are handled transparently with no loss of history.
2026-04-10 12:21:49 +00:00
..
de.json feat(migrations): add entity auto-migration system with HA repairs 2026-04-10 12:21:49 +00:00
en.json feat(migrations): add entity auto-migration system with HA repairs 2026-04-10 12:21:49 +00:00
nb.json feat(migrations): add entity auto-migration system with HA repairs 2026-04-10 12:21:49 +00:00
nl.json feat(migrations): add entity auto-migration system with HA repairs 2026-04-10 12:21:49 +00:00
sv.json feat(migrations): add entity auto-migration system with HA repairs 2026-04-10 12:21:49 +00:00