| | |
| | | { |
| | | continue; |
| | | } |
| | | bindFreshAirName = device.DeviceEpointName; |
| | | if (string.IsNullOrEmpty(bDev.ESName)) |
| | | { |
| | | bindFreshAirName = device.DeviceEpointName; |
| | | } |
| | | else |
| | | { |
| | | bindFreshAirName = bDev.ESName; |
| | | } |
| | | |
| | | bindFreshAirDev = device; |
| | | } |
| | | if (device.Type == DeviceType.TemperatureSensor) |
| | |
| | | var bD = device as TemperatureSensor; |
| | | if (bD.SensorDiv == 1) |
| | | { |
| | | bindTemperatureName = device.DeviceEpointName; |
| | | if (string.IsNullOrEmpty(bDev.ESName)) |
| | | { |
| | | bindTemperatureName = device.DeviceEpointName; |
| | | } |
| | | else |
| | | { |
| | | bindTemperatureName = bDev.ESName; |
| | | } |
| | | |
| | | bindTemperatureDev = device; |
| | | } |
| | | if (bD.SensorDiv == 2) |
| | | { |
| | | bindHumidityName = device.DeviceEpointName; |
| | | if (string.IsNullOrEmpty(bDev.ESName)) |
| | | { |
| | | bindHumidityName = device.DeviceEpointName; |
| | | } |
| | | else |
| | | { |
| | | bindHumidityName = bDev.ESName; |
| | | } |
| | | |
| | | bindHumidityDev = device; |
| | | } |
| | | } |
| | | if (device.Type == DeviceType.FreshAirHumiditySensor) |
| | | { |
| | | bindHumidityName = device.DeviceEpointName; |
| | | if (string.IsNullOrEmpty(bDev.ESName)) |
| | | { |
| | | bindHumidityName = device.DeviceEpointName; |
| | | } |
| | | else |
| | | { |
| | | bindHumidityName = bDev.ESName; |
| | | } |
| | | |
| | | bindHumidityDev = device; |
| | | } |
| | | if (device.Type == DeviceType.PMSensor) |
| | | { |
| | | if (bDev.BindCluster == 1026) |
| | | { |
| | | bindTemperatureName = device.DeviceEpointName; |
| | | if (string.IsNullOrEmpty(bDev.ESName)) |
| | | { |
| | | bindTemperatureName = device.DeviceEpointName; |
| | | } |
| | | else |
| | | { |
| | | bindTemperatureName = bDev.ESName; |
| | | } |
| | | |
| | | bindTemperatureDev = device; |
| | | } |
| | | if (bDev.BindCluster == 1029) |
| | | { |
| | | bindHumidityName = device.DeviceEpointName; |
| | | if (string.IsNullOrEmpty(bDev.ESName)) |
| | | { |
| | | bindHumidityName = device.DeviceEpointName; |
| | | } |
| | | else |
| | | { |
| | | bindHumidityName = bDev.ESName; |
| | | } |
| | | |
| | | bindHumidityDev = device; |
| | | } |
| | | if (bDev.BindCluster == 1066) |
| | | { |
| | | bindPmName = device.DeviceEpointName; |
| | | if (string.IsNullOrEmpty(bDev.ESName)) |
| | | { |
| | | bindPmName = device.DeviceEpointName; |
| | | } |
| | | else |
| | | { |
| | | bindPmName = bDev.ESName; |
| | | } |
| | | |
| | | bindPMDev = device; |
| | | } |
| | | } |