| | |
| | | common.CustomDelayTimeClose = 0; |
| | | } |
| | | room.DeviceList.Add (common); |
| | | } else if (deviceType == DeviceType.LightRGB.ToString ()) { |
| | | } else if (deviceType == DeviceType.LightRGB.ToString ()) { |
| | | var common = Newtonsoft.Json.JsonConvert.DeserializeObject<LightLogic> (jsonInfo); |
| | | common.CurrentBrightness = 0; |
| | | string keyString = common.SubnetID.ToString () + "_" + common.DeviceID.ToString () + "_" + common.LoopID.ToString (); |
| | |
| | | common.CustomDelayTimeClose = 0; |
| | | } |
| | | room.DeviceList.Add (common); |
| | | } else if (deviceType == DeviceType.LightSwitch.ToString ()){ |
| | | } else if (deviceType == DeviceType.LightSwitch.ToString ()) { |
| | | var common = Newtonsoft.Json.JsonConvert.DeserializeObject<LightSwitch> (jsonInfo); |
| | | room.DeviceList.Add (common); |
| | | } |
| | | else if (deviceType == DeviceType.LogicModule.ToString()) |
| | | { |
| | | var common = Newtonsoft.Json.JsonConvert.DeserializeObject<LogicModule>(jsonInfo); |
| | | room.DeviceList.Add(common); |
| | | } |
| | | else if (deviceType == DeviceType.LightMixSwitch.ToString () ){ |
| | | } else if (deviceType == DeviceType.LightMixSwitch.ToString ()) { |
| | | var common = Newtonsoft.Json.JsonConvert.DeserializeObject<LightMixSwitch> (jsonInfo); |
| | | room.DeviceList.Add (common); |
| | | } else if ( deviceType == DeviceType.LightEnergySwitch.ToString ()) { |
| | | } else if (deviceType == DeviceType.LightEnergySocket.ToString ()) { |
| | | var common = Newtonsoft.Json.JsonConvert.DeserializeObject<LightEnergySocket> (jsonInfo); |
| | | room.DeviceList.Add (common); |
| | | } else if (deviceType == DeviceType.LightEnergySwitch.ToString ()) { |
| | | var common = Newtonsoft.Json.JsonConvert.DeserializeObject<LightEnergySwitch> (jsonInfo); |
| | | room.DeviceList.Add (common); |
| | | } else if (deviceType == DeviceType.CurtainModel.ToString ()) { |
| | |
| | | room.DeviceList.Add (Newtonsoft.Json.JsonConvert.DeserializeObject<SensorCO2> (jsonInfo)); |
| | | } else if (deviceType == DeviceType.SensorTVOC.ToString ()) { |
| | | room.DeviceList.Add (Newtonsoft.Json.JsonConvert.DeserializeObject<SensorTVOC> (jsonInfo)); |
| | | } else if (deviceType == DeviceType.SensorPM25.ToString ()) { |
| | | } else if (deviceType == DeviceType.SensorPM25.ToString ()) { |
| | | room.DeviceList.Add (Newtonsoft.Json.JsonConvert.DeserializeObject<SensorPM25> (jsonInfo)); |
| | | } else if (deviceType == DeviceType.SensorTemperature.ToString ()) { |
| | | } else if (deviceType == DeviceType.SensorTemperature.ToString ()) { |
| | | room.DeviceList.Add (Newtonsoft.Json.JsonConvert.DeserializeObject<SensorTemperature> (jsonInfo)); |
| | | } else if (deviceType == DeviceType.SensorHumidity.ToString ()) { |
| | | room.DeviceList.Add (Newtonsoft.Json.JsonConvert.DeserializeObject<SensorHumidity> (jsonInfo)); |
| | | } else if (deviceType == DeviceType.FreshAir.ToString ()) { |
| | | room.DeviceList.Add (Newtonsoft.Json.JsonConvert.DeserializeObject<FreshAir> (jsonInfo)); |
| | | } |
| | | //else if (deviceType == DeviceType.Thermostat.ToString ()) { |
| | | // room.DeviceList.Add (Newtonsoft.Json.JsonConvert.DeserializeObject<Thermostat> (jsonInfo)); |
| | | //} |
| | | //else if (deviceType == DeviceType.ACMerrill.ToString ()) {//2020-03-10 新增美林空调系统支持 |
| | | // room.DeviceList.Add (Newtonsoft.Json.JsonConvert.DeserializeObject<ACMerrill> (jsonInfo)); |
| | | //} |
| | | //else if (deviceType == DeviceType.DoorLockRelay.ToString ()) { //屏蔽继电器门锁 |
| | | // room.DeviceList.Add (Newtonsoft.Json.JsonConvert.DeserializeObject<LightDoorLock> (jsonInfo)); |
| | | //} |
| | | |
| | | |
| | | |
| | | for (int i = UserConfig.Instance.HideDeviceTypes.Count - 1; i >= 0; i--) { |
| | | var hideType = UserConfig.Instance.HideDeviceTypes [i]; |