How can I check the states connected to an entity?

For example I would like to write a script which waits until my TV turns on. I know that I have to use a “Wait Template” but I don’t know the name and accepted values of the state. How can I check this for any entity?

Developer tools → Entities. Turn on the TV and refresh.


Thank you!