hass.tibber_prices/custom_components/tibber_prices
Julian Pawlowski efda22f7ad refactor(binary_sensor): split into package matching sensor/ structure
Split binary_sensor.py (645 lines) into binary_sensor/ package with
4 modules following the established sensor/ pattern for consistency
and maintainability.

Package structure:
- binary_sensor/__init__.py (32 lines): Platform setup
- binary_sensor/definitions.py (46 lines): ENTITY_DESCRIPTIONS, constants
- binary_sensor/attributes.py (443 lines): Attribute builder functions
- binary_sensor/core.py (282 lines): TibberPricesBinarySensor class

Changes:
- Created binary_sensor/ package with __init__.py importing from .core
- Extracted ENTITY_DESCRIPTIONS and constants to definitions.py
- Moved 13 attribute builders to attributes.py (get_price_intervals_attributes,
  build_async/sync_extra_state_attributes, add_* helpers)
- Moved TibberPricesBinarySensor class to core.py with state logic and
  icon handling
- Used keyword-only parameters to satisfy Ruff PLR0913 (too many args)
- Applied absolute imports (custom_components.tibber_prices.*) in modules

All 4 binary sensors tested and working:
- peak_price_period
- best_price_period
- connection
- tomorrow_data_available

Documentation updated:
- AGENTS.md: Architecture Overview, Component Structure, Common Tasks
- binary-sensor-refactoring-plan.md: Marked  COMPLETED with summary

Impact: Symmetric platform structure (sensor/ ↔ binary_sensor/). Easier
to add new binary sensors following documented pattern. No user-visible
changes.
2025-11-15 12:35:02 +00:00
..
binary_sensor refactor(binary_sensor): split into package matching sensor/ structure 2025-11-15 12:35:02 +00:00
custom_translations refactor(sensors): rename current price sensors for clarity 2025-11-15 08:30:25 +00:00
entity_utils refactor(sensors): Transform sensor platform into package 2025-11-15 11:46:54 +00:00
period_utils refactor(volatility): migrate to coefficient of variation calculation 2025-11-14 01:12:47 +00:00
sensor refactor(sensors): Transform sensor platform into package 2025-11-15 11:46:54 +00:00
translations refactor(sensors): rename current price sensors for clarity 2025-11-15 08:30:25 +00:00
__init__.py fix: handle unknown integration version in setup entry 2025-11-09 16:04:04 +00:00
api.py Fix AttributeError when homes lack active subscriptions (#28) 2025-11-15 13:08:15 +01:00
average_utils.py refactor(sensors): Refactor price sensor calculations and remove unused methods 2025-11-15 09:29:33 +00:00
config_flow.py refactor(sensors): Transform sensor platform into package 2025-11-15 11:46:54 +00:00
const.py refactor(sensors): Transform sensor platform into package 2025-11-15 11:46:54 +00:00
coordinator.py refactor(sensors): rename current price sensors for clarity 2025-11-15 08:30:25 +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 fix: Remove unused model_id attribute from TibberPricesEntity 2025-11-07 14:45:33 +00:00
manifest.json chore(release): bump version to 0.6.1 2025-11-14 01:14:05 +00:00
price_utils.py refactor(sensors): rename current price sensors for clarity 2025-11-15 08:30:25 +00:00
services.py refactor(volatility): migrate to coefficient of variation calculation 2025-11-14 01:12:47 +00:00
services.yaml update 2025-05-25 22:15:25 +00:00