Adds toString() to DeviceState.