I’d like different icon/text-colors depending on whether the button is clicked or not.
Must have something to do with: iconColor: ‘=(openWBVerbindung_openWB_LP1_lademodus.state === “0”) ? “blue” :
“grey”’
I tried “==” instead of “===” and also without “.state” but neither worked. Probably quite simple, but since I’m rather new to this, I don’t find the solution …
- component: oh-button
config:
class:
- margin
- display-flex
- flex-direction-column
action: command
actionItem: openWBVerbindung_openWB_LP1_lademodus
actionCommand: ="0"
icon-f7: arrow_2_circlepath
iconColor: '=(openWBVerbindung_openWB_LP1_lademodus.state === "0") ? "blue" :
"grey"'
text: Sofortladen
textColor: '=(openWBVerbindung_openWB_LP1_lademodus.state === "0") ? "blue" :
"gray"'