TV Remote Sitemap and Rules

I’m new to OH and working with OH2. I’m fumbling a little but, get getting things to work. I’ve added an “unofficial” binding for LG WebOStv Binding which works well. I’m trying to make a more user friendly sitemap. In particular, for the volume UP/Down.

in my sitemap I have this:

Switch item=LG_TV0_VolumeUp label="Volume Up/Down" mappings=[1="UP", 0="DOWN"]
rule "VolumeUpDown"
when Item LG_TV0_VolumeUp received command
then
    switch receivedCommand{
        case 0: LG_TV0_VolumeDown.send(ON)
        case 1: LG_TV0_VolumeUp.send(ON)
    }
    //For Debugging To Display Message on TV
    //LG_TV0_Toast.sendCommand(receivedCommand.toString)
end

This doesn’t seem to work and I’m not sure how to diagnose it.
Lastly, Is there a better layout/design or way to control TV functions?

You might find it easier to use tge volume as a dimmer item, that way it is a slider. Sorry, cant be of more help with other things

I am new around here, so this may be a stupid reply…

But your “dummy” switch is LG_TV0_VolumeUp… and the TV is also linked to LG_TV0_VolumeUp?
Isn’t that a recursive command? When it gets a volume up command, it’s going to send the same volume up command to itself?

That sounds about right. Thanks for pointing that out! That might explain some of the weird behavior. It’s getting that event twice.

I need to make an actual “dummy” switch and connect that event to a rule…A new thing for me to learn!

Is there a sitemap item that can handle a “press-and-hold” so the user doesn’t have to continuously press the volume up and volume down button?