Updating a Sitemap Text Value with a Rule?[SOLVED]

I just tested this and it was properly refreshing the UI with the new value. I see you’ve edited your rule… maybe take it a bit further:

rule "VolumeUpDown"
when
    Item LG_TV0_VolDummy received command
then
    //LG_TV0_Toast.sendCommand(receivedCommand.toString)
    switch receivedCommand{
        case 0: LG_TV0_VolumeDown.sendCommand(ON)
        case 1: LG_TV0_VolumeUp.sendCommand(ON)
    }
    val vol = 100*(LG_TV0_Volume.state as DecimalType)
    LG_TV0_VolLevelDummy.postUpdate(vol)
    LG_TV0_Toast.sendCommand(vol)//LG_TV0_Volume.state.toString)
end

postUpdate requires the arguments to be strings, so you could also try postUpdate("LG_TV0_VolLevelDummy",vol.toString). I’m surprised your rule actually worked at all, but you said the item was updating. Did you notice any errors in the log? The postUpdate method is a little more forgiving. Here’s a good thread with more info:

1 Like