mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
added backup handling for another fuel edge case
This commit is contained in:
parent
9f457d24d2
commit
070d7d332c
1 changed files with 19 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue