diff --git a/main.py b/main.py index b912b74..0db7680 100644 --- a/main.py +++ b/main.py @@ -534,6 +534,9 @@ async def history(request): elif measurement == 'lux': client = sensors_client q = 'select mean("lux") as lux from air where "name" = \'{}\' and time >= {}s and time < {}s group by time({}) fill(linear)'.format(name, start, end, window) + elif measurement == 'hpa': + client = sensors_client + q = 'select mean("hpa") as hpa from air where "name" = \'{}\' and time >= {}s and time < {}s group by time({}) fill(linear)'.format(name, start, end, window) elif measurement == 'sleep': client = sensors_client q = 'select max("max_mag") as max_mag from sleep where "name" = \'{}\' and time >= {}s and time < {}s group by time({}) fill(linear)'.format(name, start, end, window)