toLowerCase bug?

Hi all,

I have a bug in my rule when I use the toLowerCase function.

import org.eclipse.xtext.xbase.lib.*
import org.openhab.core.library.types.*
import org.openhab.core.library.items.*
import org.openhab.core.items.*

rule "Voice control"
when
    Item VoiceCommand received command
then
	var String command = receivedCommand.toString.toLowerCase
    
	
	sendCommand("testItem", "ON")
	if (command.contains("allume le sapin")) {
		sendCommand("LR_ChristmasTree_Switch", "ON")
	}

end

Error
2015-12-21 18:18:35.388 [ERROR] [o.o.c.s.ScriptExecutionThread ] - Error during the execution of rule 'Voice control': The name '<XMemberFeatureCallImplCustom>.toLowerCase' cannot be resolved to an item or type.

Do you have an idea ?

Gary.

Does toString().toLowerCase work better?

Unfortunately no :confused:

Hi,

try receivedCommand.state.toString.toLowerCase

Greetings
Dennis