Cannot change the value of a variable

Hello friends
I ’ m stuck into this: I have two variables into the .items file
Number LightsensorAl1 "Lightsensor [%.3f]" <energy> (Temperature,GF_Corridor) { bacnet="1:0:1" } Number lightSensorConfiguration "lightSensorConfiguration [%.3f ]" <energy> (Temperature,GF_Corridor)
and I want the variable lightSensorConfiguration to take values from a linear function where input is Lightsensor and output is lightSensorConfiguration as below

So in the .rules file I wrote this

  rule "Initialize lightSensorConfiguration"
    when 
        System started
    then
    var Number light_value=LightsensorAl1.state as DecimalType
    var Number new_light_value=light_value*40
    postUpdate(lightSensorConfiguration, new_light_value)
end


rule "Configure lightsensor"
when Item LightsensorAl1 changed
then
    var Number light_value=LightsensorAl1.state as DecimalType
    var Number new_light_value=light_value*40
    postUpdate(lightSensorConfiguration, new_light_value)
end    
`

But it doesn’t send any value . Can anyone please help me find what I have done wrong?
Thanks in advance

If you want to send any data through the binding, you have to use sendCommand().

postUpdate() only updates the state within openHAB, but without sending this state. This is useful e.G. to set level of rollershutters when the actuators don’t provide this information. The actuator wouldn’t understand a percentage value and probably would misbehave :wink: