Widget Background Color multiple Item state

(Oliver Schnaus) #1

Good morning,
I have an item with multiple stati, and would like a different background color for each status.
for example:
Status1 = blue
Status2 = green
Status3 = red
How can I solve this? Does anyone have an idea or solution for me?

Greetings Oliver

(david) #2

(Oliver Schnaus) #3

Hello, that’s clear, but I have 3 states of the item.
How do I proceed if each state is to have a different color?

(Oliver Schnaus) #4

OK, i use this:
‘background-color’: itemValue(‘item’)==‘ON’ ? ‘color1’ : ‘color2’

and that works
regards Oliver