hass.tibber_prices/custom_components/tibber_prices
Julian Pawlowski decca432df feat(sensors): add timing sensors for best_price and peak_price periods
Added 10 new timing sensors (5 for best_price, 5 for peak_price) to track
period timing and progress:

Timestamp sensors (quarter-hour updates):
- best_price_end_time / peak_price_end_time
  Shows when current/next period ends (always useful reference time)
- best_price_next_start_time / peak_price_next_start_time
  Shows when next period starts (even during active periods)

Countdown sensors (minute updates):
- best_price_remaining_minutes / peak_price_remaining_minutes
  Minutes left in current period (0 when inactive)
- best_price_next_in_minutes / peak_price_next_in_minutes
  Minutes until next period starts
- best_price_progress / peak_price_progress
  Progress percentage through current period (0-100%)

Smart fallback behavior:
- Sensors always show useful values (no 'Unknown' during normal operation)
- Timestamp sensors show current OR next period end/start times
- Countdown sensors return 0 when no period is active
- Grace period: Progress stays at 100% for 60 seconds after period ends

Dynamic visual feedback:
- Progress icons differentiate 3 states at 0%:
  * No data: mdi:help-circle-outline (gray)
  * Waiting for next period: mdi:timer-pause-outline
  * Period just started: mdi:circle-outline
- Progress 1-99%: mdi:circle-slice-1 to mdi:circle-slice-8 (pie chart)
- Timer icons based on urgency (alert/timer/timer-sand/timer-outline)
- Dynamic colors: green (best_price), orange/red (peak_price), gray (disabled)
- icon_color attribute for UI styling

Implementation details:
- Dual update mechanism: quarter-hour (timestamps) + minute (countdowns)
- Period state callbacks: Check if period is currently active
- IconContext dataclass: Reduced function parameters from 6 to 3
- Unit constants: UnitOfTime.MINUTES, PERCENTAGE from homeassistant.const
- Complete translations for 5 languages (de, en, nb, nl, sv)

Impact: Users can now build sophisticated automations based on period timing
('start dishwasher if remaining_minutes > 60'), display countdowns in
dashboards, and get clear visual feedback about period states. All sensors
provide meaningful values at all times, making automation logic simpler.
2025-11-15 17:12:55 +00:00
..
binary_sensor refactor(binary_sensor): split into package matching sensor/ structure 2025-11-15 12:35:02 +00:00
config_flow refactor(config_flow): split monolithic file into modular package structure 2025-11-15 13:03:13 +00:00
custom_translations feat(sensors): add timing sensors for best_price and peak_price periods 2025-11-15 17:12:55 +00:00
entity_utils feat(sensors): add timing sensors for best_price and peak_price periods 2025-11-15 17:12:55 +00:00
period_utils refactor(volatility): migrate to coefficient of variation calculation 2025-11-14 01:12:47 +00:00
sensor feat(sensors): add timing sensors for best_price and peak_price periods 2025-11-15 17:12:55 +00:00
translations feat(sensors): add timing sensors for best_price and peak_price periods 2025-11-15 17:12:55 +00:00
__init__.py fix: handle unknown integration version in setup entry 2025-11-09 16:04:04 +00:00
api.py Fix AttributeError when homes lack active subscriptions (#28) 2025-11-15 13:08:15 +01:00
average_utils.py refactor(sensors): Refactor price sensor calculations and remove unused methods 2025-11-15 09:29:33 +00:00
const.py feat(sensors): add timestamp attributes and enhance icon system 2025-11-15 15:31:43 +00:00
coordinator.py feat(sensors): add timing sensors for best_price and peak_price periods 2025-11-15 17:12:55 +00:00
data.py refactoring 2025-04-23 16:42:31 +00:00
diagnostics.py update dev environment 2025-11-03 15:54:01 +00:00
entity.py fix: Remove unused model_id attribute from TibberPricesEntity 2025-11-07 14:45:33 +00:00
manifest.json chore(release): bump version to 0.6.1 2025-11-14 01:14:05 +00:00
price_utils.py refactor(sensors): rename current price sensors for clarity 2025-11-15 08:30:25 +00:00
services.py refactor(volatility): migrate to coefficient of variation calculation 2025-11-14 01:12:47 +00:00
services.yaml update 2025-05-25 22:15:25 +00:00