Greetings All,
I’m just playing around with the Phillips Hue lights I picked up, and could use a second set of eyes to try and figure out the errors I’m receiving from a rule. I’m just trying to gradually dim the bulb, but the item state seems to be throwing an error, even though it does correctly show in the log.
Item File:
Dimmer Light3_Dimmer {channel="hue:0210:1:bulb3:color" }
Rules File:
rule "Hue Test"
when
Item testTrigger changed from OFF to ON
then
logInfo("Colour State",Light3_Colour.state.toString)
logInfo("Dimmer State",Light3_Dimmer.state.toString)
var i = Light3_Dimmer.state
while((i=i-1) > -1) {
sendCommand(Light3_Dimmer, i)
Thread::sleep(400)
}
end
Log:
2017-11-22 18:20:35.895 [INFO ] [.smarthome.model.script.Colour State] - 46,55,100
2017-11-22 18:20:35.900 [INFO ][.smarthome.model.script.Dimmer State] - 100
2017-11-22 18:20:35.908 [ERROR] [.script.engine.S
criptExecutionThread] - Rule 'Hue Colour Test': An error occurred during the script execution: The
name '<XFeatureCallImplCustom> - <XNumberLiteralImpl>' cannot be resolved to an item or type.
I’ve also tried it with:
var i = Light3_Dimmer.state as DecimalType
In which case I get this error:
2017-11-22 18:30:54.292 [ERROR] [.script.engine.ScriptExecutionThread] - Rule 'Hue Colour Test': An error occurred during the script execution: Could not invoke method:org.eclipse.smarthome.model.script.lib.NumberExtensions.operator_greaterThan(org.eclipse.smarthome.core.types.Type,java.lang.Number) on instance: null
Any thoughts?
Thanks!