mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Debugging lighting and heating
This commit is contained in:
parent
71dad618ba
commit
e7bd4be0b0
3 changed files with 12 additions and 0 deletions
|
|
@ -30,6 +30,9 @@ class LightingAttributes:
|
|||
if "all fixed outlets" in description:
|
||||
return {"low_energy_proportion": 1}
|
||||
|
||||
if "excellent lighting efficiency" in description:
|
||||
return {"low_energy_proportion": 1}
|
||||
|
||||
if ('good lighting efficiency' in description) or ('excellent lighting efficiency' in description) or \
|
||||
('below average lighting efficiency' in description):
|
||||
average = [
|
||||
|
|
|
|||
|
|
@ -24,6 +24,10 @@ class MainHeatAttributes(Definitions):
|
|||
"bwyler a rheiddiaduron, nwy prif gyflenwad": "boiler and radiators, mains gas",
|
||||
}
|
||||
|
||||
REMAP = {
|
||||
"electric ceiling": "electric ceiling heating"
|
||||
}
|
||||
|
||||
def __init__(self, description: str):
|
||||
|
||||
self.description = switch_chars(description.lower())
|
||||
|
|
@ -37,6 +41,10 @@ class MainHeatAttributes(Definitions):
|
|||
self.nodata = False
|
||||
self.description = translation
|
||||
|
||||
remap = self.REMAP.get(self.description)
|
||||
if remap:
|
||||
self.description = remap
|
||||
|
||||
if not description or not any(
|
||||
rt in self.description for rt in
|
||||
self.HEAT_SYSTEMS + self.FUEL_TYPES + self.DISTRIBUTION_SYSTEMS + self.OTHERS
|
||||
|
|
|
|||
|
|
@ -33,4 +33,5 @@ test_cases = [
|
|||
{'original_description': 'Goleuadau ynni-isel mewn 60% oGÇÖr mannau gosod', 'low_energy_proportion': 0.6},
|
||||
{'original_description': 'Goleuadau ynni-isel ym mhob un oGÇÖr mannau gosod', 'low_energy_proportion': 1},
|
||||
{'original_description': 'Dim goleuadau ynni-isel', 'low_energy_proportion': 0},
|
||||
{'original_description': 'Excellent lighting efficiency', 'low_energy_proportion': 1},
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue