hass.tibber_prices/custom_components/tibber_prices/sensor
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
..
attributes feat(sensor): use dynamic precision for price rounding and display 2026-04-14 19:28:19 +00:00
calculators feat(sensor): use dynamic precision for price rounding and display 2026-04-14 19:28:19 +00:00
__init__.py refactor(currency)!: rename major/minor to base/subunit currency terminology 2025-12-11 08:26:30 +00:00
chart_data.py feat(sensors): add chart_metadata sensor for lightweight chart configuration 2025-12-05 20:30:54 +00:00
chart_metadata.py fix: support main and subunit currency 2025-12-11 23:07:06 +00:00
core.py feat(sensor): use dynamic precision for price rounding and display 2026-04-14 19:28:19 +00:00
definitions.py refactor(definitions): remove diagnostic entity category from day pattern sensors 2026-04-12 20:37:53 +00:00
helpers.py feat(sensor): use dynamic precision for price rounding and display 2026-04-14 19:28:19 +00:00
types.py feat(types): add TypedDict documentation and BaseCalculator helpers 2025-11-22 14:32:24 +00:00
value_getters.py feat(sensor): add next/previous/rolling-hour price rank sensors 2026-04-12 15:02:27 +00:00