Valuecolor in semantic model

Hello, how can I change valuecolor in semantic model?
for example first item. I tried to add metadata, but it not work…

If you are asking how to change how that first Item appears in the automatically created UI widgets, you can do so by editing the Custom List Widget on the Item.

I tried. i added to metadata, but it doesn’t work…

Here? Default standalone widget?

I have the same question. In BasicUI there was the parameter valuecolor that you could use to e.g. display sub-zero temperatures in blue and above zero in red.
I would love the same for the label - list view so that I can visually spot e.g. if there are any windows open.

No, like I said, the default list widget.

sorry) I’ve seen list widget, it’s no colors or styles…

In these cases - it’s a little more complicated - what you want to do is override the following property from: CSS Variables Reference | Framework7 Documentation


from the default gray to the result of an expression. You can override other variables too as you see fit.

You can only do it in YAML. So in your metadata editor for the “Default List Item Widget”.

  • @11148 in the Code view set it to something like:
value: " "
    --f7-list-item-after-text-color: "=(Number.parseFloat(items.ZW074Sensor_Temperature.state.split(' ')[0]) < 20) ? 'blue' : 'red'"
    --f7-list-item-after-font-weight: bold

(replace ZW074Sensor_Temperature with your item, unfortunately you can’t get it from the config currently :confused:)

Go back to the Config tab to see how it looks:

  • @s0170071 assuming the “real” states of your items are OPEN and CLOSED:
value: " "
    --f7-list-item-after-text-color: "=items.EG_WC_Fenster.state === 'OPEN' ? 'red' : 'green'"
    --f7-list-item-after-font-weight: "=items.EG_WC_Fenster.state === 'OPEN' ? 'bold' : 'normal'"
1 Like

thank you it works

Very nice, but unfortunately not working for me. No matter what state of the item, the color is always green and the font weight is always normal. Can you tell me where i’am wrong, please?

value: " "
--f7-list-item-after-text-color: "=items.InnogyHeizungFitnessraum_NiedrigerBatteriestatus.state === 'ON' ? 'red' : 'green'"
--f7-list-item-after-font-weight: "=items.InnogyHeizungFitnessraum_NiedrigerBatteriestatus === 'ON' ? 'bold' : 'normal'"

i dont see a problem… may be browser cache? or item state? may be state of item “on” not “ON”?

and You dont have indent after config:

The state of the item is “ON” or "OFF. My state description (OFF= Batterie OK
ON= Batterie austauschen!) on the default widget is working. But i have noticed that when i enter the code it looks like:

And when i open the code tab again, it looks like this:

Is that normal?