Files
home-automation/app/integrations/pricing/__init__.py
T
tliu93 bedea196c3 M6-T03: add pricing profile framework + strategy registry
- app/integrations/pricing: profiles.py (pydantic ManualProfile/TibberProfile,
  load_profile/list_profiles/validate_values), manual.yaml + tibber.yaml
  (structure-only, no price values), strategies.py (register/get_strategy,
  manual dual-tariff + tibber strategies, all Decimal).
- tibber strategy matches nearest tibber_price with starts_at <= t0.
- tests for profiles + strategies (hand-checked dual-tariff & tibber math).
2026-06-23 20:58:34 +02:00

12 lines
536 B
Python

"""Pricing profile framework and strategy registry.
This package provides:
- ``profiles``: Pydantic models describing the structure of pricing profiles
(``ManualProfile`` / ``TibberProfile``), YAML loaders, and contract-values
validation (``load_profile`` / ``list_profiles`` / ``validate_values``).
- ``strategies``: A lightweight registry of price-calculation strategies
(``register_strategy`` / ``get_strategy``), with built-in implementations for
the ``manual`` (fixed dual-tariff) and ``tibber`` (dynamic API) kinds.
"""