| | |
| | | if (ac.GetBusId() == subnetID + "_" + deviceID + "_" + receiveBytes[0]) |
| | | { |
| | | ac.curTempType = receiveBytes[1]; |
| | | ac.trait_IndoorTemp.curValue = receiveBytes[2].ToString(); |
| | | ac.SetAttrState(FunctionAttributeKey.IndoorTemp, receiveBytes[2].ToString()); |
| | | ac.trait_on_off.curValue = receiveBytes[8] == 1 ? "on" : "off"; |
| | | ac.curModeIndex = receiveBytes[9]; |
| | | ac.curFanIndex = receiveBytes[10]; |
| | | ac.trait_temp.curValue = receiveBytes[11].ToString(); |
| | | ac.SetModeIndex(receiveBytes[9]); |
| | | ac.SetFanIndex(receiveBytes[10]); |
| | | ac.SetAttrState(FunctionAttributeKey.SetTemp, receiveBytes[11].ToString()); |
| | | ac.lastState = ""; |
| | | switch (ac.trait_mode.curValue.ToString()) |
| | | switch (ac.GetAttrState(FunctionAttributeKey.Mode)) |
| | | { |
| | | case "cool": |
| | | ac.lastState = Language.StringByID(StringId.Cool); |
| | |
| | | ac.lastState = Language.StringByID(StringId.AirSupply); |
| | | break; |
| | | } |
| | | switch (ac.trait_fan.curValue.ToString()) |
| | | switch (ac.GetAttrState(FunctionAttributeKey.FanSpeed)) |
| | | { |
| | | case "high": |
| | | ac.lastState += " " + Language.StringByID(StringId.HighWindSpeed); |
| | |
| | | ac.lastState += " " + Language.StringByID(StringId.Auto); |
| | | break; |
| | | } |
| | | ac.lastState += " " + ac.trait_temp.curValue + ac.tempUnitString; |
| | | ac.lastState += " " + ac.GetAttrState(FunctionAttributeKey.SetTemp) + ac.tempUnitString; |
| | | RoomPage.UpdataStates(ac); |
| | | FunctionPage.UpdataStates(ac); |
| | | HomePage.UpdataFunctionStates(ac); |
| | |
| | | case 7: |
| | | case 8: |
| | | case 19: |
| | | ac.trait_temp.curValue = receiveBytes[1].ToString(); |
| | | ac.SetAttrState(FunctionAttributeKey.SetTemp, receiveBytes[1].ToString()); |
| | | break; |
| | | case 5: |
| | | ac.curFanIndex = receiveBytes[1]; |
| | | ac.SetFanIndex ( receiveBytes[1]); |
| | | break; |
| | | case 6: |
| | | ac.curModeIndex = receiveBytes[1]; |
| | | ac.SetModeIndex ( receiveBytes[1]); |
| | | break; |
| | | |
| | | } |
| | | ac.lastState = ""; |
| | | ac.lastState += " " + ac.trait_temp.curValue + ac.tempUnitString; |
| | | ac.lastState += " " + ac.GetAttrState(FunctionAttributeKey.SetTemp) + ac.tempUnitString; |
| | | RoomPage.UpdataStates(ac); |
| | | FunctionPage.UpdataStates(ac); |
| | | HomePage.UpdataFunctionStates(ac); |
| | |
| | | { |
| | | if (ac.GetBusId() == subnetID + "_" + deviceID + "_" + receiveBytes[0]) |
| | | { |
| | | ac.trait_IndoorTemp.curValue = receiveBytes[1].ToString(); |
| | | ac.SetAttrState(FunctionAttributeKey.IndoorTemp, receiveBytes[1].ToString()); |
| | | FunctionPage.UpdataStates(ac); |
| | | } |
| | | } |