Commit Graph

5 Commits

Author SHA1 Message Date
rafaeldpsilva
83eaa7e121 Refactor sensor data handling for new API and WebSocket format
- Update SensorConsumptionTable to use new sensorStore and
websocketStore - Normalize sensor and reading interfaces for consistency
- Remove legacy energy data handling and mapping logic - Update API and
store types for new backend schema - Fetch sensors on mount in
SensorConsumptionTable - Simplify WebSocket data processing and remove
legacy code
2025-09-30 17:58:06 +01:00
rafaeldpsilva
3299472c85 Refactor stores for modularity and API type updates
- Split energy store into sensor, room, analytics, and websocket stores
- Add new analytics, room, sensor, and websocket stores - Update API
types for sensors (SensorDevice, SensorAction) - Update sensorsApi to
use new SensorDevice type - Add central index for store exports and
types - Refactor energy store to delegate to modular stores - Remove
legacy code and consolidate API logic
2025-09-25 17:09:42 +01:00
rafaeldpsilva
326746b5ef Refactor API and store logic for sensor and room management
- Add sensor name to SensorInfo interface - Update API client to
conditionally include auth headers - Add saveToken endpoint to authApi -
Refactor roomsApi to use getRoomNames endpoint - Change sensorsApi to
use /api/v1/sensors/get - Improve token handling and JWT decoding in
auth store - Refactor room loading to use API client in energy store -
Add helper to transform API sensor data - Update SensorManagementView to
load sensors from API and fix filtering
2025-09-25 14:48:48 +01:00
rafaeldpsilva
6510468768 Remove redundant comments and improve code formatting 2025-09-23 15:24:04 +01:00
rafaeldpsilva
a3d266d735 Add API integration for sensors and rooms management
Integrate sensorsApi and roomsApi services into energy store. Add API
state, loading/error handling, and async functions for fetching sensor
and room data. Update room loading logic to fetch from API. Expose new
API functions for analytics and health endpoints. Update
SensorManagementView to use localhost WebSocket for real-time updates.
2025-09-18 14:29:44 +01:00