Skip to content

Commit

Permalink
Merge pull request #164 from GeoDerp/master
Browse files Browse the repository at this point in the history
Fix optional bugs
  • Loading branch information
davidusb-geek authored Jan 30, 2024
2 parents 09d4cfe + c019921 commit f78158e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/emhass/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,10 @@ 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']['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']['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'])
# Update params Secrets if specified
params['params_secrets'] = params_secrets
Expand Down

0 comments on commit f78158e

Please sign in to comment.