[SOLVED] dimmer.sendCommand not working

I’m writing my first rule in openHAB and I can’t figure out what I’m doing wrong here. Simple scene selector with 3 items. The selection works and the Switch items are switched off. The Dimmer item however does not change. Tried with ON of OFF, 0, 100.

Changing the dimmer percentage with a slider from paperUI does work, so Item seems to work fine.

Items file

Switch   Living_BuitensteSpots "Spots buiten"      <light> (Group_Living, Group_Living_Lights_Movie, Group_Living_Lights_Bezoek) {channel="nikohomecontrol:onOff:nhc:12:switch"}
Dimmer   Living_MiddenSpots    "Spots midden"      <light> (Group_Living, Group_Living_Lights_Movie, Group_Living_Lights_Bezoek) {channel="nikohomecontrol:dimmer:nhc:13:brichtness"}
Switch   Living_Salontafel     "Spots salontafel"  <light> (Group_Living, Group_Living_Lights_Movie, Group_Living_Lights_Bezoek) {channel="nikohomecontrol:onOff:nhc:11:switch"}
Switch   Living_Leeslampen     "Leeslampjes"       <light> (Group_Living, Group_Living_Lights_Movie, Group_Living_Lights_Bezoek) {channel="nikohomecontrol:onOff:nhc:10:switch"}

Rules file

rule "Scene Living"
when 
    Item Scene_Living changed 
then
    logInfo("SceneChanger", "Scene Living changed to:" + Scene_Living.state.toString)
    switch (Scene_Living.state.toString){
    case "0": {
        logInfo("SceneChanger", "Scene Living changed to: OFF")
        Living_Salontafel.sendCommand(OFF)
        Living_BuitensteSpots.sendCommand(OFF)
        Living_MiddenSpots.sendCommand(OFF)
        }
    case "1": {
        logInfo("SceneChanger", "Scene Living changed to: ON")
        Living_Salontafel.sendCommand(ON)
        Living_BuitensteSpots.sendCommand(ON)
        Living_MiddenSpots.sendCommand(ON)
        }
    }
end

Log

==> /var/log/openhab2/openhab.log <==

2019-10-27 21:34:41.220 [INFO ] [.smarthome.model.script.SceneChanger] - Scene Living changed to:0

2019-10-27 21:34:41.229 [INFO ] [.smarthome.model.script.SceneChanger] - Scene Living changed to: OFF

==> /var/log/openhab2/events.log <==

2019-10-27 21:34:41.243 [ome.event.ItemCommandEvent] - Item 'Living_Salontafel' received command OFF

2019-10-27 21:34:41.259 [ome.event.ItemCommandEvent] - Item 'Living_BuitensteSpots' received command OFF

2019-10-27 21:34:41.268 [ome.event.ItemCommandEvent] - Item 'Living_MiddenSpots' received command OFF

2019-10-27 21:34:41.280 [nt.ItemStatePredictedEvent] - Living_Salontafel predicted to become OFF

2019-10-27 21:34:41.293 [nt.ItemStatePredictedEvent] - Living_BuitensteSpots predicted to become OFF

2019-10-27 21:34:41.302 [vent.ItemStateChangedEvent] - Living_Salontafel changed from ON to OFF

2019-10-27 21:34:41.308 [nt.ItemStatePredictedEvent] - Living_MiddenSpots predicted to become 0

2019-10-27 21:34:41.313 [vent.ItemStateChangedEvent] - Living_BuitensteSpots changed from ON to OFF

running OpenHAB 2.4 on Raspberry Pi

Welcome to openHAB.

Syntax error? Should be brightness instead of brichtness I guess.

Hi sihui, thx for your message. Indeed, correcting the typo fixed it!

The item was working in paperUI control, so I wasn’t looking for my Error in the Items file.