How to define a rule which changes the value of a string?

Hi @ all,
maybe someone can help?
I’m still on openhab 2.5 and i want to create a rule which changes the value of a string.
(or if someone has another solution)

I have a Sony Android TV and installed the Sony Binding.
I need to send a IR Remote control via Sony IRCC interface by network.
The Sony Binding has a string and i need to change the string to “AAAAAgAAAJcAAAAZAw==”
Thats the pause button.

A item sony_pause should switch pause on and off (so if i watch netflix or any HDMI CEC device i can pause by alexa)
I createt a item as a switch and alexa can turn on and off the switch. But i need to create the rule which changes the string.

The String is:

“String IRCC_Command “Command [%s]” { channel=“sony:ircc:home:primary#command” }”

The Binding info page:

At the moment it looks like that:
rule “sony_pause”
Item sony_pause received update “ON”
if(receivedCommand == ON) IRCC_Command(“AAAAAgAAAJcAAAAZAw==”)

The logfile output:
15:42:12.507 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘sony_pause’ received command ON
15:42:12.507 [INFO ] [smarthome.event.ItemStateChangedEvent] - sony_pause changed from OFF to ON
15:42:12.523 [ERROR] [untime.internal.engine.RuleEngineImpl] - Rule ‘sony_pause’: The name ‘receivedCommand’ cannot be resolved to an item or type; line 5, column 6, length 15

You are triggering on an update but

but are trying to see what the value of a command is. But no command actually happened, so receivedCommand doesn’t exist!

See if the table on this page helps:

or this section of the Rules doc:

Thank you for your help - got it working now:

rule "sony_pause_ON"
    Item sony_pause received command ON

rule "sony_pause_OFF"
    Item sony_pause received command OFF