Adding driver to Normal Node in shader editor

I’m trying to add simple drivers to Normal node ball in Shader Editor. Sun Light rotation should control it’s rotation. Suns X Rot controls normals Y, Suns Y controls normals X, and Z for Z. But I’m not getting what I want at all. Besides ball being movable sometimes, and results changing for same inputs every 5 minutes for some reason. I can’t even get it to do full rotation.

I want ball to be facing forward (fully white) when rotation is 0, and facing backwards (fully black) when rotation is 180. It works for values up until 90. But then it just stays in the middle and only moves in extremelly small increments. Even raising value to thouthands doesn’t do anything.

What is up?

If there is a way to get the same result without using Normal node I’d like that more

If you’re just interested in the dot-product then you can just use a dot product node:

Good luck!

No I am doing procedural day/night sky, but already found the solution. Vector rotate after Normal node on euler rotation. It exposes XYZ as numbers and is easier to add drivers to, doesn’t have same bugs.