Oh-label-cell Condition based label and color

This changes the background colour of the cell:

component: oh-cell
config:
  on: =Number.parseFloat(items.Power_Watts.state) >= 500
  color: "=Number.parseFloat(items.Power_Watts.state) >= 500 ? 'red' : 'green'"
  action: url
  actionModal: widget:Webpage display widget
  actionModalConfig:
    title: TV Guide
    URL: https://www.yourtv.com.au/guide/nownext/
    height: "600"
  header: TV Guide
  title: TV Guide
  icon: f7:tv
  actionUrl: https://www.freeview.com.au/tv-guide
slots: null

NOTE: If you have a trend line item in the cell then the colour will not change.

1 Like