From b54316415d3c92848b0925565baac6791ba11476 Mon Sep 17 00:00:00 2001 From: David HERNANDEZ Date: Mon, 6 Jun 2022 11:00:27 +0200 Subject: [PATCH] Fix - Small fix on wrong DF variable name, prepared new fix version --- CHANGELOG.md | 4 ++++ docs/conf.py | 2 +- setup.py | 2 +- src/emhass/web_server.py | 4 ++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8e2f685..dbb59e90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.3.15] - 2022-06-06 +### Fix +- Fixed small bug with wrong DF variable name in web server. + ## [0.3.14] - 2022-06-05 ### Improvement - Added one more table to the weu showing the cost totals. diff --git a/docs/conf.py b/docs/conf.py index bd0f79fc..29f1bda4 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.3.14' +release = '0.3.15' # -- General configuration --------------------------------------------------- diff --git a/setup.py b/setup.py index 014114c2..1a94ee2b 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ setup( name='emhass', # Required - version='0.3.14', # Required + version='0.3.15', # 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/web_server.py b/src/emhass/web_server.py index 15f62791..61615757 100644 --- a/src/emhass/web_server.py +++ b/src/emhass/web_server.py @@ -42,8 +42,8 @@ def get_injection_dict(df, plot_size = 1366): image_path_2 = fig_2.to_html(full_html=False, default_width='75%') # The tables table1 = df.reset_index().to_html(classes='mystyle', index=False) - cost_cols = [i for i in opt_res.columns if 'cost_' in i] - table2 = df[cost_cols].reset_index().sum().to_frame(name='Cost Totals').to_html(classes='mystyle', index=False) + cost_cols = [i for i in df.columns if 'cost_' in i] + table2 = df[cost_cols].reset_index().sum().to_frame(name='Cost Totals').reset_index().to_html(classes='mystyle', index=False) # The dict of plots injection_dict = {} injection_dict['title'] = '

EMHASS optimization results

'