diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c3a6c24..c277634d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [0.8.2] - 2024-03-10 +### Improvement +- Proposed a new solution to survive DST using special option of Pandas `round` method +- Added option to `web_server` to init `data_path` as an options param +- Styling docs and html files on webui +- Advanced and basic pages improvements on webui +### Fix +- Fixed support for ARM achitectures + ## [0.8.1] - 2024-02-28 ### Improvement - Improved documentation @@ -587,6 +596,9 @@ Thanks to @GeoDerp for this great work! [0.7.6]: https://github.com/davidusb-geek/emhass/releases/tag/v0.7.6 [0.7.7]: https://github.com/davidusb-geek/emhass/releases/tag/v0.7.7 [0.7.8]: https://github.com/davidusb-geek/emhass/releases/tag/v0.7.8 +[0.8.0]: https://github.com/davidusb-geek/emhass/releases/tag/v0.8.0 +[0.8.1]: https://github.com/davidusb-geek/emhass/releases/tag/v0.8.1 +[0.8.2]: https://github.com/davidusb-geek/emhass/releases/tag/v0.8.2 # Notes All notable changes to this project will be documented in this file. diff --git a/docs/conf.py b/docs/conf.py index 91757f33..6f8dc0cd 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.8.1' +release = '0.8.2' # -- General configuration --------------------------------------------------- diff --git a/docs/develop.md b/docs/develop.md index 287a5dde..f3f5b511 100644 --- a/docs/develop.md +++ b/docs/develop.md @@ -222,7 +222,7 @@ docker run ... -v $(pwd)/data/:/app/data ... ``` #### Issue with TARGETARCH -If your docker build fails with an error related to `TARGETARCH`. It may be best to add your devices artitecture this in manually: +If your docker build fails with an error related to `TARGETARCH`. It may be best to add your devices architecture manually: Example with armhf architecture ```bash diff --git a/setup.py b/setup.py index 21ed7a1e..3805cbc0 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ setup( name='emhass', # Required - version='0.8.1', # Required + version='0.8.2', # 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 2f8d6abe..f9daddfe 100644 --- a/src/emhass/forecast.py +++ b/src/emhass/forecast.py @@ -159,7 +159,7 @@ def __init__(self, retrieve_hass_conf: dict, optim_conf: dict, plant_conf: dict, self.end_forecast = (self.start_forecast + self.optim_conf['delta_forecast']).replace(microsecond=0) self.forecast_dates = pd.date_range(start=self.start_forecast, end=self.end_forecast-self.freq, - freq=self.freq).round(self.freq) + freq=self.freq).round(self.freq, ambiguous='infer', nonexistent=self.freq) if params is not None: if 'prediction_horizon' in list(self.params['passed_data'].keys()): if self.params['passed_data']['prediction_horizon'] is not None: @@ -184,7 +184,7 @@ def get_weather_forecast(self, method: Optional[str] = 'scrapper', freq_scrap = pd.to_timedelta(60, "minutes") # The scrapping time step is 60min forecast_dates_scrap = pd.date_range(start=self.start_forecast, end=self.end_forecast-freq_scrap, - freq=freq_scrap).round(freq_scrap) + freq=freq_scrap).round(freq_scrap, ambiguous='infer', nonexistent=freq_scrap) # Using the clearoutside webpage response = get("https://clearoutside.com/forecast/"+str(round(self.lat, 2))+"/"+str(round(self.lon, 2))+"?desktop=true") '''import bz2 # Uncomment to save a serialized data for tests @@ -476,7 +476,7 @@ def get_forecast_days_csv(self, timedelta_days: Optional[int] = 1) -> pd.date_ra end_forecast_csv = (start_forecast_csv + self.optim_conf['delta_forecast']).replace(microsecond=0) forecast_dates_csv = pd.date_range(start=start_forecast_csv, end=end_forecast_csv+timedelta(days=timedelta_days)-self.freq, - freq=self.freq).round(self.freq) + freq=self.freq).round(self.freq, ambiguous='infer', nonexistent=self.freq) if self.params is not None: if 'prediction_horizon' in list(self.params['passed_data'].keys()): if self.params['passed_data']['prediction_horizon'] is not None: diff --git a/src/emhass/retrieve_hass.py b/src/emhass/retrieve_hass.py index 6bea5040..1535b179 100644 --- a/src/emhass/retrieve_hass.py +++ b/src/emhass/retrieve_hass.py @@ -149,7 +149,7 @@ def get_data(self, days_list: pd.date_range, var_list: list, minimal_response: O from_date = pd.to_datetime(df_raw['last_changed'], format="ISO8601").min() to_date = pd.to_datetime(df_raw['last_changed'], format="ISO8601").max() ts = pd.to_datetime(pd.date_range(start=from_date, end=to_date, freq=self.freq), - format='%Y-%d-%m %H:%M').round(self.freq) + format='%Y-%d-%m %H:%M').round(self.freq, ambiguous='infer', nonexistent=self.freq) df_day = pd.DataFrame(index = ts) # Caution with undefined string data: unknown, unavailable, etc. df_tp = df_raw.copy()[['state']].replace(