Barometric Pressure Millibars to inches conversion?


#1

I have a child device handler and I want to change the output. Currently the $currentValue is in millibars for a barometric pressure reading. I want it to be in inches of mercury. I know that I need to multiply the $currentValue by .02953 I have tried
attributeState(“pressure”, label: ‘${currentValue * .02953} ${unit}’, unit: “hPa”, defaultState: true)

and
attributeState(“pressure”, label: ‘${(currentValue * .02953)} ${unit}’, unit: “hPa”, defaultState: true)

Neither work the math. Also, is there a different “unit” I should be using as well, or is that just for show?

Thanks