ich habe ein sehr ähnliches Problem wie der Ersteller deswegen wollte ich kein neues Thema eröffnen.
Es geht um die Hintergrundfarbe die sich nicht so ändert wie gewünscht.
Folgendes funktioniert mit open/close problemlos
Code: Alles auswählen
component: oh-label-cell
config:
title: =props.header
item: =props.item
icon: =props.icon
color: '=(items[props.item].state == "OPEN") ? "yellow" : "green"'
Code: Alles auswählen
component: oh-label-cell
config:
title: =props.header
item: =props.item
icon: =props.icon
color: '=(items[props.item].state == "ON") ? "yellow" : "green"'
Hier das gesamte Widget:
Code: Alles auswählen
uid: widget_tuer_fenster_offen
tags: []
props:
parameters:
- description: A text prop
label: Header
name: header
required: false
type: TEXT
- context: item
description: ON OFF
label: Item
name: item
required: true
type: TEXT
- context: icon
description: Icon eingeben
label: Icon
name: icon
required: false
type: TEXT
parameterGroups: []
timestamp: Sep 13, 2021, 6:13:42 PM
component: oh-label-cell
config:
title: =props.header
item: =props.item
icon: =props.icon
color: '=(items[props.item].state == "ON") ? "yellow" : "green"'