emhass 0.10.2__py3-none-any.whl → 0.10.3__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
@@ -807,6 +807,10 @@ def build_params(params: dict, params_secrets: dict, options: dict, addon: int,
807
807
  params["optim_conf"]["def_total_hours"] = [i["operating_hours_of_each_deferrable_load"] for i in options.get("list_operating_hours_of_each_deferrable_load")]
808
808
  if options.get("list_treat_deferrable_load_as_semi_cont", None) != None:
809
809
  params["optim_conf"]["treat_def_as_semi_cont"] = [i["treat_deferrable_load_as_semi_cont"] for i in options.get("list_treat_deferrable_load_as_semi_cont")]
810
+ if options.get("list_set_deferrable_load_single_constant", None) != None:
811
+ params["optim_conf"]["set_def_constant"] = [i["set_deferrable_load_single_constant"] for i in options.get("list_set_deferrable_load_single_constant")]
812
+ if options.get("list_set_deferrable_startup_penalty", None) != None:
813
+ params["optim_conf"]["def_start_penalty"] = [i["set_deferrable_startup_penalty"] for i in options.get("list_set_deferrable_startup_penalty")]
810
814
  params["optim_conf"]["weather_forecast_method"] = options.get("weather_forecast_method", params["optim_conf"]["weather_forecast_method"])
811
815
  # Update optional param secrets
812
816
  if params["optim_conf"]["weather_forecast_method"] == "solcast":
@@ -817,12 +821,6 @@ def build_params(params: dict, params_secrets: dict, options: dict, addon: int,
817
821
  params["optim_conf"]["load_forecast_method"] = options.get("load_forecast_method", params["optim_conf"]["load_forecast_method"])
818
822
  params["optim_conf"]["delta_forecast"] = options.get("delta_forecast_daily", params["optim_conf"]["delta_forecast"])
819
823
  params["optim_conf"]["load_cost_forecast_method"] = options.get("load_cost_forecast_method", params["optim_conf"]["load_cost_forecast_method"])
820
- if options.get("list_set_deferrable_load_single_constant", None) != None:
821
- params["optim_conf"]["set_def_constant"] = [i["set_deferrable_load_single_constant"] for i in options.get("list_set_deferrable_load_single_constant")]
822
-
823
- if options.get("list_set_deferrable_startup_penalty", None) != None:
824
- params["optim_conf"]["def_start_penalty"] = [i["set_deferrable_startup_penalty"] for i in options.get("list_set_deferrable_startup_penalty")]
825
-
826
824
  if (options.get("list_peak_hours_periods_start_hours", None) != None and options.get("list_peak_hours_periods_end_hours", None) != None):
827
825
  start_hours_list = [i["peak_hours_periods_start_hours"] for i in options["list_peak_hours_periods_start_hours"]]
828
826
  end_hours_list = [i["peak_hours_periods_end_hours"] for i in options["list_peak_hours_periods_end_hours"]]
@@ -889,7 +887,12 @@ def build_params(params: dict, params_secrets: dict, options: dict, addon: int,
889
887
  if params['optim_conf']['num_def_loads'] is not len(params['optim_conf']['treat_def_as_semi_cont']):
890
888
  logger.warning("treat_def_as_semi_cont / list_treat_deferrable_load_as_semi_cont does not match number in num_def_loads, adding default values to parameter")
891
889
  for x in range(len(params['optim_conf']['treat_def_as_semi_cont']), params['optim_conf']['num_def_loads']):
892
- params['optim_conf']['treat_def_as_semi_cont'].append(True)
890
+ params['optim_conf']['treat_def_as_semi_cont'].append(True)
891
+ if params['optim_conf']['num_def_loads'] is not len(params['optim_conf']['def_start_penalty']):
892
+ logger.warning("def_start_penalty / list_set_deferrable_startup_penalty does not match number in num_def_loads, adding default values to parameter")
893
+ for x in range(len(params['optim_conf']['def_start_penalty']), params['optim_conf']['num_def_loads']):
894
+ params['optim_conf']['def_start_penalty'].append(0.0)
895
+ # days_to_retrieve should be no less then 2
893
896
  if params['optim_conf']['num_def_loads'] is not len(params['optim_conf']['def_total_hours']):
894
897
  logger.warning("def_total_hours / list_operating_hours_of_each_deferrable_load does not match number in num_def_loads, adding default values to parameter")
895
898
  for x in range(len(params['optim_conf']['def_total_hours']), params['optim_conf']['num_def_loads']):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: emhass
3
- Version: 0.10.2
3
+ Version: 0.10.3
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
@@ -122,7 +122,7 @@ Installation instructions and example Home Assistant automation configurations a
122
122
 
123
123
  You must follow these steps to make EMHASS work properly:
124
124
 
125
- 1) Define all the parameters in the configuration file according to your installation. See the description for each parameter in the **configuration** section.
125
+ 1) Define all the parameters in the configuration file according to your installation method. For the add-on method you need to use the configuration pane directly on the add-on page. For other installation methods it should be needed to set the variables using the `config_emhass.yaml` file. See below for details on the installation methods. See the description for each parameter in the **configuration** section. If you have a PV installation then this dedicated webapp can be useful to find your inverter and solar panel models: [https://emhass-pvlib-database.streamlit.app/](https://emhass-pvlib-database.streamlit.app/)
126
126
 
127
127
  2) You most notably will need to define the main data entering EMHASS. This will be the `sensor.power_photovoltaics` for the name of the your hass variable containing the PV produced power and the variable `sensor.power_load_no_var_loads` for the load power of your household excluding the power of the deferrable loads that you want to optimize.
128
128
 
@@ -5,7 +5,7 @@ emhass/machine_learning_forecaster.py,sha256=kUa5b5Ay3ZO7ceU7yUo1p5vu2DI6QbXMFmz
5
5
  emhass/machine_learning_regressor.py,sha256=WmR9ODWkY64RAniqLowwf5tZWzPTVp5ftCTKNtzcd6I,10407
6
6
  emhass/optimization.py,sha256=LTIXc42IlMdARkstiqIHtDB0sryq230EohqJJsggKqE,47120
7
7
  emhass/retrieve_hass.py,sha256=k-BPZMqW-uQ95Q7Gzz93nPkLHStDCkI7-047GVYBGC0,22983
8
- emhass/utils.py,sha256=Q9X0pM3yMPVMoal6FVuUNft4RGZpLZYqeSWrwcg30AI,50380
8
+ emhass/utils.py,sha256=fMgEY792NBsLJl8URE-qEqzHy7Cj8eKolcotiLTwmsQ,50876
9
9
  emhass/web_server.py,sha256=Kwx3YmNugxMDHHWMiK-cb8qjLmM9ugKvaj6HWnI_NYc,24638
10
10
  emhass/data/cec_inverters.pbz2,sha256=tK8FvAUDW0uYez8EPttdCJwHhpPofclYV6GhhNZL0Pk,168272
11
11
  emhass/data/cec_modules.pbz2,sha256=8vEaysgYffXg3KUl8XSF36Mdywzi3LpEtUN_qenjO9s,1655747
@@ -18,9 +18,9 @@ emhass/static/img/emhass_logo_short.svg,sha256=yzMcqtBRCV8rH84-MwnigZh45_f9Eoqwh
18
18
  emhass/static/img/feather-sprite.svg,sha256=VHjMJQg88wXa9CaeYrKGhNtyK0xdd47zCqwSIa-hxo8,60319
19
19
  emhass/templates/index.html,sha256=_BsvUJ981uSQkx5H9tq_3es__x4WdPiOy7FjNoNYU9w,2744
20
20
  emhass/templates/template.html,sha256=TkGgMecQEbFUZA4ymPwMUzNjKHsENvCgroUWbPt7G4Y,158
21
- emhass-0.10.2.dist-info/LICENSE,sha256=1X3-S1yvOCBDBeox1aK3dq00m7dA8NDtcPrpKPISzbE,1077
22
- emhass-0.10.2.dist-info/METADATA,sha256=4hytYJ1JCekiyvvaYSILPuE55e46ao9Iaf4KGFCB6XM,44679
23
- emhass-0.10.2.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
24
- emhass-0.10.2.dist-info/entry_points.txt,sha256=6Bp1NFOGNv_fSTxYl1ke3K3h3aqAcBxI-bgq5yq-i1M,52
25
- emhass-0.10.2.dist-info/top_level.txt,sha256=L7fIX4awfmxQbAePtSdVg2e6x_HhghfReHfsKSpKr9I,7
26
- emhass-0.10.2.dist-info/RECORD,,
21
+ emhass-0.10.3.dist-info/LICENSE,sha256=1X3-S1yvOCBDBeox1aK3dq00m7dA8NDtcPrpKPISzbE,1077
22
+ emhass-0.10.3.dist-info/METADATA,sha256=WOwhdplR3hlUTegoxM_LWeTtp0SZuYijl_Pr8Eq4pwA,45146
23
+ emhass-0.10.3.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
24
+ emhass-0.10.3.dist-info/entry_points.txt,sha256=6Bp1NFOGNv_fSTxYl1ke3K3h3aqAcBxI-bgq5yq-i1M,52
25
+ emhass-0.10.3.dist-info/top_level.txt,sha256=L7fIX4awfmxQbAePtSdVg2e6x_HhghfReHfsKSpKr9I,7
26
+ emhass-0.10.3.dist-info/RECORD,,