added backup handling for another fuel edge case

This commit is contained in:
Khalim Conn-Kowlessar 2025-11-14 22:51:45 +00:00
parent 9f457d24d2
commit 070d7d332c

View file

@ -691,7 +691,25 @@ class Recommendations:
"heating_cop": 1,
"hotwater_cop": 1
}
raise NotImplementedError("Handle this case")
if main_fuel_description in ['biogas (community)']:
return {
"heating_fuel_type": "Smokeless Fuel",
"hotwater_fuel_type": "Smokeless Fuel",
"heating_cop": 0.85,
"hotwater_cop": 0.85
}
logger.warning(
"Unhandled community fuel."
f"Fuel: {main_fuel_description}"
f"Heating: {heating_description}"
f"Heating: {hotwater_description}"
)
return {
"heating_fuel_type": "Unmapped",
"hotwater_fuel_type": "Unmapped",
"heating_cop": 0.9,
"hotwater_cop": 0.9
}
mapped = descriptions_to_fuel_types.get(heating_description, None)
if mapped is None: