added welsh translation to MainHeatControlAttributes

This commit is contained in:
Khalim Conn-Kowlessar 2023-09-07 15:40:55 +03:00
parent 43afeddb8e
commit 1a1cf80d7e
2 changed files with 14 additions and 1 deletions

View file

@ -72,10 +72,19 @@ class MainheatControlAttributes(Definitions):
"celect control": 'celect-type control'
}
WELSH_TEXT = {
"rhaglennydd, dim thermostat ystafell": "programmer, no room thermostat"
}
def __init__(self, description: str):
self.description: str = clean_description(description.lower())
self.nodata = not description or description in self.DATA_ANOMALY_MATCHES
translation = self.WELSH_TEXT.get(self.description)
if translation:
self.nodata = False
self.description = translation
# Remap
remapped = self.TO_REMAP.get(self.description)
if remapped:

View file

@ -131,6 +131,10 @@ mainheat_control_cases = [
{'original_description': 'Celect controls', 'thermostatic_control': 'celect-type control', 'charging_system': None,
'switch_system': None, 'no_control': None,
'dhw_control': None, 'community_heating': None, 'multiple_room_thermostats': False, 'auxiliary_systems': None,
'trvs': None},
{'original_description': 'Rhaglennydd, dim thermostat ystafell',
'thermostatic_control': 'room thermostat', 'charging_system': None,
'switch_system': "programmer", 'no_control': None,
'dhw_control': None, 'community_heating': None, 'multiple_room_thermostats': False, 'auxiliary_systems': None,
'trvs': None}
]