The BME280 sensor also supports altitude
This commit is contained in:
parent
8bf5076334
commit
80f969cfce
1 changed files with 2 additions and 0 deletions
|
@ -44,6 +44,7 @@ class GpioSensorBme280Plugin(GpioSensorPlugin):
|
||||||
"temperature": 21.0, # Celsius
|
"temperature": 21.0, # Celsius
|
||||||
"pressure": 101555.08, # Pascals
|
"pressure": 101555.08, # Pascals
|
||||||
"humidity": 23.543, # percentage
|
"humidity": 23.543, # percentage
|
||||||
|
"altitude": 15.703 # meters
|
||||||
}
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
@ -53,6 +54,7 @@ class GpioSensorBme280Plugin(GpioSensorPlugin):
|
||||||
'temperature': device.get_temperature(),
|
'temperature': device.get_temperature(),
|
||||||
'pressure': device.get_pressure()*100,
|
'pressure': device.get_pressure()*100,
|
||||||
'humidity': device.get_humidity(),
|
'humidity': device.get_humidity(),
|
||||||
|
'altitude': device.get_altitude(),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue