diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5efa39c66c..b2a7a55186 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- updated distribution system export, import and clone functions in myems-api
- updated meter export, import and clone functions in myems-api
- updated equipment table in myems-admin
+- updated equipment export, import and clone functions in myems-api
+-
### Fixed
- updated run action of rule in myems-api
- updated run action of advanced report in myems-api
diff --git a/database/demo-cn/myems_system_db.sql b/database/demo-cn/myems_system_db.sql
index 4f5db7aeca..d0b06e9a7e 100644
--- a/database/demo-cn/myems_system_db.sql
+++ b/database/demo-cn/myems_system_db.sql
@@ -80,7 +80,7 @@ VALUES
(1, 'inlet chilled water temperature', 'point', NULL, 2, NULL, NULL),
(1, 'chilled_water instantaneous flow rate', 'point', NULL, 3, NULL, NULL),
(1, 'instantaneous power', 'point', NULL, 4, NULL, NULL),
-(1, 'COP', 'fraction', NULL, NULL, '5ca47bc5-22c2-47fc-b906-33222191ea40', '719acf65-b932-4176-94e5-e9fe420abc68');
+(1, 'COP', 'fraction', NULL, NULL, '5ca47bc5-22c2-47fc-b906-33222191ea40', '6db58cd6-33d3-58ed-a095-22333202fb51');
COMMIT;
@@ -358,7 +358,7 @@ VALUES
(1, 'inlet chilled water temperature', 'point', NULL, 2, NULL, NULL),
(1, 'chilled_water instantaneous flow rate', 'point', NULL, 3, NULL, NULL),
(1, 'instantaneous power', 'point', NULL, 4, NULL, NULL),
-(1, 'COP', 'fraction', NULL, NULL, '5ca47bc5-22c2-47fc-b906-33222191ea40', '719acf65-b932-4176-94e5-e9fe420abc68');
+(1, 'COP', 'fraction', NULL, NULL, '5ca47bc5-22c2-47fc-b906-33222191ea40', '6db58cd6-33d3-58ed-a095-22333202fb51');
COMMIT;
diff --git a/database/demo-de/myems_system_db.sql b/database/demo-de/myems_system_db.sql
index eb63115b4a..4569effe6b 100644
--- a/database/demo-de/myems_system_db.sql
+++ b/database/demo-de/myems_system_db.sql
@@ -81,7 +81,7 @@ VALUES
(1, 'inlet chilled water temperature', 'point', NULL, 2, NULL, NULL),
(1, 'chilled_water instantaneous flow rate', 'point', NULL, 3, NULL, NULL),
(1, 'instantaneous power', 'point', NULL, 4, NULL, NULL),
-(1, 'COP', 'fraction', NULL, NULL, '5ca47bc5-22c2-47fc-b906-33222191ea40', '719acf65-b932-4176-94e5-e9fe420abc68');
+(1, 'COP', 'fraction', NULL, NULL, '5ca47bc5-22c2-47fc-b906-33222191ea40', '6db58cd6-33d3-58ed-a095-22333202fb51');
COMMIT;
@@ -361,7 +361,7 @@ VALUES
(1, 'inlet chilled water temperature', 'point', NULL, 2, NULL, NULL),
(1, 'chilled_water instantaneous flow rate', 'point', NULL, 3, NULL, NULL),
(1, 'instantaneous power', 'point', NULL, 4, NULL, NULL),
-(1, 'COP', 'fraction', NULL, NULL, '5ca47bc5-22c2-47fc-b906-33222191ea40', '719acf65-b932-4176-94e5-e9fe420abc68');
+(1, 'COP', 'fraction', NULL, NULL, '5ca47bc5-22c2-47fc-b906-33222191ea40', '6db58cd6-33d3-58ed-a095-22333202fb51');
COMMIT;
diff --git a/database/demo-en/myems_system_db.sql b/database/demo-en/myems_system_db.sql
index cded5d9b29..7a0cf3f9c5 100644
--- a/database/demo-en/myems_system_db.sql
+++ b/database/demo-en/myems_system_db.sql
@@ -80,7 +80,7 @@ VALUES
(1, 'inlet chilled water temperature', 'point', NULL, 2, NULL, NULL),
(1, 'chilled_water instantaneous flow rate', 'point', NULL, 3, NULL, NULL),
(1, 'instantaneous power', 'point', NULL, 4, NULL, NULL),
-(1, 'COP', 'fraction', NULL, NULL, '5ca47bc5-22c2-47fc-b906-33222191ea40', '719acf65-b932-4176-94e5-e9fe420abc68');
+(1, 'COP', 'fraction', NULL, NULL, '5ca47bc5-22c2-47fc-b906-33222191ea40', '6db58cd6-33d3-58ed-a095-22333202fb51');
COMMIT;
@@ -360,7 +360,7 @@ VALUES
(1, 'inlet chilled water temperature', 'point', NULL, 2, NULL, NULL),
(1, 'chilled_water instantaneous flow rate', 'point', NULL, 3, NULL, NULL),
(1, 'instantaneous power', 'point', NULL, 4, NULL, NULL),
-(1, 'COP', 'fraction', NULL, NULL, '5ca47bc5-22c2-47fc-b906-33222191ea40', '719acf65-b932-4176-94e5-e9fe420abc68');
+(1, 'COP', 'fraction', NULL, NULL, '5ca47bc5-22c2-47fc-b906-33222191ea40', '6db58cd6-33d3-58ed-a095-22333202fb51');
COMMIT;
diff --git a/myems-api/MyEMS.postman_collection.json b/myems-api/MyEMS.postman_collection.json
index 9817a9caf0..e1e999f098 100644
--- a/myems-api/MyEMS.postman_collection.json
+++ b/myems-api/MyEMS.postman_collection.json
@@ -1,9 +1,9 @@
{
"info": {
- "_postman_id": "cbae0f56-2621-40cb-84c2-ceb5405404e6",
+ "_postman_id": "d7f95503-3697-4ef1-b685-29fca45d4f60",
"name": "MyEMS",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
- "_exporter_id": "32357384"
+ "_exporter_id": "10906958"
},
"item": [
{
@@ -7442,7 +7442,7 @@
},
{
"key": "Token",
- "value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
+ "value": "8ab8d8d7c6a801430add262122a6a9b833986a66e905e500b713e24758b5013275f47835fa03f858510dd6be578af309255468a0630d1f32210e53e8a909d2d0",
"type": "text",
"description": "Login first to get a valid token"
},
@@ -8554,7 +8554,7 @@
},
{
"key": "Token",
- "value": "1a1f96708d114309190035e5a637118a6e7fb00fd43c0bf39700c24e40a50c2baadd66885a686e84a49990ea4c43d2c3881a1bd5c972bf1a6e0c0fe73018d707",
+ "value": "8ab8d8d7c6a801430add262122a6a9b833986a66e905e500b713e24758b5013275f47835fa03f858510dd6be578af309255468a0630d1f32210e53e8a909d2d0",
"type": "text",
"description": "Login first to get a valid token"
},
@@ -8593,7 +8593,7 @@
},
{
"key": "Token",
- "value": "8eed1b1ae733d55edb8d73cf9af0ee8bb89e9695fb611ba787d11e8919464eda5606777c5c67e85aed1e5c662169e060ddfb61b50a60cf6c45f1fe9e5ccac76d",
+ "value": "8ab8d8d7c6a801430add262122a6a9b833986a66e905e500b713e24758b5013275f47835fa03f858510dd6be578af309255468a0630d1f32210e53e8a909d2d0",
"type": "text",
"description": "Login first to get a valid token"
},
@@ -8607,7 +8607,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"name\": \"设备_1\",\r\n \"is_input_counted\": true,\r\n \"is_output_counted\": false,\r\n \"cost_center\": {\r\n \"id\": 1,\r\n \"name\": \"成本中心\",\r\n \"uuid\": \"d97b9736-c4f9-4005-a534-6af3487303ad\"\r\n },\r\n \"svg\": \"\",\r\n \"camera_url\": \"http://XXX\",\r\n \"description\": \"description\",\r\n \"commands\": [\r\n {\r\n \"id\": 1,\r\n \"name\": \"计量表1\",\r\n \"uuid\": \"5ca47bc5-22c2-47fc-b906-33222191ea40\",\r\n \"energy_category\": {\r\n \"id\": 1,\r\n \"name\": \"电\",\r\n \"uuid\": \"6d0753ed-8b43-4332-b6fd-d2f5813831d3\"\r\n },\r\n \"is_output\": false\r\n }\r\n ],\r\n \"meters\": null,\r\n \"offline_meters\": [\r\n {\r\n \"id\": 1,\r\n \"name\": \"离线表1\",\r\n \"uuid\": \"62f473e0-1a35-41f3-9c30-8110d75d65bb\",\r\n \"energy_category\": {\r\n \"id\": 1,\r\n \"name\": \"电\",\r\n \"uuid\": \"6d0753ed-8b43-4332-b6fd-d2f5813831d3\"\r\n },\r\n \"is_output\": false\r\n }\r\n ],\r\n \"virtual_meters\": [\r\n {\r\n \"id\": 1,\r\n \"name\": \"虚拟表1\",\r\n \"uuid\": \"3fff2cfb-f755-44c8-a919-6135205a8573\",\r\n \"energy_category\": {\r\n \"id\": 1,\r\n \"name\": \"电\",\r\n \"uuid\": \"6d0753ed-8b43-4332-b6fd-d2f5813831d3\"\r\n },\r\n \"is_output\": false\r\n }\r\n ],\r\n \"parameters\": [\r\n {\r\n \"id\": 1,\r\n \"name\": \"serial number\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"bfa8b106\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 2,\r\n \"name\": \"manufacturer\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"York\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 3,\r\n \"name\": \"maintainer\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"Johnson Controls\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 4,\r\n \"name\": \"use life start\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"2016-01-01\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 5,\r\n \"name\": \"use life end\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"2025-12-31\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 6,\r\n \"name\": \"model number\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"CH01\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 7,\r\n \"name\": \"nominal cooling capacity\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"90.000 kW\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 8,\r\n \"name\": \"nominal cooling input power\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"100.000 kW\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 9,\r\n \"name\": \"nominal cooling cop\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"5\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 10,\r\n \"name\": \"nominal cooling operating current\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"120.000 A\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 11,\r\n \"name\": \"rated input power\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"100.000 kW\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 12,\r\n \"name\": \"nominal chilled water flow rate\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"30 m2/h\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 13,\r\n \"name\": \"nominal cooling water flow_rate\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"50 m2/h\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 14,\r\n \"name\": \"status\",\r\n \"parameter_type\": \"point\",\r\n \"constant\": null,\r\n \"point\": {\r\n \"id\": 1,\r\n \"name\": \"Active Energy Import Tariff 1\"\r\n },\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 15,\r\n \"name\": \"inlet chilled water temperature\",\r\n \"parameter_type\": \"point\",\r\n \"constant\": null,\r\n \"point\": {\r\n \"id\": 2,\r\n \"name\": \"Working hours counter\"\r\n },\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 16,\r\n \"name\": \"chilled_water instantaneous flow rate\",\r\n \"parameter_type\": \"point\",\r\n \"constant\": null,\r\n \"point\": {\r\n \"id\": 3,\r\n \"name\": \"Current a\"\r\n },\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 17,\r\n \"name\": \"instantaneous power\",\r\n \"parameter_type\": \"point\",\r\n \"constant\": null,\r\n \"point\": {\r\n \"id\": 4,\r\n \"name\": \"Active Power a\"\r\n },\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 18,\r\n \"name\": \"COP\",\r\n \"parameter_type\": \"fraction\",\r\n \"constant\": null,\r\n \"point\": null,\r\n \"numerator_meter\": {\r\n \"type\": \"meter\",\r\n \"id\": 1,\r\n \"name\": \"计量表1\",\r\n \"uuid\": \"5ca47bc5-22c2-47fc-b906-33222191ea40\"\r\n },\r\n \"denominator_meter\": {\r\n \"uuid\": \"3fff2cfb-f755-44c8-a919-6135205a8573\"\r\n }\r\n }\r\n ]\r\n}",
+ "raw": "{\r\n \"name\": \"设备_1\",\r\n \"is_input_counted\": true,\r\n \"is_output_counted\": false,\r\n \"cost_center\": {\r\n \"id\": 1,\r\n \"name\": \"成本中心\",\r\n \"uuid\": \"d97b9736-c4f9-4005-a534-6af3487303ad\"\r\n },\r\n \"svg\": \"\",\r\n \"camera_url\": \"http://XXX\",\r\n \"description\": \"description\",\r\n \"commands\": null,\r\n \"meters\": [\r\n {\r\n \"id\": 1,\r\n \"name\": \"计量表1\",\r\n \"uuid\": \"5ca47bc5-22c2-47fc-b906-33222191ea40\",\r\n \"energy_category\": {\r\n \"id\": 1,\r\n \"name\": \"电\",\r\n \"uuid\": \"6d0753ed-8b43-4332-b6fd-d2f5813831d3\"\r\n },\r\n \"is_output\": false\r\n }\r\n ],\r\n \"offline_meters\": [\r\n {\r\n \"id\": 1,\r\n \"name\": \"离线表1\",\r\n \"uuid\": \"62f473e0-1a35-41f3-9c30-8110d75d65bb\",\r\n \"energy_category\": {\r\n \"id\": 1,\r\n \"name\": \"电\",\r\n \"uuid\": \"6d0753ed-8b43-4332-b6fd-d2f5813831d3\"\r\n },\r\n \"is_output\": false\r\n }\r\n ],\r\n \"virtual_meters\": [\r\n {\r\n \"id\": 1,\r\n \"name\": \"虚拟表1\",\r\n \"uuid\": \"3fff2cfb-f755-44c8-a919-6135205a8573\",\r\n \"energy_category\": {\r\n \"id\": 1,\r\n \"name\": \"电\",\r\n \"uuid\": \"6d0753ed-8b43-4332-b6fd-d2f5813831d3\"\r\n },\r\n \"is_output\": false\r\n }\r\n ],\r\n \"parameters\": [\r\n {\r\n \"id\": 1,\r\n \"name\": \"serial number\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"bfa8b106\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 2,\r\n \"name\": \"manufacturer\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"York\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 3,\r\n \"name\": \"maintainer\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"Johnson Controls\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 4,\r\n \"name\": \"use life start\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"2016-01-01\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 5,\r\n \"name\": \"use life end\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"2025-12-31\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 6,\r\n \"name\": \"model number\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"CH01\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 7,\r\n \"name\": \"nominal cooling capacity\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"90.000 kW\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 8,\r\n \"name\": \"nominal cooling input power\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"100.000 kW\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 9,\r\n \"name\": \"nominal cooling cop\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"5\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 10,\r\n \"name\": \"nominal cooling operating current\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"120.000 A\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 11,\r\n \"name\": \"rated input power\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"100.000 kW\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 12,\r\n \"name\": \"nominal chilled water flow rate\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"30 m2/h\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 13,\r\n \"name\": \"nominal cooling water flow_rate\",\r\n \"parameter_type\": \"constant\",\r\n \"constant\": \"50 m2/h\",\r\n \"point\": null,\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 14,\r\n \"name\": \"status\",\r\n \"parameter_type\": \"point\",\r\n \"constant\": null,\r\n \"point\": {\r\n \"id\": 1,\r\n \"name\": \"Active Energy Import Tariff 1\"\r\n },\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 15,\r\n \"name\": \"inlet chilled water temperature\",\r\n \"parameter_type\": \"point\",\r\n \"constant\": null,\r\n \"point\": {\r\n \"id\": 2,\r\n \"name\": \"Working hours counter\"\r\n },\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 16,\r\n \"name\": \"chilled_water instantaneous flow rate\",\r\n \"parameter_type\": \"point\",\r\n \"constant\": null,\r\n \"point\": {\r\n \"id\": 3,\r\n \"name\": \"Current a\"\r\n },\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 17,\r\n \"name\": \"instantaneous power\",\r\n \"parameter_type\": \"point\",\r\n \"constant\": null,\r\n \"point\": {\r\n \"id\": 4,\r\n \"name\": \"Active Power a\"\r\n },\r\n \"numerator_meter\": null,\r\n \"denominator_meter\": null\r\n },\r\n {\r\n \"id\": 18,\r\n \"name\": \"COP\",\r\n \"parameter_type\": \"fraction\",\r\n \"constant\": null,\r\n \"point\": null,\r\n \"numerator_meter\": {\r\n \"type\": \"meter\",\r\n \"id\": 1,\r\n \"name\": \"计量表1\",\r\n \"uuid\": \"5ca47bc5-22c2-47fc-b906-33222191ea40\"\r\n },\r\n \"denominator_meter\": {\r\n \"uuid\": \"3fff2cfb-f755-44c8-a919-6135205a8573\"\r\n }\r\n }\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
@@ -8640,7 +8640,7 @@
},
{
"key": "Token",
- "value": "8eed1b1ae733d55edb8d73cf9af0ee8bb89e9695fb611ba787d11e8919464eda5606777c5c67e85aed1e5c662169e060ddfb61b50a60cf6c45f1fe9e5ccac76d",
+ "value": "8ab8d8d7c6a801430add262122a6a9b833986a66e905e500b713e24758b5013275f47835fa03f858510dd6be578af309255468a0630d1f32210e53e8a909d2d0",
"type": "text",
"description": "Login first to get a valid token"
},
diff --git a/myems-api/core/equipment.py b/myems-api/core/equipment.py
index 782f834bdc..8a3c424778 100644
--- a/myems-api/core/equipment.py
+++ b/myems-api/core/equipment.py
@@ -2155,7 +2155,7 @@ def on_get(req, resp, id_):
"energy_category": energy_category,
"is_output": bool(row[4])}
meter_result.append(result)
- meta_result['commands'] = meter_result
+ meta_result['meters'] = meter_result
query = (" SELECT m.id, m.name, m.uuid, m.energy_category_id, em.is_output "
" FROM tbl_equipments e, tbl_equipments_offline_meters em, tbl_offline_meters m "
" WHERE em.equipment_id = e.id AND m.id = em.offline_meter_id AND e.id = %s "
@@ -2639,7 +2639,7 @@ def on_post(req, resp):
class EquipmentClone:
@staticmethod
def __init__():
- """Initializes EquipmentExport"""
+ """Initializes EquipmentClone"""
pass
@staticmethod
@@ -2743,7 +2743,7 @@ def on_post(req, resp, id_):
"energy_category": energy_category,
"is_output": bool(row[4])}
meter_result.append(result)
- meta_result['commands'] = meter_result
+ meta_result['meters'] = meter_result
query = (" SELECT m.id, m.name, m.uuid, m.energy_category_id, em.is_output "
" FROM tbl_equipments e, tbl_equipments_offline_meters em, tbl_offline_meters m "
" WHERE em.equipment_id = e.id AND m.id = em.offline_meter_id AND e.id = %s "