home / sensor

Menu
  • Dashboards

Freezer Door Activity

Freezer door state transitions over time.

Custom SQL query returning 3 rows (hide)

WITH changes AS (
  SELECT
    recorded_at,
    door_status,
    LAG(door_status) OVER (ORDER BY recorded_at) AS previous_status
  FROM freezer_1
)
SELECT recorded_at, door_status
FROM changes
WHERE previous_status IS NULL OR door_status <> previous_status
ORDER BY recorded_at;

Edit SQL

This data as json, CSV

recorded_atdoor_status
2026-03-20 08:24 OPEN
2026-03-20 13:22 CLOSED
2026-03-20 13:22 OPEN
Powered by Datasette · Queries took 90.228ms