From 6f59b832a5d73f10300c7f30bf6ea5b6f0c4b687 Mon Sep 17 00:00:00 2001 From: Brian Mirletz Date: Thu, 9 Nov 2023 09:35:05 -0700 Subject: [PATCH] Remove debug notice box, uncheck box if grid outage gets turned off --- deploy/runtime/ui/Battery REopt Optimization.json | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/deploy/runtime/ui/Battery REopt Optimization.json b/deploy/runtime/ui/Battery REopt Optimization.json index 13b3fda818..e1bebdb67d 100644 --- a/deploy/runtime/ui/Battery REopt Optimization.json +++ b/deploy/runtime/ui/Battery REopt Optimization.json @@ -254,7 +254,6 @@ "\tif ( is_crit() && is_grid_outage() ) {", "\t\tsize_outage = value('reopt_consider_outage');", "\t}", - "\tif ( size_outage ) {msgbox('howdy doody');}", "\t", "\tbatt_kw_original = value('batt_bank_power');", "\tbatt_kwh_original = value('batt_bank_size_ui');", @@ -400,8 +399,14 @@ "", "};", "", - "function enable_consider_grid_outage() {", - "\tenable('reopt_consider_outage', is_crit() && is_grid_outage() );", + "function enable_consider_grid_outage() {\r", + "\toutage_setup = is_crit() && is_grid_outage();", + "\tenable('reopt_consider_outage', outage_setup);\r", + "\t// Turn off size outage variable if outage is not set\r", + "\tsize_outage = value('reopt_consider_outage');\r", + "\tif (!outage_setup && size_outage) {\r", + "\t\tvalue('reopt_consider_outage', false);\r", + "\t}\r", "}" ] } \ No newline at end of file