hass.tibber_prices/custom_components/tibber_prices
Julian Pawlowski 4876a2cc29 refactor(entity_utils): extract shared helpers from sensor platform
Created entity_utils/helpers.py with platform-agnostic utility functions:
- get_price_value(): Price unit conversion (major/minor currency)
- translate_level(): Price level translation
- translate_rating_level(): Rating level translation
- find_rolling_hour_center_index(): Rolling hour window calculations

These functions moved from sensor/helpers.py as they are used by both
sensor and binary_sensor platforms. Remaining sensor/helpers.py now
contains only sensor-specific helpers (aggregate_price_data, etc.).

Updated imports:
- sensor/core.py: Import from entity_utils instead of sensor.helpers
- entity_utils/icons.py: Fixed find_rolling_hour_center_index import
- binary_sensor platforms: Can now use shared helpers

Added clear docstrings explaining:
- entity_utils/helpers.py: Platform-agnostic utilities
- sensor/helpers.py: Sensor-specific aggregation functions

Impact: Better code reuse, clearer responsibility boundaries between
platform-specific and shared utilities.
2025-11-18 20:07:17 +00:00
..
api refactor: resolve circular imports and enhance documentation 2025-11-18 17:32:36 +00:00
binary_sensor feat(sensor): migrate chart_data_export from binary_sensor to sensor platform 2025-11-17 04:11:10 +00:00
config_flow_handlers feat(chart_export): add Chart Data Export diagnostic sensor 2025-11-17 03:14:02 +00:00
coordinator refactor: resolve circular imports and enhance documentation 2025-11-18 17:32:36 +00:00
custom_translations feat(sensor): migrate chart_data_export from binary_sensor to sensor platform 2025-11-17 04:11:10 +00:00
entity_utils refactor(entity_utils): extract shared helpers from sensor platform 2025-11-18 20:07:17 +00:00
sensor refactor(entity_utils): extract shared helpers from sensor platform 2025-11-18 20:07:17 +00:00
services refactor(services): split monolithic services.py into package 2025-11-18 20:07:05 +00:00
translations feat(sensor): migrate chart_data_export from binary_sensor to sensor platform 2025-11-17 04:11:10 +00:00
utils refactor(utils): create utils package and consolidate constants 2025-11-18 20:06:46 +00:00
__init__.py fix: handle unknown integration version in setup entry 2025-11-09 16:04:04 +00:00
config_flow.py refactor(config_flow): restructure package to satisfy hassfest validation 2025-11-15 17:40:53 +00:00
const.py feat(chart_export): add Chart Data Export diagnostic sensor 2025-11-17 03:14:02 +00:00
data.py refactoring 2025-04-23 16:42:31 +00:00
diagnostics.py update dev environment 2025-11-03 15:54:01 +00:00
entity.py feat(api): add multi-home support and diagnostic sensors 2025-11-16 00:11:56 +00:00
manifest.json chore(release): bump version to 0.10.0 2025-11-17 04:11:45 +00:00
services.yaml feat(chart_export): add Chart Data Export diagnostic sensor 2025-11-17 03:14:02 +00:00