OH4: Widget with Label including a Colon :

Hi All

I have searched and tested many options but can not find a working solution.

How can I use a : in a Label for a widget?

  - component: Label
    config:
      style:
        font-size: 12px
        white-space: nowrap
        position: absolute
        left: 83px
      text: ="COMM : " + items.item.state

Produces an error. Replacing ``:``` with anything else works.

Thanks
Mark

What about

text: ='"COMM : " + items.item.state'

No luck:

Nested mappings are not allowed in compact mappings at line 612, column 27:

                    text: ='"COMM : " + items.item.state'
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^…
                                      text: '= "Out: "+ @props.itemOut'

Works for me.

I have this in one of my cells.

  title: '="Gate closed: " +  Number.parseInt(items.gatecounter.state) + " times"'

The ’ are on the left of the equals sign

Correct, that was my mistake, sorry!!!

Thank you. Works perfectly… Thought I had tried that.