home / sensor

Menu
  • Dashboards

Door Activity

Door state transitions over time.

Custom SQL query returning 1 row (hide)

WITH changes AS (
  SELECT
    recorded_at,
    door_status,
    LAG(door_status) OVER (ORDER BY recorded_at) AS previous_status
  FROM sensor_log
)
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-04 08:26 CLOSED
Powered by Datasette · Queries took 2.133ms