From 0b2a70f8ae666e9d238d0be28a1fa39cc20a4dd6 Mon Sep 17 00:00:00 2001 From: Pilar Date: Wed, 1 Sep 2021 17:59:28 -0400 Subject: [PATCH] temperature in Comnet in Fahrenheit, transformed to Celsius --- imports/schedules/comnet_schedules_parameters.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/imports/schedules/comnet_schedules_parameters.py b/imports/schedules/comnet_schedules_parameters.py index ea4cae02..2eaac773 100644 --- a/imports/schedules/comnet_schedules_parameters.py +++ b/imports/schedules/comnet_schedules_parameters.py @@ -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