There is no way I know to get the state from /proc or anywhere else. sd-idle-2.6 looks at /proc/diskstats to discover change of state (ie as activity by change of counts) but not current state.
Just run the above script periodically (more often than messages rolls over) and maintain state yourself. Once you have gotten state, any further "unknown" states would imply that the state has not changed since any state change would add a message.
Alternatively, the source code was provided with the program. Feel free to modify it for your special requirements.
Out of curiosity, I now ask what do you want to do with this information?