Skip to content

Commit

Permalink
#90 add växjö
Browse files Browse the repository at this point in the history
  • Loading branch information
magnuselden authored and magnuselden committed Jan 16, 2024
1 parent 152411b commit 610b0e6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
4 changes: 4 additions & 0 deletions peaqevcore/services/locale/Locale.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
SE_Eskilstuna,
SE_Ellevio,
SE_JBF,
SE_Vaxjo_Veab
# SE_Telge_Energi
)
from .countries.norway import (
Expand Down Expand Up @@ -73,6 +74,7 @@
LOCALE_NO_ASKER = "Asker Nett, Norway"
LOCALE_SE_ELLEVIO = "Ellevio, Sweden"
LOCALE_SE_JBF = "Jukkasjärvi (JBF), Sweden"
LOCALE_SE_VAXJO = "Växjö, Sweden (VEAB)"

LOCALETYPEDICT = {
LOCALE_DEFAULT: Default,
Expand Down Expand Up @@ -105,6 +107,7 @@
LOCALE_NO_ASKER: NO_AskerNett,
LOCALE_SE_ELLEVIO: SE_Ellevio,
LOCALE_SE_JBF: SE_JBF,
LOCALE_SE_VAXJO: SE_Vaxjo_Veab,
}

"""Lookup locales for config flow"""
Expand Down Expand Up @@ -135,6 +138,7 @@
LOCALE_SE_SOLLENTUNA,
LOCALE_SE_TEKNISKA_VERKEN_TARIFF_1,
LOCALE_SE_TEKNISKA_VERKEN_TARIFF_2,
LOCALE_SE_VAXJO,
LOCALE_DEFAULT,
LOCALE_NO_PEAK,
]
Expand Down
26 changes: 26 additions & 0 deletions peaqevcore/services/locale/countries/sweden.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,32 @@ def __post_init__(self):
This does not affect the peak, but should in future
"""

@dataclass
class SE_Vaxjo_Veab(Locale_Type):
#docs: https://www.veab.se/privat/elnat/sa-fungerar-effektabonnemang/
def __post_init__(self):
self.observed_peak = QueryType.AverageOfThreeDays
self.charged_peak = QueryType.AverageOfThreeDays
self.query_model = QUERYTYPES[QueryType.AverageOfThreeDays]
self.price = LocalePrice(
price_type=PriceType.Static,
value=42,
currency="SEK"
)
self.free_charge_pattern = TimePattern([
{
CalendarPeriods.Month: [*range(1, 12)],
CalendarPeriods.Weekday: [0,1,2,3,4],
CalendarPeriods.Hour: [21,22,23,0,1,2,3,4,5,6],
},
{
CalendarPeriods.Month: [*range(1, 12)],
CalendarPeriods.Weekday: [5,6],
CalendarPeriods.Hour: [*range(0, 24)],
}
])



@dataclass
class SE_Telge_Energi(Locale_Type):
Expand Down

0 comments on commit 610b0e6

Please sign in to comment.