hass.tibber_prices/custom_components/tibber_prices
Julian Pawlowski a4ad506e01 feat(sensor): use dynamic precision for price rounding and display
Add get_display_precision() to const.py returning DISPLAY_PRECISION_SUBUNIT (2)
or DISPLAY_PRECISION_BASE (4) based on config. Replace hardcoded round(..., 2)
with get_display_precision() in all calculators and attribute builders.
Add _update_suggested_precision() to sensor core; syncs entity registry
suggested_display_precision on every coordinator update.

Interval price sensors get full precision (2 or 4 dp); other MONETARY sensors
get half precision (1 or 2 dp) as sensible default.

Impact: Price sensor states and attributes now correctly use 4 decimal places
in base-currency mode (was always 2). Display precision in dashboards updates
automatically when currency mode changes.
2026-04-14 19:28:19 +00:00
..
api feat(api): add energy and tax fields to Tibber GraphQL queries 2026-04-09 18:27:21 +00:00
binary_sensor fix(periods): rename periods_remaining to period_count_remaining 2026-04-12 10:05:21 +00:00
brand feat(brand): update dark icons for improved visual consistency 2026-04-09 19:04:26 +00:00
config_flow_handlers refactor(options_flow): optimize loading of override translations based on active overrides 2026-04-12 08:54:41 +00:00
coordinator refactor(shape_extension): improve period extension logic and documentation 2026-04-12 16:30:19 +00:00
custom_translations feat(translations): enhance price trend change descriptions and usage tips 2026-04-12 19:55:57 +00:00
entity_utils feat(sensor): use dynamic precision for price rounding and display 2026-04-14 19:28:19 +00:00
interval_pool refactor(manager): enhance API error handling and fallback logic 2026-04-13 12:28:36 +00:00
number refactor(entities): remove redundant name= from all entity descriptions 2026-04-06 13:16:07 +00:00
sensor feat(sensor): use dynamic precision for price rounding and display 2026-04-14 19:28:19 +00:00
services refactor(services): enhance validation for service parameters and error messages 2026-04-13 12:02:19 +00:00
switch refactor: remove dead code across integration 2026-04-11 12:13:26 +00:00
translations refactor(translations): update error messages for array_fields validation 2026-04-13 12:13:34 +00:00
utils feat(sensor): add price rank sensors and IQR-based volatility attributes 2026-04-12 14:13:47 +00:00
__init__.py feat(migrations): add entity auto-migration system with HA repairs 2026-04-10 12:21:49 +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(sensor): use dynamic precision for price rounding and display 2026-04-14 19:28:19 +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(lint): apply Python 3.14 ruff rules and update HA minimum version 2026-04-11 10:56:34 +00:00
icons.json chore(style): reformat JSON config files from 4-space to 2-space indent 2026-04-12 14:15:04 +00:00
manifest.json docs(CONTRIBUTING): improve clarity and formatting in contribution guidelines 2026-04-14 15:35:16 +00:00
migrations.py feat(migrations): add entity auto-migration system with HA repairs 2026-04-10 12:21:49 +00:00
services.yaml feat(translations): enhance price trend change descriptions and usage tips 2026-04-12 19:55:57 +00:00