Delete logs
This commit is contained in:
@@ -92,8 +92,6 @@ const getSensorValues = (sensor: any) => {
|
||||
const values = []
|
||||
|
||||
const latestReading = energyStore.latestReadings.get(sensor.sensor_id)
|
||||
console.log(`Getting values for sensor ${sensor.sensor_id}, found reading:`, latestReading)
|
||||
console.log(`Sensor capabilities:`, sensor.capabilities?.monitoring)
|
||||
|
||||
// Only show energy if the sensor actually monitors energy
|
||||
if (sensor.capabilities?.monitoring?.includes('energy')) {
|
||||
|
||||
@@ -114,7 +114,7 @@ export const useSensorStore = defineStore('sensor', () => {
|
||||
|
||||
// Mark sensor as recently updated
|
||||
recentlyUpdatedSensors.add(reading.sensorId)
|
||||
|
||||
console.log(reading.sensor_type)
|
||||
// Remove from recently updated after 2 seconds
|
||||
setTimeout(() => {
|
||||
recentlyUpdatedSensors.delete(reading.sensorId)
|
||||
@@ -227,7 +227,6 @@ export const useSensorStore = defineStore('sensor', () => {
|
||||
// Sensors API functions
|
||||
async function fetchApiSensors(params?: { room?: string; sensor_type?: any; status?: any }) {
|
||||
const result = await handleApiCall(() => sensorsApi.getSensors(params))
|
||||
|
||||
if (result) {
|
||||
// Check if result has a sensors property (common API pattern)
|
||||
if (result.sensors && Array.isArray(result.sensors)) {
|
||||
|
||||
@@ -86,7 +86,7 @@ const averageEnergyUsage = computed(() => {
|
||||
onMounted(() => {
|
||||
// Initialize settings
|
||||
settingsStore.initialize()
|
||||
|
||||
|
||||
// Auto-connect based on settings
|
||||
if (settingsStore.settings.autoConnect) {
|
||||
energyStore.connect(settingsStore.settings.websocketUrl)
|
||||
|
||||
Reference in New Issue
Block a user