From ab852818b685086e6b0db4b95936bd247426b815 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 01 二月 2021 16:06:56 +0800
Subject: [PATCH] 涂鸦风扇,净化器,扫地机器人整得差不多了
---
HDL_ON/Entity/Function/Function.cs | 63 +++++++++++++++++++++++++++----
1 files changed, 54 insertions(+), 9 deletions(-)
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 7b241c6..81bfa9d 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -221,16 +221,12 @@
_trait_on_off.curValue = "off";
}
}
- if(_trait_on_off.curValue.ToString() != "on"&& _trait_on_off.curValue.ToString() != "off")
+ if(_trait_on_off.curValue.ToString() != "on"&& _trait_on_off.curValue.ToString() != "off" && _trait_on_off.curValue.ToString() != "stop")
{
_trait_on_off.curValue = "off";
}
return _trait_on_off;
}
- //set
- //{
- // _trait_on_off = value;
- //}
}
/// <summary>
@@ -653,7 +649,19 @@
/// 褰撳墠鍊�
/// </summary>
public object curValue = new object();
-
+ /// <summary>
+ /// curValue鐨勭炕璇戝��,鏈�鍧忕殑缁撴灉涔熷彧浼氳繑鍥瀞tring.Empty
+ /// </summary>
+ public string realValue
+ {
+ get
+ {
+ var myValue = curValue.ToString();
+ //娌欓洉瀹氫箟鐨刼bject绫诲瀷
+ if (myValue.Contains("{") == true) { return string.Empty; }
+ return myValue;
+ }
+ }
}
/// <summary>
/// 鍔熻兘灞炴�ч敭鍚嶅垪琛�
@@ -841,10 +849,36 @@
/// 婀垮害浼犳劅鍣�
/// </summary>
public const string SensorHumidity = "sensor.humidity";
+
+ /// <summary>
+ /// 鐑熼浘浼犳劅鍣�
+ /// </summary>
+ public const string SensorSmoke = "sensor.smoke";
+ /// <summary>
+ /// 姘存蹈浼犳劅鍣�
+ /// </summary>
+ public const string SensorWater = "sensor.water";
+ /// <summary>
+ /// 鐕冩皵浼犳劅鍣�
+ /// </summary>
+ public const string SensorGas= "sensor.gas";
+ /// <summary>
+ /// 绾㈠鐝婃爮浼犳劅鍣�
+ /// </summary>
+ public const string SensorShanLan = "sensor.shanlan";
+ /// <summary>
+ /// 绾㈠瀵瑰皠浼犳劅鍣�
+ /// </summary>
+ public const string SensorDuiShe = "sensor.duishe";
+ /// <summary>
+ /// 瓒呭0娉紶鎰熷櫒
+ /// </summary>
+ public const string SensoruUtrasonic = "sensor.ultrasonic";
+
/// <summary>
/// 锛堝共鎺ョ偣锛�
/// </summary>
- public const string DryContact = "dryContact.standard";
+ public const string SensorDryContact = "sensor.dryContact";
/// <summary>
/// 瀹剁數銆佹彃搴�
/// </summary>
@@ -856,8 +890,19 @@
/// <summary>
/// 瀹剁數銆侀鎵�
/// </summary>
- public const string ElectricFan = "electrical.fan";
-
+ public const string ElectricFan = "electrical.fan";
+ /// <summary>
+ /// 瀹剁數銆佹秱楦︾┖姘斿噣鍖栧櫒
+ /// </summary>
+ public const string ElectricTuyaAirCleaner = "electrical.Q1RsefNf91tIXyyQ";
+ /// <summary>
+ /// 瀹剁數銆佹秱楦︾數椋庢墖
+ /// </summary>
+ public const string ElectricTuyaFan = "electrical.tyqborgovyzytytz";
+ /// <summary>
+ /// 瀹剁數銆佹秱楦︽壂鍦版満鍣ㄤ汉
+ /// </summary>
+ public const string ElectricTuyaWeepRobot = "electrical.ai6HtccKFIw3dxo3";
}
--
Gitblit v1.8.0