Invert esp8266 soil moisture reading
This commit is contained in:
@@ -534,7 +534,7 @@ async def history(request):
|
||||
q = 'select mean("pm10") as p10, mean("pm25") as p25, mean("co2") as co2, mean("voc_idx") as voc from air where "name" = \'{}\' and time >= {}s and time < {}s group by time({}) fill(linear)'.format(name, start, end, window)
|
||||
elif measurement == 'soil':
|
||||
client = sensors_client
|
||||
q = 'select mean("soil") as soil, mean("moisture") as moisture from soil where "name" = \'{}\' and time >= {}s and time < {}s group by time({}) fill(linear)'.format(name, start, end, window)
|
||||
q = 'select 1023-mean("soil") as soil, mean("moisture") as moisture from soil where "name" = \'{}\' and time >= {}s and time < {}s group by time({}) fill(linear)'.format(name, start, end, window)
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user