Add history endpoint and do some cleanup

This commit is contained in:
2024-02-02 12:42:27 -05:00
parent 76d3f2b9c4
commit 1f2f0d56d9
11 changed files with 80 additions and 12 deletions

View File

@@ -0,0 +1,16 @@
SELECT DISTINCT ON (name)
time,
name,
model,
temperature,
pressure,
humidity,
luminance,
gas_resistance AS gasResistance,
color_temperature AS colorTemperature,
air_quality_index AS airQualityIndex
FROM
reading
ORDER BY
name,
time DESC