Skip to content

[DATABASE] Add historical data query for dashboard charts #41

Open
ezehf2 opened this issue Apr 5, 2026 · 0 comments
Open

[DATABASE] Add historical data query for dashboard charts #41

ezehf2 opened this issue Apr 5, 2026 · 0 comments
Assignees

Comments

@ezehf2
Copy link
Owner

ezehf2 commented Apr 5, 2026

Add a new function get_historical_readings(room_id, sensor_type, limit=50) to database.py that returns the last N readings for a given room and sensor type ordered by timestamp. This function will be used by the Flask dashboard to populate the historical charts in Sprint 3. Test the function locally by inserting sample data and confirming it returns the correct rows in the correct order. Commit with message [DATABASE] Add historical data retrieval function.

Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants