Add pressure
This commit is contained in:
@@ -534,6 +534,9 @@ async def history(request):
|
|||||||
elif measurement == 'lux':
|
elif measurement == 'lux':
|
||||||
client = sensors_client
|
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)
|
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':
|
elif measurement == 'sleep':
|
||||||
client = sensors_client
|
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)
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user