Hi all
I wrote a simple lambda for my openhab2 which is not working at all:
It should, when called in my rule with
light.apply()
just turn on some of my lights in the house.
import org.eclipse.xtext.xbase.lib.Functions
val Functions.Function0<void> light = [ |
logInfo("rule","all Lights on at night")
schlafzimmerDecke.sendCommand(100)
buerodecke.sendCommand(ON)
wohnSwitch.sendCommand(ON)
null
]
instead it brings when saved
00:11:11.630 [INFO ] [del.core.internal.ModelRepositoryImpl] - Refreshing model 'default.script'
00:11:12.100 [INFO ] [del.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'default.script', using it anyway:
This expression is not allowed in this context, since it doesn't cause any side effects.
The value of the local variable light is not used
what is wrong here? Thank you for your help in advance