Visibility for Player states

In OH1 I had the following entry in the sitemap:
Text item=kodi_player_type visibility=[kodi_player_state!="Stop"]
So the player type was only displayed if something was actually playing on Kodi.

In OH2, I now use Player. How can I access the Player states from the sitemap?
visibility=[kodi_player.state!=“Stop”]
doesn’t work, that’s the only thing I found out :nerd:

Apparently you can use player directly:
visibility=[kodi_player!="PAUSE"]

Only difference is that it’s on PAUSE, not on stop and it’s uppercase. Seems to work.

Thats fine providing you dont want a trigger off of pause - I do!

Not sure i understand. What are you trying to achieve?

I have a light dimming rule on kodi.play, a rule that triggers on kodi.pause for different light configuration and things go back to what they were on a kodi.stop

I do this via the 1.x binding - I dont think I can get the same thing with the 2 binding - I dont think you can get the stop channel state - the switch seems to be momentary rather than toggle

OK. Will check when i get home. Have something similar, pause and stop trigger different light settings. I’m using the OH2 binding and it still works.

wow that be awesome to work out - lots of similar questions in other threads

So sorry for getting your hopes up :unamused:
I’m currently running two openhab installations in parallel and it seems I haven’t migrated this rule to OH2 yet, that’s the only reason it is still running.
You are right, we are really missing the “STOP” state to distinguish between playing, pause and stop.

I will still try to migrate the rule somehow. I hope there’s something I can do with type and title. Judging from the logs, type and title are still set when on PAUSE. When stopping a movie, these two revert to null.

If that assumption is true, it should be possible to rewrite the rules.

Played around with type and title, but it doesn’t really work for me either :frowning:
So currently, I have no way of migrating these rules to OH2.

Is there an open feature request for that? Where can I vote :wink:

you can still use the 1.x xbmc addon that still works well

True, that’s good to know. But I still think this should be possible in OH2 somehow.
Not sure if this should be added to Player or if that’s something in the Kodi addon.