Input.gyro.attitude Accuracy

In my app, I need to be aware of the device rotation. I am trying to pull the y-axis value from the gyroscope using the following:

var y = Input.gyro.attitude.eulerAngles.y;

If I simply output that to the screen and turn in a circle (holding my phone straight up and down…as if you were looking at the screen), I get the following:

270, 270, 270, 270, etc…270, 290, 310, 20, 40, 60, 80 (very quickly)…90, 90, 90, 90, etc…blah…

Is there any way to account for this jump in numbers?

Check https://docs.unity3d.com/ScriptReference/Vector3.Slerp.html

And Quaternion.Slerp.
Recommening to use Quaternions, instead of Vector3 eulerAngles.