[SOLVED] Some rules arent working any more

Hello,

i actually got a problem with one of my rules - since a few weeks it isnt working any more:

// Alle Geräte im Wohnzimmer werden ausgeschaltet, die Media-Steckdose wird zeitverzögert ebenfalls ausgeschaltet.
rule "Wohnzimmer-aus"
when
	Item Scenes_Wohnzimmer_aus received command OFF
then
    Group_Wohnzimmer_Licht?.members.forEach[Switch| 
        sendCommand(Switch, OFF)
        ]
    sendCommand(RXV775Main_Zone_Zone_channels_Power, OFF)
    createTimer(now.plusSeconds(1)) [| sendCommand(LgTv_Poweroff, ON)]
    createTimer(now.plusSeconds(10)) [| sendCommand(Zw_steckdose_wohnzimmer_media_Switch, OFF) ]
    createTimer(now.plusSeconds(1)) [| sendCommand(LgTv_Poweroff, OFF)]
end

the smarthome designer gives this error-message:

Multiple markers at this line
- There is no context to infer the closure's argument types from.
   Consider typing the arguments or put the closures into a typed
   context.
- The method or field Group_Wohnzimmer_Licht is undefined

can you tell me why and what i have to change at it?

thanks a lot,
Alex

You can simply do:

Group_Wohnzimmer_Licht.sendCommand(OFF)

That will send an OFF command to all the Switches in the group provided the group only contains switches

yes, i am running snapshot

There is a breaking change in the latest snapshots:

You need to add a space after the [

thank you! its working again! :slight_smile: