Dibbler42
(Thomas Bail)
1
I started just learing to assemble my own widget.
At the moment i am struggeling in concatenating different states. A simple + between states does not work.
- component: oh-list-item
config:
title: Düngung
after: =items[loop.plant_prefix+"_Conductivity"].displayState || items[loop.plant_prefix+"_Conductivity"].state + "Some String" + iems[loop.plant_prefix+"_MinConductivity"].displayState || items[loop.plant_prefix+"_MinConductivity"].state
icon: oh:weather_pollen
- component: oh-list-item
Does not work. Any hints?
RGroll
(Rainer)
2
Try:
after: =(items[loop.plant_prefix+"_Conductivity"].displayState || items[loop.plant_prefix+"_Conductivity"].state) + "Some String" + (items[loop.plant_prefix+"_MinConductivity"].displayState || items[loop.plant_prefix+"_MinConductivity"].state)
You need to enclose the different OR expressions in brackets and there was a small typo in your 2nd expression (missing e
in items
)
Dibbler42
(Thomas Bail)
3
Thanks, the brackets are the trick.