This is my first post for help, i am very new . . . but very interested in OpenHAB.
I have the item copied from the wiki and many others but i get a response of 984 inches and not more like 29.1 that i am expecting. Is there a conversion that I am missing?
In my items I have:
Number Weather_Pressure “Barometric Pressure [%.2f in]” { weather=“locationId=home, type=atmosphere, property=pressure, unit=inches” }
Yahoo is currently returning the pressure in millibars (hectoPascals), even though the response says the units are in Inches of mercury (inHg). You can confirm this on their developer page: https://developer.yahoo.com/weather/
Thanks! now I just need to learn how to do the math in this . . .do you know of any good examples that show were all the parts and pieces go. I tried a rule with Weather_Pressure = Weather_Pressure / 33.86 and that was a bust.
Number Weather_Pressure_hPa "Barometric Pressure [%.2f hPa]" { weather="locationId=home, type=atmosphere, property=pressure, unit=inches" }
Number Weather_Pressure_in "Barometric Pressure [%.2f in]"
and this rule (not tested):
import org.openhab.core.library.types.DecimalType // not needed in OH2
rule CorrectPressure
when
Item Weather_Pressure_hPa changed
then
Weather_Pressure_in.postUpdate((Weather_Pressure_hPa.state as DecimalType) / 33.86)
end