Just noticed that pressure is shown wrong (causing wrong display in HA) - > 2nd screen…
In reality should be something arround ‘995hPa’.
As I remember that was some ‘calculation’ included in set-up of BME280 with ‘Sonoff’ running ‘Tasmota’.
But I can not find that anymore…
The question is: what is the ‘tasmota’ command to see/change the calculation? If needed…
BME shows only absolute pressure, you must calculate relative pressure manually. Tasmota has this function already built-in, esphome does not. On esphome’s web page there’s a formula for relative pressure, but i think it’s wrong, because there’s a temperature in calculation, but it shouldn’t be, since temp.compensation is already taken into account when showing absolute pressure. As a result relative pressure changes with changing temperature, while absolute stays the same, clearly showing that formula is wrong.
I corrected formula by myself to show correct relative pressure. You can find it HERE around middle of topic. Just change “altitude in meters” (STANDARD_ALTITUDE) to your altitude above see level.
(actually,you can find formula for relative pressure in datasheet for older BME sensor, i think for BME270 or BME260. Interestingly, it’s not in datasheet for BME280…)
I don’t think that’s what the OP is asking for.
in the screenshot above the red box indicates that the device is already calculating the relative pressure (and aside from someone wanting it for purely interest purposes I’m not sure why “regular” people need that anyway).
the OP is saying that the given reading is not reflecting the actual pressure (absolute or relative).
to the OP:
I’m not sure what to do to fix it in Tasmota but you could use a template sensor in HA to correct the value. You will need to use a bit of geometry and have at least 2 known points of measured and actual pressure tho.
Indeed… i don’t know where i saw esphome…
In tasmota you must also set altitude, use “altitude xyz” command in console (xyz is altitude in meters).
There is also offset available, but if reading is that much off real value then it’s more likely sensor defect.
O.K. I’ll check that later… What other command I should use to check what formula/calculation was applied in Tadmota?
Altitude is 318 meters. And it is O.K. But still pressure is shown wrong…
22:42:18.434 CMD: altitude
22:42:18.444 MQT: sonoff01/stat/RESULT = {"Altitude":318}
So, if i understand correctly, your sensor shows absolute pressure 1546,4hPa, while it should show 995, correct? As i said, if this is so, then only option i can think of is defect sensor. As far as i know absolute pressure is received directly from sensor, only relative one is calculated.
It seems that i was wrong above: i didn’t find any offset possibility for pressure in tasmota, only for temperature. So, the one thing you can do is to create a sensor in HA with offset “1546 - 551” (subtract the difference 1546-995), but do monitor pressure over the days and compare it with other station’s data if it shows correctly. If sensor is really dead then readings could be erratic.
If you have knowledge, time… you can load esphome FW on your sonoff and see what results will module give with that firmware to double-check if sensor is really dead. You can easily go back to tasmota later.
O.K. Thank you for support… 1st I’ll replace the sensor and check the results…
Already ordered - waiting for delivery.
Sensor replaced - but that not helped… Then I decided to install newest ‘Tasmota’ fimware…
And the problem was solved…
Seems it was some bug (?) in previous (12.0.2) firmware.