Skip to content

Commit e3c07fe

Browse files
committed
Make tech_switch_to checks less restrictive
The checks were assuming switching to electric tech in some cases, where users may want to represent switches away from electricity.
1 parent 08202ec commit e3c07fe

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

scout/ecm_prep.py

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3237,13 +3237,16 @@ def fill_mkts(self, msegs, msegs_cpl, convert_data, tsv_data_init, opts,
32373237
else:
32383238
# Set to original cooling tech./fuel if not switching to HP
32393239
if "cooling" in mskeys:
3240-
mskeys_swtch_tech, mskeys_swtch_fuel = [
3241-
mskeys[-2], mskeys[3]]
3240+
mskeys_swtch_tech, mskeys_swtch_fuel = [mskeys[-2], mskeys[3]]
32423241
else:
3243-
mskeys_swtch_tech = "resistance heat"
3242+
mskeys_swtch_tech = self.tech_switch_to
32443243
# Water heating
32453244
elif mskeys[4] == "water heating":
3246-
mskeys_swtch_tech = "electric WH"
3245+
# Set any switched to electric res. WH technology to the Scout/EIA name
3246+
if mskeys_swtch_fuel == "electricity":
3247+
mskeys_swtch_tech = "electric WH"
3248+
else:
3249+
mskeys_swtch_tech = None
32473250
# Cooking and drying
32483251
elif mskeys[4] in ["cooking", "drying"]:
32493252
mskeys_swtch_tech = None
@@ -3276,13 +3279,25 @@ def fill_mkts(self, msegs, msegs_cpl, convert_data, tsv_data_init, opts,
32763279
mskeys[4] == "cooling":
32773280
mskeys_swtch_tech = "comm_GSHP-cool"
32783281
else:
3279-
mskeys_swtch_tech = self.tech_switch_to
3282+
# Set to original cooling tech./fuel if not switching to HP
3283+
if "cooling" in mskeys:
3284+
mskeys_swtch_tech, mskeys_swtch_fuel = [mskeys[-2], mskeys[3]]
3285+
else:
3286+
mskeys_swtch_tech = self.tech_switch_to
32803287
# Water heating
32813288
elif mskeys[4] == "water heating":
3282-
mskeys_swtch_tech = "HP water heater"
3289+
# Ensure use of correct com. HP water heater name if in user name
3290+
if "HP" in self.tech_switch_to:
3291+
mskeys_swtch_tech = "HP water heater"
3292+
else:
3293+
mskeys_swtch_tech = self.tech_switch_to
32833294
# Cooking
32843295
elif mskeys[4] == "cooking":
3285-
mskeys_swtch_tech = "elec_range-combined"
3296+
# Com. cooking has only two names, one for electric and one for gas
3297+
if mskeys_swtch_fuel == "electricity":
3298+
mskeys_swtch_tech = "elec_range-combined"
3299+
else:
3300+
mskeys_swtch_tech = "gas_range-combined"
32863301
# Lighting - switch to comparable LED product based
32873302
# on lighting class in baseline
32883303
elif mskeys[4] == "lighting":

0 commit comments

Comments
 (0)