Key Values on Command

I want to get the key values of an env_sun whenever a concommand is called. However, Entity:GetKeyValues() is partially broken (doesn’t always returns the correct value/the correct key), and I’m not sure when GAMEMODE:EntityKeyValues() is called (tried using hook.Call with it, no luck). Thoughts?

Wiki says that GM:EntityKeyValue() is called when an entity has a keyvalue set. Not sure why ENT:GetKeyValue() isn’t working though.