hass.tibber_prices/custom_components/tibber_prices/sensor/calculators
Julian Pawlowski 2a08515ba0
Some checks are pending
Lint / Ruff (push) Waiting to run
Validate / Hassfest validation (push) Waiting to run
Validate / HACS validation (push) Waiting to run
fix(sensors): use consistent rounding for trend duration calculations
Replaced int(time.minutes_until()) with time.minutes_until_rounded()
in trend calculator (3 locations). The int() call truncated values
(14.7 → 14) while timing sensors used standard rounding (14.7 → 15).

All duration sensors now use the same rounding method
(math.floor(seconds/60 + 0.5)), matching HA's timestamp rendering
behavior.

Impact: Trend countdown values may differ by ±1 minute compared to
previous behavior. Consistency across all duration sensors improved.
2026-04-10 09:13:32 +00:00
..
__init__.py feat(sensor): add data lifecycle diagnostic sensor with push updates 2025-11-20 15:12:41 +00:00
base.py refactor(price_info): price data handling to use unified interval retrieval 2025-11-24 10:49:34 +00:00
daily_stat.py feat(sensors): expose energy/tax breakdown as sensor attributes 2026-04-09 18:27:36 +00:00
interval.py refactor(currency)!: rename major/minor to base/subunit currency terminology 2025-12-11 08:26:30 +00:00
lifecycle.py fix(sensor): streamline lifecycle attrs and next poll visibility 2025-12-26 12:13:36 +00:00
metadata.py refactor(naming): complete class naming convention alignment 2025-11-20 11:22:53 +00:00
rolling_hour.py refactor(sensor): replace redundant pass-through lambdas with direct references 2026-04-06 14:28:51 +00:00
timing.py fix(sensor): best price calculation on v-shaped days 2026-04-06 11:13:09 +00:00
trend.py fix(sensors): use consistent rounding for trend duration calculations 2026-04-10 09:13:32 +00:00
volatility.py fix(volatility): expose price coefficient variation attribute 2025-12-25 19:10:42 +00:00
window_24h.py feat(sensors): always show both mean and median in average sensor attributes 2025-12-18 15:12:30 +00:00