hass.tibber_prices/custom_components/tibber_prices
Julian Pawlowski 2f704a35a3 refactor: remove dead code across integration
Remove unused functions, constants, and entity definitions that were
left over from previous refactorings. All removed code was either
superseded by better implementations or never actually called.

Removed functions:
- entity_utils/helpers.py: translate_level(), translate_rating_level()
  (HA handles ENUM translation automatically via translations/*.json)
- entity_utils/attributes.py: build_timestamp_attribute(),
  build_period_attributes() (superseded by inline implementations)
- sensor/helpers.py: get_hourly_price_value(), aggregate_window_data()
  (replaced by Calculator Pattern in sensor/calculators/)

Removed constants and definitions:
- const.py: CONF_CHART_DATA_CONFIG (DATA_CHART_CONFIG is the active one),
  PRICE_LEVEL_OPTIONS, PRICE_RATING_OPTIONS, VOLATILITY_OPTIONS,
  PRICE_TREND_OPTIONS (never imported; options defined inline in
  definitions.py due to HA import timing constraints),
  async_get_home_type_translation() (sync version used instead)
- coordinator/core.py: FRESH_TO_CACHED_SECONDS (leftover from old
  caching strategy, never referenced)
- switch/definitions.py: BEST_PRICE_SWITCH_ENTITIES (duplicate of
  BEST_PRICE_SWITCH_ENTITY_DESCRIPTIONS using base class instead of
  custom TibberPricesSwitchEntityDescription subclass)

Cleanup:
- entity_utils/__init__.py: Remove exports for deleted functions
- sensor/helpers.py: Remove now-unused imports (timedelta,
  get_intervals_for_day_offsets, get_price_value, Callable)
- entity_utils/helpers.py: Remove unused get_price_level_translation
  import after translate_level() removal
- sensor/definitions.py: Update 7x "Keep in sync with *_OPTIONS"
  comments to reference individual PRICE_LEVEL_*/PRICE_RATING_*/
  VOLATILITY_* constants instead

Impact: No user-visible changes. Reduces codebase by ~130 lines.
Improves maintainability by eliminating misleading dead code.
2026-04-11 12:13:26 +00:00
..
api feat(api): add energy and tax fields to Tibber GraphQL queries 2026-04-09 18:27:21 +00:00
binary_sensor fix(docs): correct inaccuracies and add missing documentation 2026-04-11 11:51:52 +00:00
brand feat(brand): update dark icons for improved visual consistency 2026-04-09 19:04:26 +00:00
config_flow_handlers fix(lint): apply Python 3.14 ruff rules and update HA minimum version 2026-04-11 10:56:34 +00:00
coordinator refactor: remove dead code across integration 2026-04-11 12:13:26 +00:00
custom_translations feat(sensors)!: rename trend change countdown sensor for naming consistency 2026-04-10 09:08:27 +00:00
entity_utils refactor: remove dead code across integration 2026-04-11 12:13:26 +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 refactor: remove dead code across integration 2026-04-11 12:13:26 +00:00
services fix(docs): correct inaccuracies and add missing documentation 2026-04-11 11:51:52 +00:00
switch refactor: remove dead code across integration 2026-04-11 12:13:26 +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 refactor: remove dead code across integration 2026-04-11 12:13:26 +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(lint): apply Python 3.14 ruff rules and update HA minimum version 2026-04-11 10:56:34 +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