From 1dade03e0e71076af3a3de1bf10ba6cad61ac216 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 01 二月 2021 19:22:38 +0800
Subject: [PATCH] Merge branch 'dev-tzy' into NewFilePath
---
HDL_ON/Entity/Function/Function.cs | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 52 insertions(+), 5 deletions(-)
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
old mode 100755
new mode 100644
index 81bfa9d..639aa6e
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -153,6 +153,10 @@
/// attri
/// </summary>
public List<FunctionAttributes> attributes = new List<FunctionAttributes>();
+ /// <summary>
+ /// 鍔熻兘鐘舵�佸垪琛�
+ /// </summary>
+ public List<AttributesStatus> status = new List<AttributesStatus>();
/// <summary>
/// 鎴块棿ID鍒楄〃
@@ -520,7 +524,7 @@
acd.sid = sid;
foreach (var dic in commandDictionary)
{
- var aca = new AlinkControlAttributes();
+ var aca = new AttributesStatus();
aca.key = dic.Key;
aca.value = dic.Value;
acd.status.Add(aca);
@@ -542,7 +546,7 @@
aaao.bus = this.bus;
foreach (var kv in keyValues)
{
- aaao.attributes.Add(new AlinkControlAttributes()
+ aaao.attributes.Add(new AttributesStatus()
{
key = kv.Key,
value = kv.Value,
@@ -568,7 +572,7 @@
/// </summary>
public string spk = "";
- public List<AlinkControlAttributes> attributes = new List<AlinkControlAttributes>();
+ public List<AttributesStatus> attributes = new List<AttributesStatus>();
//[Newtonsoft.Json.JsonIgnore]
public BusData bus = new BusData();
}
@@ -599,12 +603,12 @@
public class AlinkControlData
{
public string sid = "";
- public List<AlinkControlAttributes> status = new List<AlinkControlAttributes>();
+ public List<AttributesStatus> status = new List<AttributesStatus>();
}
/// <summary>
/// a鍗忚鎺у埗鍔ㄤ綔鏁版嵁
/// </summary>
- public class AlinkControlAttributes
+ public class AttributesStatus
{
/// <summary>
/// 灞炴�у悕
@@ -903,6 +907,47 @@
/// 瀹剁數銆佹秱楦︽壂鍦版満鍣ㄤ汉
/// </summary>
public const string ElectricTuyaWeepRobot = "electrical.ai6HtccKFIw3dxo3";
+ /// <summary>
+ /// 瀹剁數銆佹秱楦︽按闃�
+ /// </summary>
+ public const string ElectricTuyaWaterValve = "electrical.koiGhMKwLf2ZP81g";
+
+
+ /// <summary>
+ /// 鑾峰彇绗笁鏂硅澶噑pk
+ /// </summary>
+ /// <returns></returns>
+ public static List<string> Get3tySpk(BrandType brandType)
+ {
+ var list = new List<string>();
+
+ switch (brandType)
+ {
+ case BrandType.All3tyBrand:
+ case BrandType.Tuya:
+ list.Add(ElectricTuyaAirCleaner);
+ list.Add(ElectricTuyaFan);
+ list.Add(ElectricTuyaWaterValve);
+ list.Add(ElectricTuyaWeepRobot);
+ break;
+ }
+ return list;
+ }
+
+ /// <summary>
+ /// 绗笁鏂瑰搧鐗屽垪琛�
+ /// </summary>
+ public enum BrandType
+ {
+ All = 0,
+ Hdl = 1,
+ Tuya = 2,
+
+
+ All3tyBrand = 999,
+ }
+
+
}
@@ -949,6 +994,8 @@
public const string Electric = "electrical";
//Music = 0x09,
+
+
}
--
Gitblit v1.8.0