hass.tibber_prices/custom_components/tibber_prices
Julian Pawlowski 3a25bd260e feat(binary_sensor): expose period calculation diagnostics as attributes
Add calculation summary attributes to best_price_period and
peak_price_period binary sensors for diagnostic transparency.

New attributes (all excluded from recorder history):
- min_periods_configured: User's configured target per day (always shown)
- periods_found_total: Actual periods found across all days (always shown)
- flat_days_detected: Days where CV <= 10% reduced target to 1 (only when > 0)
- relaxation_incomplete: Some days couldn't reach the target (only when true)

These attributes explain observed behavior without requiring users to
read logs: seeing "flat_days_detected: 1" alongside
"min_periods_configured: 2, periods_found_total: 1" immediately
explains why the count is lower than configured on uniform-price days.

Implementation:
- _compute_day_effective_min() now returns (dict, int) tuple to propagate
  the flat day count through to the metadata dict
- flat_days_detected added to metadata["relaxation"] in
  calculate_periods_with_relaxation()
- build_final_attributes_simple() gains optional period_metadata parameter
- New add_calculation_summary_attributes() function handles the rendering
- Attributes are shown even when no period is currently active

Updated recorder-optimization.md: attribute counts + clarified that
timestamp is correctly excluded (entity native_value is recorded
separately by HA as the entity state itself).

Impact: Users can understand why they received fewer periods than
configured without enabling debug logging.
2026-04-06 12:18:48 +00:00
..
api fix(api): handle None values in API responses to prevent AttributeError 2025-12-13 14:02:30 +00:00
binary_sensor feat(binary_sensor): expose period calculation diagnostics as attributes 2026-04-06 12:18:48 +00:00
config_flow_handlers fix(translations): update API token instructions to use placeholder for Tibber URL 2026-03-29 18:19:42 +00:00
coordinator feat(periods): handle flat days and absolute low-price scenarios 2026-04-06 12:18:40 +00:00
custom_translations feat(config_flow): show override warnings when config entities control settings 2026-01-21 17:36:51 +00:00
entity_utils fix(sensor): best price calculation on v-shaped days 2026-04-06 11:13:09 +00:00
interval_pool fix(interval_pool): fix DST spring-forward causing missing tomorrow intervals 2026-03-29 18:42:27 +00:00
number fix(sensor): best price calculation on v-shaped days 2026-04-06 11:13:09 +00:00
sensor fix(sensor): best price calculation on v-shaped days 2026-04-06 11:13:09 +00:00
services fix(sensor): best price calculation on v-shaped days 2026-04-06 11:13:09 +00:00
switch fix(sensor): best price calculation on v-shaped days 2026-04-06 11:13:09 +00:00
translations fix(translations): update API token instructions to use placeholder for Tibber URL 2026-03-29 18:19:42 +00:00
utils feat(sensors): add 5-level price trend scale with configurable thresholds 2026-01-20 13:36:01 +00:00
__init__.py feat(config_flow): show override warnings when config entities control settings 2026-01-21 17:36:51 +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(sensors): add 5-level price trend scale with configurable thresholds 2026-01-20 13:36: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.27.0 2026-03-29 18:49:21 +00:00
services.yaml feat(services): add hourly resolution option for chart data services 2026-01-20 15:51:34 +00:00