I can't find on any good source (such as a textbook) a precise specification about the cases when Hund's rules (especially Hund's third rule) for an electronic configuration of atom are valid (the rules help to select the lowest energy state of a configuration).
As far as I understood:
Hund’s rules only apply to the lowest energy state of an electronic configuration, for cases where there is only one incomplete subshell.
In fact if I consider the configuration $1s^2 2s^2 2p^3$ (nitrogen), Hund's (third) rule does not work for excited states with $S=1/2$ (I refer to NIST data here: https://physics.nist.gov/PhysRefData/Handbook/Tables/nitrogentable5.htm)
That's because it is not the lowest energy state for that configuration, even if there is only one incomplete subshell.
But also if I consider the configuration $1s 2p$ (excited helium) with $S=1$, Hund's (third) rule does not work (I refer to NIST data here: https://physics.nist.gov/PhysRefData/Handbook/Tables/heliumtable5.htm)
That's because, even if I consider the lowest energy state for that configuration ($1s 2p$) there are two incomplete subshell, so I don't even know how to use Hund third rule in cases like this one.
So is my previous statement correct? Also, can you suggest any textbook/source that gives an answer to this?