I think there is an issue accessing number properties of an object with the . (dot) notation
Try msg.payload = Number(msg.payload.vars["1"].value)
or change the 1 key to something that starts with characters if you have access to how the original payload is constructed.