Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


peejayw

1913 posts

Uber Geek
+1 received by user: 123


#295857 30-Apr-2022 09:13
Send private message

I have been using a BME280 to monitor temp, humidity and pressure and it seems quite accurate compared to local weather stations in the area.
I purchased an Aqara one to try as it uses Zigbee and runs on a battery which would be more convenient.

 

The temperature reading is quite accurate as is humidity but the air pressure is quite low, the BME28 is reading 1035hPa but the Aqara is only showing 1011hPa.

 

Are these units adjustable or is there some way of getting it to display the correct reading in Home Assistant?





 I'm supposed to respect my elders, but it's getting harder and harder for me to find one now.


Create new topic
peejayw

1913 posts

Uber Geek
+1 received by user: 123


  #2908517 30-Apr-2022 12:02
Send private message

OK, it looks like its not a question of accuracy but the change in air pressure with altitude. There is a conversion to allow for elevation and temperature and I found this example of a sensor template to use.


- platform: template


 sensors:


man_cave_pressure_msl:


friendly_name: "Man Cave Air Pressure MSL"


unit_of_measurement: hPa


value_template: "{{ (states('sensor.man_cave_air_pressure')|float * (1 - (0.0065 * 175) / (states('sensor.man_cave_temperature')|float + (0.0065 * 175) + 273.15)) ** -5.257) | round(1) }}"


So I put in my data like this...



value_template: "{{ (states('sensor.lumi_lumi_weather_0684e007_pressure')|float * (1 - (0.0065 * 230) / (states('sensor.lumi_lumi_weather_0684e007_temperature')|float + (0.0065 * 230) + 273.15)) ** -5.257) | round(1)  }}"  
 
The 230 is my metres above sea level, replacing the 175 in the example.
Unfortunately the sensor reports a value of 0.0. I guess I have something wrong in that line but I dont understand the lingo, can anyone check it to see where I have gone astray?
Thanks. 




 I'm supposed to respect my elders, but it's getting harder and harder for me to find one now.




peejayw

1913 posts

Uber Geek
+1 received by user: 123


  #2908669 30-Apr-2022 16:13
Send private message

All solved 😁




 I'm supposed to respect my elders, but it's getting harder and harder for me to find one now.


Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.