From 80f969cfce04beb4cbb0e822b5297738bfd46e1f Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 14 Aug 2019 21:03:27 +0200 Subject: [PATCH] The BME280 sensor also supports altitude --- platypush/plugins/gpio/sensor/bme280.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platypush/plugins/gpio/sensor/bme280.py b/platypush/plugins/gpio/sensor/bme280.py index 5e66c95661..532760260d 100644 --- a/platypush/plugins/gpio/sensor/bme280.py +++ b/platypush/plugins/gpio/sensor/bme280.py @@ -44,6 +44,7 @@ class GpioSensorBme280Plugin(GpioSensorPlugin): "temperature": 21.0, # Celsius "pressure": 101555.08, # Pascals "humidity": 23.543, # percentage + "altitude": 15.703 # meters } """ @@ -53,6 +54,7 @@ class GpioSensorBme280Plugin(GpioSensorPlugin): 'temperature': device.get_temperature(), 'pressure': device.get_pressure()*100, 'humidity': device.get_humidity(), + 'altitude': device.get_altitude(), }