From 0f5d7d18f98d6d961b3d21dc2b1b59905e261fff Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期二, 23 二月 2021 17:09:17 +0800 Subject: [PATCH] 20210223-1 --- HDL_ON/Entity/FunctionList.cs | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs index e963308..e9376a3 100644 --- a/HDL_ON/Entity/FunctionList.cs +++ b/HDL_ON/Entity/FunctionList.cs @@ -241,7 +241,7 @@ break; case SPK.SensorSmoke: case SPK.SensorWater: - case SPK.SensorGas: + case SPK.SensorDoorWindow: case SPK.SensorPir: var ser = Newtonsoft.Json.JsonConvert.DeserializeObject<Sensor>(functionDataString); List.sensorsArm.Add(ser); @@ -616,7 +616,23 @@ { Read3tyFunctionStatus(); - if (DriverLayer.Control.Ins.IsRemote) + if(DriverLayer.Control.Ins.GatewayOnline_Local) + { + foreach (var function in GetDeviceFunctionList(SPK.BrandType.Hdl)) + { + switch (function.Spk_Prefix) + { + case FunctionCategory.Light: + case FunctionCategory.Electric: + case FunctionCategory.Curtain: + case FunctionCategory.AC: + case FunctionCategory.FloorHeat: + DriverLayer.Control.Ins.SendReadCommand(function); + break; + } + } + } + else { var page = new List<string>(); int count = 0; @@ -633,22 +649,6 @@ } } DriverLayer.Control.Ins.SendApiReadCommand(page); - } - else - { - foreach (var function in GetDeviceFunctionList(SPK.BrandType.Hdl)) - { - switch (function.Spk_Prefix) - { - case FunctionCategory.Light: - case FunctionCategory.Electric: - case FunctionCategory.Curtain: - case FunctionCategory.AC: - case FunctionCategory.FloorHeat: - DriverLayer.Control.Ins.SendReadCommand(function); - break; - } - } } } catch (Exception ex) -- Gitblit v1.8.0