handling more fuel types

This commit is contained in:
Khalim Conn-Kowlessar 2025-11-15 00:30:36 +00:00
parent 3acad1e049
commit ab9b0b16f9
2 changed files with 3 additions and 2 deletions

View file

@ -85,6 +85,7 @@ DESCRIPTIONS_TO_FUEL_TYPES = {
"Air source heat pump, Systems with radiators, electric": {"fuel": "Electricity", "Air source heat pump, Systems with radiators, electric": {"fuel": "Electricity",
"cop": AVERAGE_ASHP_EFFICIENCY / 100}, "cop": AVERAGE_ASHP_EFFICIENCY / 100},
"Ground source heat pump, underfloor, electric": {"fuel": "Electricity", "cop": AVERAGE_ASHP_EFFICIENCY / 100}, "Ground source heat pump, underfloor, electric": {"fuel": "Electricity", "cop": AVERAGE_ASHP_EFFICIENCY / 100},
"Electric ceiling heating": {"fuel": "Electricity", "cop": 1},
} }
# These are the measure types where if there is a ventilation recommendation, we force the inclusion of it # These are the measure types where if there is a ventilation recommendation, we force the inclusion of it

View file

@ -711,7 +711,7 @@ class Recommendations:
"hotwater_cop": 0.9 "hotwater_cop": 0.9
} }
mapped = descriptions_to_fuel_types.get(heating_description, None) mapped = descriptions_to_fuel_types.get(heating_description.strip(), None)
if mapped is None: if mapped is None:
# TODO: This is a non-ideal placeholder but we put something in place for a process that falls over # TODO: This is a non-ideal placeholder but we put something in place for a process that falls over
# fairly regularly. A task has been added to planner to refactor this # fairly regularly. A task has been added to planner to refactor this
@ -738,7 +738,7 @@ class Recommendations:
"heating_cop": mapped["cop"], "hotwater_cop": 1 "heating_cop": mapped["cop"], "hotwater_cop": 1
} }
mapped_hotwater = descriptions_to_fuel_types.get(hotwater_description) mapped_hotwater = descriptions_to_fuel_types.get(hotwater_description.strip())
if mapped_hotwater is None: if mapped_hotwater is None:
# TODO: This is a non-ideal placeholder but we put something in place for a process that falls over # TODO: This is a non-ideal placeholder but we put something in place for a process that falls over
# fairly regularly. A task has been added to planner to refactor this # fairly regularly. A task has been added to planner to refactor this