hub/imports/occupancy_feeders/helpers/schedules_helper.py

35 lines
927 B
Python
Raw Normal View History

2020-10-22 11:02:41 -04:00
"""
2020-12-15 14:57:46 -05:00
Schedules helper
2020-10-22 11:02:41 -04:00
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
"""
2020-12-15 14:57:46 -05:00
class SchedulesHelper:
comnet_pluto_function = {
'C1': 'C-12 Residential',
'C5': 'C-12 Residential',
'D3': 'C-12 Residential',
'D6': 'C-12 Residential',
2020-10-22 11:02:41 -04:00
'I1': 'C-2 Health',
'RI': 'C-12 Residential',
'RM': 'C-12 Residential',
'U0': 'C-10 Warehouse',
'W4': 'C-9 School',
2020-10-22 11:02:41 -04:00
}
2020-12-15 14:57:46 -05:00
comnet_function = {
2020-12-14 10:51:10 -05:00
'residential': 'C-12 Residential'
}
2020-10-22 11:02:41 -04:00
@staticmethod
2020-12-15 14:57:46 -05:00
def comnet_pluto_schedules_function(building_pluto_function):
2020-10-22 11:02:41 -04:00
"""
2020-12-15 14:57:46 -05:00
Get Comnet function from the given pluto function
2020-10-22 11:02:41 -04:00
:param building_pluto_function: str
:return: str
"""
2020-12-14 10:51:10 -05:00
try:
2020-12-15 14:57:46 -05:00
return SchedulesHelper.comnet_pluto_function[building_pluto_function]
2020-12-14 10:51:10 -05:00
except KeyError:
2020-12-15 14:57:46 -05:00
return SchedulesHelper.comnet_function[building_pluto_function]