瀏覽代碼

fix:物模型枚举类型修改为字符串类型

tangfudong 1 年之前
父節點
當前提交
6fb56c3f28
共有 1 個文件被更改,包括 70 次插入64 次删除
  1. 70 64
      data/init/thingModel.json

+ 70 - 64
data/init/thingModel.json

@@ -988,70 +988,76 @@
     "productKey": "bGdZt8ffBETtsirm",
     "model": {
       "properties": [
-        {
-          "identifier": "temp",
-          "dataType": {
-            "type": "int32",
-            "specs": {
-              "min": "17",
-              "max": "32"
-            }
-          },
-          "name": "温度",
-          "accessMode": "rw"
-        },
-        {
-          "identifier": "swing_modes",
-          "dataType": {
-            "type": "bool",
-            "specs": {
-              "0": "关",
-              "1": "开"
-            }
-          },
-          "name": "扫风开关",
-          "accessMode": "rw"
-        },
-        {
-          "identifier": "modes",
-          "dataType": {
-            "type": "enum",
-            "specs": {
-              "0": "制热",
-              "1": "关闭",
-              "2": "制冷",
-              "3": "送风"
-            }
-          },
-          "name": "模式",
-          "accessMode": "rw"
-        },
-        {
-          "identifier": "fan_modes",
-          "dataType": {
-            "type": "enum",
-            "specs": {
-              "0": "高",
-              "1": "中",
-              "2": "低"
-            }
-          },
-          "name": "风模式",
-          "accessMode": "rw"
-        },
-        {
-          "identifier": "presets_modes",
-          "dataType": {
-            "type": "enum",
-            "specs": {
-              "0": "节能",
-              "1": "睡眠",
-              "2": "活动"
-            }
-          },
-          "name": "预设模式",
-          "accessMode": "rw"
-        }
+          {
+            "identifier": "temp",
+            "dataType": {
+              "type": "int32",
+              "specs": {
+                "min": "17",
+                "max": "32"
+              }
+            },
+            "name": "温度",
+            "accessMode": "rw",
+            "description": "温度",
+            "unit": "℃"
+          },
+          {
+            "identifier": "swing_modes",
+            "dataType": {
+              "type": "enum",
+              "specs": {
+                "off": "关",
+                "on": "开"
+              }
+            },
+            "name": "扫风开关",
+            "accessMode": "rw",
+            "description": "扫风开关"
+          },
+          {
+            "identifier": "modes",
+            "dataType": {
+              "type": "enum",
+              "specs": {
+                "heat": "制热",
+                "off": "关闭",
+                "cool": "制冷",
+                "fan_only": "送风"
+              }
+            },
+            "name": "模式",
+            "accessMode": "rw",
+            "description": "模式"
+          },
+          {
+            "identifier": "fan_modes",
+            "dataType": {
+              "type": "enum",
+              "specs": {
+                "high": "高",
+                "medium": "中",
+                "low": "低"
+              }
+            },
+            "name": "风模式",
+            "accessMode": "rw",
+            "description": "风模式"
+          },
+          {
+            "identifier": "preset_modes",
+            "dataType": {
+              "type": "enum",
+              "specs": {
+                "eco": "节能",
+                "sleep": "睡眠",
+                "activity": "活动"
+              }
+            },
+            "name": "预设模式",
+            "accessMode": "rw",
+            "description": "预设模式"
+          }
       ],
       "services": [
       ],