diff --git a/mock-api/package.json b/mock-api/package.json index 8f2345cb9..8751fd632 100644 --- a/mock-api/package.json +++ b/mock-api/package.json @@ -15,5 +15,5 @@ "itty-router": "^5.0.22", "prettier": "^3.6.2" }, - "packageManager": "pnpm@10.20.0+sha512.cf9998222162dd85864d0a8102e7892e7ba4ceadebbf5a31f9c2fce48dfce317a9c53b9f6464d1ef9042cba2e02ae02a9f7c143a2b438cd93c91840f0192b9dd" + "packageManager": "pnpm@10.21.0+sha512.da3337267e400fdd3d479a6c68079ac6db01d8ca4f67572083e722775a796788a7a9956613749e000fac20d424b594f7a791a5f4e2e13581c5ef947f26968a40" } diff --git a/mock-api/restServer.ts b/mock-api/restServer.ts index 7baabd411..d87bb794c 100644 --- a/mock-api/restServer.ts +++ b/mock-api/restServer.ts @@ -4524,7 +4524,7 @@ router settings = await request.json(); console.log('application settings saved', settings); return status(200); // no restart needed - // return status(205); // restart needed + // return status(205); // reboot required }) // Device Data @@ -4559,9 +4559,8 @@ router let dashboard_object: { id?: number; n?: string; t?: number; nodes?: any[] } = {}; - let fake = false; - - // fake = true; // for testing, shows a subset of data + // let fake = false; + let fake = true; // toggle for testing, shows a subset of data if (!fake) { // pick EMS devices from coredata @@ -4614,8 +4613,7 @@ router } // add analog sensor data. no command c - // remove disabled sensors first (t = 0) and create data in one pass - // remove system sensors first + // remove disabled and system sensors first (t = 0) and create data in one pass const enabledAnalogSensors = emsesp_sensordata.as.filter( (item) => item.t !== 0 && !item.s ); @@ -4658,17 +4656,15 @@ router } } else { // for testing only - // add the custom entity data - dashboard_object = { - id: DeviceTypeUniqueID.CUSTOM_UID, // unique ID for custom entities - t: DeviceType.CUSTOM, - nodes: getDashboardEntityData(DeviceTypeUniqueID.CUSTOM_UID) - }; - if ((dashboard_object.nodes ?? []).length > 0) { - dashboard_nodes.push(dashboard_object); - } - + // dashboard_object = { + // id: DeviceTypeUniqueID.CUSTOM_UID, // unique ID for custom entities + // t: DeviceType.CUSTOM, + // nodes: getDashboardEntityData(DeviceTypeUniqueID.CUSTOM_UID) + // }; + // if ((dashboard_object.nodes ?? []).length > 0) { + // dashboard_nodes.push(dashboard_object); + // } // add the scheduler data // let scheduler_data = emsesp_schedule.schedule.filter((item) => item.name); // let scheduler_data2 = scheduler_data.map((item, index) => ({