From f71e74b5f0d2716fbf05da016cdaa18d64e09f80 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期四, 31 十二月 2020 17:01:18 +0800 Subject: [PATCH] 又换完成最新门锁。空气质量传感器完成数据和基本配置功能。开发图表和自动化的同事可下载此代码 --- ZigbeeApp/Shared/Phone/ZigBee/Device/LigthtBase.cs | 37 +++++++++++++++++++++++++++++++++++++ 1 files changed, 37 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/LigthtBase.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/LigthtBase.cs new file mode 100755 index 0000000..3a26cac --- /dev/null +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/LigthtBase.cs @@ -0,0 +1,37 @@ +锘縰sing System; +using Newtonsoft.Json.Linq; + +namespace ZigBee.Device +{ + [System.Serializable] + public class LightBase : CommonDevice + { + /// <summary> + /// 寮�鍏夌姸鎬�:0=鍏�,1=寮�, + /// </summary> + [Newtonsoft.Json.JsonIgnore] + public int OnOffStatus = 0; + + #region 寮�鍏� + ///<summary > + ///鐏厜寮�鍏虫帶鍒� + /// <para>command鐨勫��</para> + ///<para>0 : 鍏抽棴</para> + ///<para>1: 鎵撳紑</para> + ///<para>2锛氬彇鍙�</para> + /// </summary> + public void LightOpenOFFControl(int command) + { + SwitchControl(command); + } + #endregion + + /// <summary> + /// 璇诲彇寮�鍏崇姸鎬� + /// </summary> + public void ReadOnOffStatus() + { + ReadAttri(Device.Cluster_ID.Switch, AttriButeId.Switch); + } + } +} -- Gitblit v1.8.0