from .DataReader import CsvDataReader def transformMode(mode): if mode == 10: return 'heating' return None class ISM7DataReader(CsvDataReader): def transformLine(self, line): result = { 'time': int(line[0]), 'mode': transformMode(int(line[14])), 'temp_target': float(line[1]) / 10, 'temp_flow': float(line[3]) / 10, 'temp_return': float(line[4]) / 10, 'temp_in': float(line[23]) / 10, 'temp_out': float(line[25]) / 10, } return result