I have the follow YAML Script for a oh-cell
component: oh-cell
config:
action: toggle
color: '=(items.HuewhiteWohnen_Helligkeit.state >= 20) ? "yellow" : "white"'
label: '=(items.HuewhiteWohnen_Helligkeit.state >= 20) ? "Kugel Licht Ein" :
"Kugel Licht Ausgeschaltet"'
header: Beleuchtung
icon: oh:licht
item: HuewhiteWohnen_Helligkeit
on: true
actionItem: HuewhiteWohnen_Helligkeit
actionCommand: "100"
actionCommandAlt: "0"
subtitle: Kugel Cheminée
stateStyle:
fontSize: 20px
For Color, I have chosen the color Yellow.
Which colors are available?
Is there a list with all color they are possible?
I would like to take the color gold.
Hi Marcel,
I tried this with oh-cell too (arbitrary colors), without success.
My workaround was using a labeled item:
- component: oh-label-cell
config:
icon: oh:fan
title: Lüftung
trendItem: SystemAir_REG_SENSOR_RPM_SAF
item: SystemAir_REG_SENSOR_RPM_SAF
action: navigate
actionPage: page:page_lueftung
expandable: false
footer: ="Filterwechsel in " +
Math.floor(items.SystemAir_Filterwechsel_Tage.state) + "
Tage"
style:
background: "=(items.SystemAir_Sammelalarm.state == 0) ? 'rgba(0,255,0,0.4)' :
'rgba(255,0,0,0.4)'"
Also it needs to have a trending item set to take the rgba values.
I don know why style: doesn’t work with oh-cell
Cheers
Marco
JustinG
(JustinG)
3
Many of the widgets and components use the default f7 color list
1 Like
Hi Justin
Many thanks for your answer. For the future it will be heplful, if we have more color for a beautiful UI.
Happy New Year
Marcel
1 Like