How to trigger a rule for a Harmony activity

I have a few rules running in OpenHab 1.8, but I can’t find a solution to the following issue.

If I put the following rule it works.

rule "Shut Media Blind"
Item HarmonyMActivity changed
logDebug(“Harmony”, “Activity”, HarmonyMActivity)
sendCommand(WindowCoveringStatus, OFF)

But I need the rule to only trigger for some activities, so I put the following, as well as several other options, but I can’t get the rule to trigger.

	Item HarmonyMActivity changed to "Waych TV"

From my items file, HarmonyMActivity is defined as follows.
String HarmonyMActivity “activity [%s]” (GP1) { harmonyhub="*[Media:currentActivity]" }

I can’t even find the value of HarmonyMActivity by doing a logDebug.

I also tried checking the value of HarmonyMActivity inside the then clause, but this did not work either.

Does anyone know the correct way to determine the triggered activity on the Harmony binding?

Try HarmonyMActivity.state ?

I think You can only do that kind of Trigger with Switches and Contacts (i.e. changed to ON, changed to OPEN).

You will need to put an if(HarmonyMActivity.state == "Waych TV") inside your rule.

I don’t use Harmony so can’t answer any of your other questions.

Thanks Rich, that worked.