mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-05-28 18:43:40 +00:00
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. |
||
|---|---|---|
| .. | ||
| api | ||
| binary_sensor | ||
| brand | ||
| config_flow_handlers | ||
| coordinator | ||
| custom_translations | ||
| entity_utils | ||
| interval_pool | ||
| number | ||
| sensor | ||
| services | ||
| switch | ||
| translations | ||
| utils | ||
| __init__.py | ||
| config_flow.py | ||
| const.py | ||
| data.py | ||
| diagnostics.py | ||
| entity.py | ||
| icons.json | ||
| manifest.json | ||
| migrations.py | ||
| services.yaml | ||