diff --git a/CHANGELOG.md b/CHANGELOG.md index 8477294e..4b1dd747 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [0.4.8] - 2023-03-17 +### Fix +- Fixed to correct index length for ML forecaster prediction series. + ## [0.4.7] - 2023-03-16 ### Fix - Fixed wrong column name for var_load when using predict with ML forecaster. diff --git a/docs/conf.py b/docs/conf.py index 3987943c..ce951477 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,7 +22,7 @@ author = 'David HERNANDEZ' # The full version, including alpha/beta/rc tags -release = '0.4.7' +release = '0.4.8' # -- General configuration --------------------------------------------------- diff --git a/setup.py b/setup.py index 3a021e6c..cd0509cc 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ setup( name='emhass', # Required - version='0.4.7', # Required + version='0.4.8', # Required description='An Energy Management System for Home Assistant', # Optional long_description=long_description, # Optional long_description_content_type='text/markdown', # Optional (see note above) diff --git a/src/emhass/forecast.py b/src/emhass/forecast.py index eadabe42..509200e3 100644 --- a/src/emhass/forecast.py +++ b/src/emhass/forecast.py @@ -613,6 +613,8 @@ def get_load_forecast(self, days_min_load_forecast: Optional[int] = 3, method: O else: data_last_window = None forecast_out = mlf.predict(data_last_window) + # Force forecast_out length to avoid mismatches + forecast_out = forecast_out.iloc[0:len(self.forecast_dates)] # Define DataFrame data_dict = {'ts':self.forecast_dates, 'yhat':forecast_out.values.tolist()} data = pd.DataFrame.from_dict(data_dict)