mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-12-13 15:26:17 +00:00
EMS, Akku + erster Testfall (test.py)
This commit is contained in:
@@ -54,6 +54,18 @@ class PVForecast:
|
||||
def get_forecast_data(self):
|
||||
return self.forecast_data
|
||||
|
||||
|
||||
def get_forecast_for_date(self, input_date_str):
|
||||
input_date = datetime.strptime(input_date_str, "%Y-%m-%d")
|
||||
daily_forecast_obj = [data for data in self.forecast_data if datetime.strptime(data.get_date_time(), "%Y-%m-%dT%H:%M:%S.%f%z").date() == input_date.date()]
|
||||
daily_forecast = []
|
||||
for d in daily_forecast_obj:
|
||||
daily_forecast.append(d.get_ac_power())
|
||||
|
||||
return np.array(daily_forecast)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Beispiel für die Verwendung der Klasse
|
||||
|
||||
Reference in New Issue
Block a user