temperature in Comnet in Fahrenheit, transformed to Celsius

This commit is contained in:
Pilar 2021-09-01 17:59:28 -04:00
parent 83b0716f0f
commit 0b2a70f8ae

View File

@ -45,6 +45,12 @@ class ComnetSchedules:
schedule.day_types = [cte.SUNDAY]
schedule.type = name
schedule.data_type = SchedulesHelper.data_type_from_comnet(data_type)
schedule.values = row_cells[schedules_per_schedule_type:].to_numpy()
if schedule.data_type == cte.TEMPERATURE:
values = []
for cell in row_cells[schedules_per_schedule_type:].to_numpy():
values.append((float(cell) - 32.) * 5 / 9)
schedule.values = values
else:
schedule.values = row_cells[schedules_per_schedule_type:].to_numpy()
schedules.append(schedule)
usage_zone.schedules = schedules