I like to iterate through the members of a group

Here is my rulebut I got an cast error

```
rule "totalpower" when
Time cron "0/10 * * ? * * *"
then
var Number sum = 0;
for(NumberItem n : group_house_totalenergy.members as List<NumberItem>){
sum = sum + (n.state as DecimalType)
}
logInfo("Sum is ", sum)
end
```

```
Error during the execution of rule 'totalpower': Could not cast [Z_way_number_WallPlug2_totalpower (Type=NumberItem, State=0.01, Label=Wallplug2, Category=null, Groups=[group_house_totalenergy]), Z_way_number_WallPlug3_totalpower (Type=NumberItem, State=0.02, Label=Wallplug3, Category=null, Groups=[group_house_totalenergy]), Z_way_number_WallPlug4_totalpower (Type=NumberItem, State=0.33, Label=Wallplug4, Category=null, Groups=[group_house_totalenergy]), Z_way_number_WallPlug5_totalpower (Type=NumberItem, State=0, Label=Wallplug5, Category=null, Groups=[group_house_totalenergy]), Z_way_number_WallPlug6_totalpower (Type=NumberItem, State=0.22, Label=Wallplug6, Category=null, Groups=[group_house_totalenergy]), Z_way_number_WallPlug7_totalpower (Type=NumberItem, State=0, Label=Wallplug7, Category=null, Groups=[group_house_totalenergy]), Z_way_number_WallPlug8_totalpower (Type=NumberItem, State=4.0100004, Label=Wallplug8, Category=null, Groups=[group_house_totalenergy]), Z_way_number_WallPlug9_totalpower (Type=NumberItem, State=0, Label=Wallplug9, Category=null, Groups=[group_house_totalenergy]), Z_way_number_WallPlug10_totalpower (Type=NumberItem, State=0.29, Label=Wallplug10, Category=null, Groups=[group_house_totalenergy]), Z_way_number_WallPlug11_totalpower (Type=NumberItem, State=0, Label=Wallplug11, Category=null, Groups=[group_house_totalenergy]), Z_way_number_WallPlug12_totalpower (Type=NumberItem, State=0, Label=Wallplug12, Category=null, Groups=[group_house_totalenergy]), Z_way_number_WallPlug13_totalpower (Type=NumberItem, State=29.87, Label=Wallplug13, Category=null, Groups=[group_house_totalenergy]), Z_way_number_WallPlug20_totalpower (Type=NumberItem, State=0.4, Label=Wallplug20, Category=null, Groups=[group_house_totalenergy]), Z_way_number_WallPlug21_totalpower (Type=NumberItem, State=0.05, Label=Wallplug21, Category=null, Groups=[group_house_totalenergy]), Z_way_number_WallPlug22_totalpower (Type=NumberItem, State=1.52, Label=Wallplug22, Category=null, Groups=[group_house_totalenergy]), Z_way_number_WallPlug23_totalpower (Type=NumberItem, State=0.99, Label=Wallplug23, Category=null, Groups=[group_house_totalenergy]), Z_way_number_WallPlug24_totalpower (Type=NumberItem, State=4.2600004, Label=Wallplug24, Category=null, Groups=[group_house_totalenergy]), Z_way_number_WallPlug25_totalpower (Type=NumberItem, State=0.03, Label=Wallplug25, Category=null, Groups=[group_house_totalenergy]), Z_way_number_WallPlug26_totalpower (Type=NumberItem, State=1.08, Label=Wallplug26, Category=null, Groups=[group_house_totalenergy])] to void; line 47, column 24, length 51
```

what’s wrong??