| | |
| | | } |
| | | } |
| | | |
| | | string us = ""; |
| | | switch (attr.key) |
| | | { |
| | | case FunctionAttributeKey.SetTemp: |
| | | case FunctionAttributeKey.RoomTemp: |
| | | us = "°C"; |
| | | var tempType = attributes.Find((obj) => obj.key == FunctionAttributeKey.TempType); |
| | | if (tempType != null) |
| | | { |
| | | us = tempType.curValue.ToString(); |
| | | } |
| | | break; |
| | | case FunctionAttributeKey.Percent: |
| | | case FunctionAttributeKey.Brightness: |
| | | us = "%"; |
| | | break; |
| | | case FunctionAttributeKey.CCT: |
| | | us = "K"; |
| | | break; |
| | | case FunctionAttributeKey.Angle: |
| | | us = "°"; |
| | | break; |
| | | } |
| | | |
| | | |
| | | switch (attr.key) |
| | | { |
| | | case FunctionAttributeKey.OnOff: |
| | |
| | | { |
| | | vv = 26; |
| | | } |
| | | sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = Convert.ToInt32(vv).ToString(), max = attr.max, min = attr.min }); |
| | | sFunc.status.Add(new SceneFunctionStatus() { |
| | | UintString = us, |
| | | key = attr.key, value = Convert.ToInt32(vv).ToString(), max = attr.max, min = attr.min }) ; |
| | | } |
| | | else |
| | | { |
| | | sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = attr.curValue.ToString(), max = attr.max, min = attr.min }); |
| | | sFunc.status.Add(new SceneFunctionStatus() { |
| | | UintString = us, |
| | | key = attr.key, value = attr.curValue.ToString(), max = attr.max, min = attr.min }); |
| | | } |
| | | |
| | | break; |