@@ -74,7 +74,7 @@ def steps_TC_DEM_2_5(self) -> list[TestStep]:
74
74
"Value has to be 0x00 (NoOptOut)" ),
75
75
TestStep ("5" , "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID+1, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization" ,
76
76
"Verify DUT responds w/ status FAILURE(0x01)" ),
77
- TestStep ("6" , "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=4 , NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization" ,
77
+ TestStep ("6" , "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=len(Forecast.Slots) , NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization" ,
78
78
"Verify DUT responds w/ status FAILURE(0x01)" ),
79
79
TestStep ("7" , "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MinPowerAdjustment-1, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization" ,
80
80
"Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)" ),
@@ -177,7 +177,7 @@ async def test_TC_DEM_2_5(self):
177
177
178
178
self .step ("6" )
179
179
slotAdjustments = [Clusters .DeviceEnergyManagement .Structs .SlotAdjustmentStruct (
180
- slotIndex = 4 , nominalPower = forecast .slots [0 ].minPowerAdjustment , duration = forecast .slots [0 ].maxDurationAdjustment )]
180
+ slotIndex = len ( forecast . slots ) , nominalPower = forecast .slots [0 ].minPowerAdjustment , duration = forecast .slots [0 ].maxDurationAdjustment )]
181
181
await self .send_modify_forecast_request_command (forecast .forecastID , slotAdjustments , Clusters .DeviceEnergyManagement .Enums .AdjustmentCauseEnum .kGridOptimization , expected_status = Status .Failure )
182
182
183
183
self .step ("7" )
0 commit comments