From 420f4437071a8f81414953a52868e2efd9e5620f Mon Sep 17 00:00:00 2001 From: GeoDerp <18461782+GeoDerp@users.noreply.github.com> Date: Tue, 30 Jan 2024 21:24:39 +1030 Subject: [PATCH 1/2] fixed two list problems --- src/emhass/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emhass/utils.py b/src/emhass/utils.py index 803aca12..9155844a 100644 --- a/src/emhass/utils.py +++ b/src/emhass/utils.py @@ -580,8 +580,8 @@ def build_params(params: dict, params_secrets: dict, options: dict, addon: int, params['retrieve_hass_conf']['var_load'] = options.get('sensor_power_load_no_var_loads',params['retrieve_hass_conf']['var_load']) params['retrieve_hass_conf']['load_negative'] = options.get('load_negative',params['retrieve_hass_conf']['load_negative']) params['retrieve_hass_conf']['set_zero_min'] = options.get('set_zero_min',params['retrieve_hass_conf']['set_zero_min']) - params['retrieve_hass_conf']['var_replace_zero'] = options.get('sensor_power_photovoltaics',params['retrieve_hass_conf']['var_replace_zero']) - params['retrieve_hass_conf']['var_interp'] = options.get('sensor_power_photovoltaics',params['retrieve_hass_conf']['var_PV']), options.get('sensor_power_load_no_var_loads',params['retrieve_hass_conf']['var_load']) + params['retrieve_hass_conf']['var_replace_zero'] = [options.get('sensor_power_photovoltaics',params['retrieve_hass_conf']['var_replace_zero'])] + params['retrieve_hass_conf']['var_interp'] = [options.get('sensor_power_photovoltaics',params['retrieve_hass_conf']['var_PV']), options.get('sensor_power_load_no_var_loads',params['retrieve_hass_conf']['var_load'])] params['retrieve_hass_conf']['method_ts_round'] = options.get('method_ts_round',params['retrieve_hass_conf']['method_ts_round']) # Update params Secrets if specified params['params_secrets'] = params_secrets From c019921625c0cb51e72e8066e75c973e0269834a Mon Sep 17 00:00:00 2001 From: GeoDerp <18461782+GeoDerp@users.noreply.github.com> Date: Tue, 30 Jan 2024 21:34:55 +1030 Subject: [PATCH 2/2] added two more list fixes --- src/emhass/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emhass/utils.py b/src/emhass/utils.py index 9155844a..ae4667a9 100644 --- a/src/emhass/utils.py +++ b/src/emhass/utils.py @@ -578,8 +578,8 @@ def build_params(params: dict, params_secrets: dict, options: dict, addon: int, params['retrieve_hass_conf']['days_to_retrieve'] = options.get('historic_days_to_retrieve',params['retrieve_hass_conf']['days_to_retrieve']) params['retrieve_hass_conf']['var_PV'] = options.get('sensor_power_photovoltaics',params['retrieve_hass_conf']['var_PV']) params['retrieve_hass_conf']['var_load'] = options.get('sensor_power_load_no_var_loads',params['retrieve_hass_conf']['var_load']) - params['retrieve_hass_conf']['load_negative'] = options.get('load_negative',params['retrieve_hass_conf']['load_negative']) - params['retrieve_hass_conf']['set_zero_min'] = options.get('set_zero_min',params['retrieve_hass_conf']['set_zero_min']) + params['retrieve_hass_conf']['load_negative'] = [options.get('load_negative',params['retrieve_hass_conf']['load_negative'])] + params['retrieve_hass_conf']['set_zero_min'] = [options.get('set_zero_min',params['retrieve_hass_conf']['set_zero_min'])] params['retrieve_hass_conf']['var_replace_zero'] = [options.get('sensor_power_photovoltaics',params['retrieve_hass_conf']['var_replace_zero'])] params['retrieve_hass_conf']['var_interp'] = [options.get('sensor_power_photovoltaics',params['retrieve_hass_conf']['var_PV']), options.get('sensor_power_load_no_var_loads',params['retrieve_hass_conf']['var_load'])] params['retrieve_hass_conf']['method_ts_round'] = options.get('method_ts_round',params['retrieve_hass_conf']['method_ts_round'])