PricePower/calculator/schema.py

35 lines
573 B
Python
Raw Normal View History

2024-08-07 23:31:21 +00:00
from dataclasses import dataclass
from typing import Dict, List, Optional
@dataclass
class Price:
hours: Dict[str, float]
now: Optional[float] = None # Price in current hour
@dataclass
class CheapestHours:
hours: List[int]
is_cheapest: Optional[bool] = None
@dataclass
class DayPrice:
monthly_fees: float
monthly_fees_hour: float
kwh_fees_low: float
kwh_fees_high: float
sell_fees: float
low_tariff_hours: List[int]
vat: float
spot: Price
total: Price
sell: Price
cheapest_hours: CheapestHours