This could be a way, if the one you are trying to achieve is not working:
You could create a rule that changes the state of the item in the hue bridge via a shell script. Something like that:
Switch HueSensorKueche "Hue Sensor Küche"
and a rule like this:
rule "Switch hue motion sensor on and off"
when
Item HueSensorKueche changed
then
if (HueSensorKueche.state == ON) {
executeCommandLine("sh /path/here/hue-switch-ON.sh")
}
else {
executeCommandLine("sh /path/here/hue-switch-OFF.sh")
}
end
The shell scripts basically trigger a curl command to make the change like this:
var Sensor = 25
rule "Switch Hue Motion Sensor ON / OFF"
when
Item HueMotionSwitch changed
then
val url = "http://10.0.0.109/api/xxxx/sensors/" + Sensor + "/config"
var String body = ""
if( HueMotionSwitch.state != ON ) {
body = '{"on":false}'
} else {
body = '{"on":true}'
}
logInfo("HueSensorKueche", "Send command '{}' to {}", body, url)
sendHttpPutRequest(url, "application/json", body)
end
The Problem is the Switch get not the actual state from the switch.