hass.tibber_prices/custom_components/tibber_prices/entity_utils
Julian Pawlowski 3e6bcf2345 fix(sensor): synchronize current_interval_price_base with current_interval_price
Fixed inconsistency between "Current Electricity Price" and "Current Electricity Price
(Energy Dashboard)" sensors that were showing different prices and icons.

Changes:
- Add current_interval_price_base to TIME_SENSITIVE_ENTITY_KEYS so it updates at
  quarter-hour boundaries instead of only on API polls. This ensures both sensors
  update synchronously when a new 15-minute interval starts.
- Use interval_data["startsAt"] as timestamp for current interval price sensors
  (both variants) instead of rounded calculation time. This prevents timestamp
  divergence when sensors update at slightly different times.
- Include current_interval_price_base in icon color attribute mapping so both
  sensors display the same dynamic cash icon based on current price level.
- Include current_interval_price_base in dynamic icon function so it gets the
  correct icon based on current price level (VERY_CHEAP/CHEAP/NORMAL/EXPENSIVE).

Impact: Both sensors now show identical prices, timestamps, and icons as intended.
They update synchronously at interval boundaries (00, 15, 30, 45 minutes) and
correctly represent the Energy Dashboard compatible variant without lag or
inconsistencies.
2025-12-26 16:23:05 +00:00
..
__init__.py refactor(entity_utils): extract shared helpers from sensor platform 2025-11-18 20:07:17 +00:00
attributes.py refactor(entity): switch description content based on extended_descriptions 2025-11-21 17:30:29 +00:00
colors.py feat(sensors): add timing sensors for best_price and peak_price periods 2025-11-15 17:12:55 +00:00
helpers.py refactor(currency)!: rename major/minor to base/subunit currency terminology 2025-12-11 08:26:30 +00:00
icons.py fix(sensor): synchronize current_interval_price_base with current_interval_price 2025-12-26 16:23:05 +00:00