Which Item are you trying to get the state of? The Item that triggered the rule?
triggeringItem.state
You’ve assembled some name from the triggeringItem.name, so maybe you are doing something like explained in the associated Items DP. If so, then take that string and do this…