emhass 0.4.9__py3-none-any.whl → 0.4.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
emhass/utils.py CHANGED
@@ -136,8 +136,8 @@ def treat_runtimeparams(runtimeparams: str, params: str, retrieve_hass_conf: dic
136
136
  'custom_batt_soc_forecast_id': {"entity_id": "sensor.soc_batt_forecast", "unit_of_measurement": "%", "friendly_name": "Battery SOC Forecast"},
137
137
  'custom_grid_forecast_id': {"entity_id": "sensor.p_grid_forecast", "unit_of_measurement": "W", "friendly_name": "Grid Power Forecast"},
138
138
  'custom_cost_fun_id': {"entity_id": "sensor.total_cost_fun_value", "unit_of_measurement": "", "friendly_name": "Total cost function value"},
139
- 'custom_unit_load_cost_id': {"entity_id": "sensor.unit_load_cost", "unit_of_measurement": "", "friendly_name": "Unit Load Cost"},
140
- 'custom_unit_prod_price_id': {"entity_id": "sensor.unit_load_cost", "unit_of_measurement": "", "friendly_name": "Unit Prod Price"},
139
+ 'custom_unit_load_cost_id': {"entity_id": "sensor.unit_load_cost", "unit_of_measurement": "€/kWh", "friendly_name": "Unit Load Cost"},
140
+ 'custom_unit_prod_price_id': {"entity_id": "sensor.unit_prod_price", "unit_of_measurement": "€/kWh", "friendly_name": "Unit Prod Price"},
141
141
  'custom_deferrable_forecast_id': custom_deferrable_forecast_id}
142
142
  if 'passed_data' in params.keys():
143
143
  for key, value in default_passed_dict.items():
emhass/web_server.py CHANGED
@@ -30,16 +30,23 @@ app.logger.addHandler(ch)
30
30
  def get_injection_dict(df, plot_size = 1366):
31
31
  # Create plots
32
32
  cols_p = [i for i in df.columns.to_list() if 'P_' in i]
33
+ n_colors = len(cols_p)
34
+ colors = px.colors.sample_colorscale("jet", [n/(n_colors -1) for n in range(n_colors)])
33
35
  fig_0 = px.line(df[cols_p], title='Systems powers schedule after optimization results',
34
- template='presentation', width=plot_size, height=0.5*plot_size, line_shape="hv")
36
+ template='presentation', width=plot_size, height=0.5*plot_size, line_shape="hv",
37
+ color_discrete_sequence=colors)
35
38
  fig_0.update_layout(xaxis_title='Timestamp', yaxis_title='System powers (W)')
36
39
  if 'SOC_opt' in df.columns.to_list():
37
40
  fig_1 = px.line(df['SOC_opt'], title='Battery state of charge schedule after optimization results',
38
- template='presentation', width=plot_size, height=0.5*plot_size, line_shape="hv")
41
+ template='presentation', width=plot_size, height=0.5*plot_size, line_shape="hv",
42
+ color_discrete_sequence=colors)
39
43
  fig_1.update_layout(xaxis_title='Timestamp', yaxis_title='Battery SOC (%)')
40
44
  cols_cost = [i for i in df.columns.to_list() if 'cost_' in i or 'unit_' in i]
45
+ n_colors = len(cols_cost)
46
+ colors = px.colors.sample_colorscale("jet", [n/(n_colors -1) for n in range(n_colors)])
41
47
  fig_2 = px.line(df[cols_cost], title='Systems costs obtained from optimization results',
42
- template='presentation', width=plot_size, height=0.5*plot_size, line_shape="hv")
48
+ template='presentation', width=plot_size, height=0.5*plot_size, line_shape="hv",
49
+ color_discrete_sequence=colors)
43
50
  fig_2.update_layout(xaxis_title='Timestamp', yaxis_title='System costs (currency)')
44
51
  # Get full path to image
45
52
  image_path_0 = fig_0.to_html(full_html=False, default_width='75%')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: emhass
3
- Version: 0.4.9
3
+ Version: 0.4.10
4
4
  Summary: An Energy Management System for Home Assistant
5
5
  Home-page: https://github.com/davidusb-geek/emhass
6
6
  Author: David HERNANDEZ
@@ -4,12 +4,12 @@ emhass/forecast.py,sha256=mJY846P_VWK_Ov-F-SZg_We55Y799a5b8Lwo1bO_JK8,43072
4
4
  emhass/machine_learning_forecaster.py,sha256=C0k3bkq0pXRmfwIMigrh0aI2ZRO-qa7WFtDcPoGwFEQ,14964
5
5
  emhass/optimization.py,sha256=QL9LpOhhpo_YgmF3_lvXWPGdz-ZeH62_zUCwm2swlyM,30582
6
6
  emhass/retrieve_hass.py,sha256=lsLSiWB2XC1TTlAw_GR7YWjVXti4ZXKhICROST8UlTw,15888
7
- emhass/utils.py,sha256=3P2yw8_4PfRY0JawGr7lIWUrCYIL6fT6tBDdWO5PIbg,23107
8
- emhass/web_server.py,sha256=wQT0HD8N86zC2V28L4zVUqVfP6sj0U-ZmltoUc51rXs,18255
7
+ emhass/utils.py,sha256=M1-E0o-X0D1uOrKARRTnvhzosd3pYCkPjbEvumc34Ic,23116
8
+ emhass/web_server.py,sha256=z4oFYG_rzVhhyCd7vOLsJWM2LG8pbdPMJMmJpmwH7JI,18654
9
9
  emhass/static/style.css,sha256=5qGJl0MZGSaSvr0HUcGQ9UgMtDKP2CiyE-1H-jbsLuU,6760
10
10
  emhass/templates/index.html,sha256=DGP5PayjyDJnZo9LYRrGg0pYIfr-AwwITgKocmUbruU,6615
11
- emhass-0.4.9.dist-info/METADATA,sha256=oAdUtkUj4dlQnjoEgzf7sBAM0GDfKr903UCDzklNLis,27317
12
- emhass-0.4.9.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
13
- emhass-0.4.9.dist-info/entry_points.txt,sha256=tJULCm7mHGYb_IxyzPN_4KFYvhxv209_jq68jPiByy0,53
14
- emhass-0.4.9.dist-info/top_level.txt,sha256=L7fIX4awfmxQbAePtSdVg2e6x_HhghfReHfsKSpKr9I,7
15
- emhass-0.4.9.dist-info/RECORD,,
11
+ emhass-0.4.10.dist-info/METADATA,sha256=tfIyU_0oLp1IYVLI1PjrURM-1NXMkxL96jtdG5uVVH4,27318
12
+ emhass-0.4.10.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
13
+ emhass-0.4.10.dist-info/entry_points.txt,sha256=tJULCm7mHGYb_IxyzPN_4KFYvhxv209_jq68jPiByy0,53
14
+ emhass-0.4.10.dist-info/top_level.txt,sha256=L7fIX4awfmxQbAePtSdVg2e6x_HhghfReHfsKSpKr9I,7
15
+ emhass-0.4.10.dist-info/RECORD,,