# Hue Rule Error

**URL:** <https://community.openhab.org/t/hue-rule-error/36501>\
**Category:** Scripts & Rules\
**Created:** [November 23, 2017, 1:51am UTC](https://community.openhab.org/t/hue-rule-error/36501 "2017-11-23T01:51:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve40](https://community.openhab.org/user_avatar/community.openhab.org/steve40/32/1482_2.png) [@Steve40](https://community.openhab.org/u/Steve40)\
**Post date:** [November 23, 2017, 1:51am UTC](https://community.openhab.org/t/hue-rule-error/36501/1 "2017-11-23T01:51:21Z")

</div>

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:

```auto
Dimmer Light3_Dimmer {channel="hue:0210:1:bulb3:color" }

```

Rules File:

```auto
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:

```auto
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:

```auto
var i = Light3_Dimmer.state as DecimalType

```

In which case I get this error:

```auto
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!

---

<div class="post-metadata">

**Author:** ![Steve40](https://community.openhab.org/user_avatar/community.openhab.org/steve40/32/1482_2.png) [@Steve40](https://community.openhab.org/u/Steve40)\
**Post date:** [November 23, 2017, 2:10am UTC](https://community.openhab.org/t/hue-rule-error/36501/2 "2017-11-23T02:10:59Z")

</div>

Never mind. Found the answer in an unrelated post.

```auto
var i = Light3_Dimmer.state as Number

```
