I have formatting working in the .items file but now want to move it to a rule.
The following rule does not work as it should, I’m probably missing something important
Please advise.
rule "PressureProxy"
when
Item PressureSensor received update
then
var float Pressure_mmmm = (PressureSensor.state as DecimalType) / 1.3332239
val int Pressure_mm = String::format("%.0f", Pressure_mmmm)
postUpdate(PressureProxy,Pressure_mm)
end