Registrieren Sie sich jetzt!
for (RoomTemp roomTemp in roomTemps) { var states = roomTemp.sumstate.value.split(";").toList(); var i = shared.roomTemps .firstWhere((i) => i.itemId == roomTemp.itemId, orElse: () => null); if (i != null) { i.actTemp = double.tryParse(states[0]); i.setPoint = double.tryParse(states[1]); i.valve = double.tryParse(states[2]); i.mode = roomTempModeEnum(int.tryParse(states[3]) ?? 0); i.reserved = int.tryParse(states[4]); i.tempAdjust = double.tryParse(states[5]); i.coolingState = roomTempCoolingStateEnum(int.tryParse(states[6])); i.sumStateStatus = sumStateStatus(int.tryParse(states[7]) ?? 0); i.humidity = double.tryParse(states[8]); i.airQuality = double.tryParse(states[9]); i.floorTemp = double.tryParse(states[10]); } }