Chromecast rule question

Maybe it’s a more question about rules in general

This is working:

if (E1chromecast_appId.state == "CA5E8412") {
    sendCommand(E1chromecast_control, PAUSE)  }

And this is not working:

if (E1chromecast_appId.state == "CA5E8412" && E1chromecast_control.state == "PLAY") {
sendCommand(E1chromecast_control, PAUSE) 

I think the question is, How can i find the correct state (name) of E1chromecast_control.state

Is it PLAY or PLAYING or somthing else?

Openhab 2.2 end chromecast binding 2.2
I trigger the rule with a xiaomi switch

Remove the quote.

if (E1chromecast_appId.state == "CA5E8412" && E1chromecast_control.state == PLAY) {

You can compare a string against another string, if that’s the case, you can also do this

if (E1chromecast_appId.state == "CA5E8412" && E1chromecast_control.state.toString == "PLAY") {

Thanks luckymallari,

Removing the quotation marks is the trick.