* @param the level to set. 0 is mapped to off, > 0 is mapped to on.
* @return the serial message
*/
public SerialMessage setValueMessage(int level) {
logger.debug("Creating new message for application command SWITCH_MULTILEVEL_SET for node {}", this.getNode().getNodeId());
SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Request, SerialMessageClass.SendData, SerialMessagePriority.Set);
byte[] newPayload = { (byte) this.getNode().getNodeId(),
3,
(byte) getCommandClass().getKey(),
(byte) SWITCH_MULTILEVEL_SET,
(byte) level
};
result.setMessagePayload(newPayload);
return result;
}