mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-04-19 08:55:15 +00:00
test_elecpriceakkudoktor bugfix (#360)
* test_elecpriceakkudoktor bugfix * remove print * warning
This commit is contained in:
parent
34d8e88771
commit
b43bf105aa
@ -187,6 +187,13 @@ class ElecPriceAkkudoktor(ElecPriceProvider):
|
|||||||
self.config.prediction_hours
|
self.config.prediction_hours
|
||||||
- ((highest_orig_datetime - self.start_datetime).total_seconds() // 3600)
|
- ((highest_orig_datetime - self.start_datetime).total_seconds() // 3600)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if needed_prediction_hours <= 0:
|
||||||
|
logger.warning(
|
||||||
|
f"No prediction needed. needed_prediction_hours={needed_prediction_hours}, prediction_hours={self.config.prediction_hours},highest_orig_datetime {highest_orig_datetime}, start_datetime {self.start_datetime}"
|
||||||
|
) # this might keep data longer than self.start_datetime + self.config.prediction_hours in the records
|
||||||
|
return
|
||||||
|
|
||||||
if amount_datasets > 800: # we do the full ets with seasons of 1 week
|
if amount_datasets > 800: # we do the full ets with seasons of 1 week
|
||||||
prediction = self._predict_ets(
|
prediction = self._predict_ets(
|
||||||
history, seasonal_periods=168, prediction_hours=needed_prediction_hours
|
history, seasonal_periods=168, prediction_hours=needed_prediction_hours
|
||||||
|
Loading…
x
Reference in New Issue
Block a user