Advertisement
KirboWnz

Ruuvitag Temp from TimescaleDB LTSS

Mar 16th, 2023 (edited)
899
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2.   time_bucket_gapfill('10 minutes', "time") AS "time",
  3.   entity_id,
  4.   MAX(state::float) as "value"
  5. FROM ltss
  6. WHERE
  7.   $__timeFilter("time")
  8.   AND entity_id LIKE '%ruuvitag%_temperature'
  9.   AND state NOT IN ('unknown', 'unavailable')
  10. GROUP BY time_bucket_gapfill('10 minutes', "time"), 2
  11. ORDER BY 1,2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement