Hi Guys,
I want to create a rule to switch on a light bulb whenever a dimmer value > zero and swich it off when the dimmer value = 0
openHAB version: 2.5.4-1
items:
Switch WK2Licht_1 "Licht WK2_1" <light> {channel="zwave:device:xXXxXXXX:nodeX:switch_binary"}
Dimmer DimmerNHC_WK2 "NHC Dimmer WK2" <Light> {channel="nikohomecontrol:dimmer:xXXxXXXX:xx:brightness", channel="zwave:device:xXXxXXXX:nodeX:switch_dimmer" [profile="follow"]}
i’ve been struggling to get this to work, it throws an error in the log (" no viable alternative at input ‘item’ ") at the 3rd line of code below:
Rule file:
rule “NHC-ZWAVE Rule”
when
item DimmerNHC_WK2 received command
then
if (receivedCommand = 0) WK2Licht_1.sendCommand(OFF)
else WK2Licht_1.sendCommand(ON)
end
can anyone point me in the right direction?
thanks!!