hass.tibber_prices/custom_components/tibber_prices
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
..
api feat(api): add energy and tax fields to Tibber GraphQL queries 2026-04-09 18:27:21 +00:00
binary_sensor perf(sensors): add call-avoidance for timer-based state updates 2026-04-09 19:04:04 +00:00
brand feat(brand): update dark icons for improved visual consistency 2026-04-09 19:04:26 +00:00
config_flow_handlers feat(sensors)!: rename price_trend_Xh → price_outlook_Xh, add price_trajectory_Xh 2026-04-09 16:08:42 +00:00
coordinator feat(sensors)!: rename trend change countdown sensor for naming consistency 2026-04-10 09:08:27 +00:00
custom_translations feat(sensors)!: rename trend change countdown sensor for naming consistency 2026-04-10 09:08:27 +00:00
entity_utils fix(sensor): best price calculation on v-shaped days 2026-04-06 11:13:09 +00:00
interval_pool perf(interval_pool): hoist fetch_groups and precompute period criteria 2026-04-06 14:35:33 +00:00
number refactor(entities): remove redundant name= from all entity descriptions 2026-04-06 13:16:07 +00:00
sensor fix(sensors): use consistent rounding for trend duration calculations 2026-04-10 09:13:32 +00:00
services feat(services): add energy/tax fields to get_chartdata action 2026-04-09 18:27:53 +00:00
switch refactor(entities): remove redundant name= from all entity descriptions 2026-04-06 13:16:07 +00:00
translations feat(migrations): add entity auto-migration system with HA repairs 2026-04-10 12:21:49 +00:00
utils feat(trend): add direction-group detection, noise floor, and confirmation hysteresis 2026-04-07 13:44:01 +00:00
__init__.py feat(migrations): add entity auto-migration system with HA repairs 2026-04-10 12:21:49 +00:00
config_flow.py feat(config_flow): add price level gap tolerance for Tibber API level field 2025-12-22 20:25:30 +00:00
const.py feat(trend): add direction-group detection, noise floor, and confirmation hysteresis 2026-04-07 13:44:01 +00:00
data.py feat(interval-pool): add intelligent interval caching and memory optimization 2025-11-25 20:44:39 +00:00
diagnostics.py refactor(lifecycle): integrate with Pool for sensor metrics 2025-12-23 14:13:34 +00:00
entity.py fix(sensor): best price calculation on v-shaped days 2026-04-06 11:13:09 +00:00
icons.json feat(services): add hourly resolution option for chart data services 2026-01-20 15:51:34 +00:00
manifest.json chore(release): bump version to 0.30.0 2026-04-09 19:05:27 +00:00
migrations.py feat(migrations): add entity auto-migration system with HA repairs 2026-04-10 12:21:49 +00:00
services.yaml feat(services): add energy/tax fields to get_chartdata action 2026-04-09 18:27:53 +00:00