diff --git a/src/python_testing/TC_TSTAT_4_2.py b/src/python_testing/TC_TSTAT_4_2.py index c459760ec728f2..fe4543ad7bb88e 100644 --- a/src/python_testing/TC_TSTAT_4_2.py +++ b/src/python_testing/TC_TSTAT_4_2.py @@ -530,7 +530,7 @@ async def test_TC_TSTAT_4_2(self): testPresets.append(preset) presetsAddedForScenario = presetsAddedForScenario + 1 - if presetsAddedForScenario < presetType.numberOfPresets: + while presetsAddedForScenario < presetType.numberOfPresets: testPresets.append(cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=scenario, name="Preset", coolingSetpoint=2500, heatingSetpoint=1700, builtIn=False)) presetsAddedForScenario = presetsAddedForScenario + 1