Refresh label from an item


I change the label from an item with this rule:

‘rule “eg_bz_thermostat_soll”
Item eg_bz_thermostat_ist changed
eg_bz_thermostat_soll.label = eg_bz_thermostat_ist.state.toString() + " °C IST Temp->Soll [%.0f °C]"

If I show the Basic UI in my browser, after start the rule the value from the item is changing immediately without refresh the page.
But the label string is not changing. The text from label is only changing, if I refresh the page.
Can I configrue OH2 so, that the label-field is also changing immediately or I trigger the label to changing it without refresh?
Thank you!

I have just done this. see my rule.

rule "update switch label"
        System started or 
        Item NL_SS_Switch_05_Label changed

    logInfo("Test","Setze Label auf: {}", transform("MAP", "", NL_SS_Switch_05_Label.state.toString))
    NL_SS_Switch_05_State.label = transform("MAP", "", NL_SS_Switch_05_Label.state.toString)


Fpr the refresh thing. i have never checked that, but i assume hat changing the label is no triggering reason for the UI

Yes, this is a nice idea but labels are not meant to be used this way, reason why the UI does not auto refresh

1 Like