Skip to content

Increase price precision from 3 to 4 decimal places - #445

Draft
Danielhiversen with Copilot wants to merge 2 commits into
masterfrom
copilot/dont-round-prices-to-4-digits
Draft

Increase price precision from 3 to 4 decimal places#445
Danielhiversen with Copilot wants to merge 2 commits into
masterfrom
copilot/dont-round-prices-to-4-digits

Conversation

Copilot AI commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

The Tibber API returns prices with 4 significant decimal digits, but pyTibber was rounding to 3, introducing cumulative errors that cause discrepancies when reconciling calculations over longer periods.

Changes

  • current_price_data: round(price_total, 3)round(price_total, 4)
  • price_attributes: All derived price values (price_total, avg_price, off_peak_1, peak, off_peak_2) rounded to 4 decimal places instead of 3

Co-authored-by: Danielhiversen <650502+Danielhiversen@users.noreply.github.com>
Copilot AI changed the title [WIP] Update pricing information to include 4 digits after zero Increase price precision from 3 to 4 decimal places Aug 14, 2026
Copilot AI requested a review from Danielhiversen August 14, 2026 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please don't round prices to 3 digits

2 participants