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