Refactor to decouple energy, room, and sensor stores

- Remove room and sensor logic from energy store - Update components to
use useRoomStore and useSensorStore directly - Fix sensor/room ID
mismatches and API response handling in room store - Update
AIOptimizationView to use useWebSocketStore for connection status -
Update SensorManagementView to use useRoomStore and useSensorStore
directly
This commit is contained in:
rafaeldpsilva
2025-10-01 12:26:44 +01:00
parent 71d1d82761
commit b9348140b8
8 changed files with 97 additions and 115 deletions

View File

@@ -72,12 +72,12 @@
<script setup lang="ts">
import { computed } from 'vue'
import { useEnergyStore } from '@/stores/energy'
import { useRoomStore } from '@/stores/room'
const energyStore = useEnergyStore()
const roomStore = useRoomStore()
const roomsList = computed(() => {
return Array.from(energyStore.roomsData.values()).sort((a, b) =>
return Array.from(roomStore.roomsData.values()).sort((a, b) =>
a.room.localeCompare(b.room)
)
})