The aim of this study was to compare genetic (co)variance components and prediction accuracies of breeding values from genomic random regression models (gRRM) and pedigree-based random regression models (pRRM), both defined with or without an additional environmental gradient. The used gradient was a temperaturehumidity index (THI), considered in statistical models to investigate possible genotype by environment (G×E) interactions. Data included 106,505 test-day records for milk yield (MY) and 106,274 test-day records for somatic cell score (SCS) from 12,331 genotyped Holstein Friesian daughters of 522 genotyped sires. After single nucleotide polymorphism quality control, all genotyped animals had 40,468 single nucleotide polymorphism markers. Test-day traits from recording years 2010 to 2015 were merged with temperature and humidity data from the nearest weather station. In this regard, 58 large-scale farms from the German federal states of Berlin-Brandenburg and Mecklenburg-West Pomerania were allocated to 31 weather stations. For models with a THI gradient, additive genetic variances and heritabilities for MY showed larger fluctuations in dependency of DIM and THI than for SCS. For both traits, heritabilities were smaller from the gRRM compared with estimates from the pRRM. Milk yield showed considerably larger G×E interactions than SCS. In genomic models including a THI gradient, genetic correlations between different DIM × THI combinations ranged from 0.26 to 0.94 for MY. For SCS, the lowest genetic correlation was 0.78, estimated between SCS from the last DIM class and the highest THI class. In addition, for THI × THI combinations, genetic correlations were smaller for MY compared with SCS. A 5-fold cross-validation was used to assess prediction accuracies from 4 different models. The 4 different models were gRRM and pRRM, both modeled with or without G×E interactions. Prediction accuracy was the correlation between breeding values for the prediction data set (i.e., excluding the phenotypic records from this data set) with respective breeding values considering all phenotypic information. Prediction accuracies for sires and for their daughters were largest for the gRRM considering G×E interactions. Such modeling with 2 covariates, DIM and THI, also allowed accurate predictions of genetic values at specific DIM. In comparison with a pRRM, the effect of a gRRM with G×E interactions on gain in prediction accuracies was stronger for daughters than for sires. In conclusion, we found stronger effect of THI alterations on genetic parameter estimates for MY than for SCS. Hence, gRRM considering THI especially contributed to gain in prediction accuracies for MY.