Items and StateDescriptions in Main UI Cards

Hello,
i am trying to add values of items into the subtitle and footer lines of cards.

Adding a simple item value works fine with…

=items.HM_WZ_Heizung_ActProfile.state

… but:

  1. I dont know how to add additional text to the line (before and/or after the item value). I tried different ways, but when i add text the item value isnt shown anymore.
  2. The named item is a number. I mapped a description to the values with meta data stateDescription, but the description is not shown - just the number.
    grafik
1 Like

Question 2 i could already solve by myself: With .displayState`the stateDescription is shown.

But i still stuck with question 1.

You can concatenate Texts like this: „Text“ + youritem + „textagain“

Hope this helps?

Mm

Thank you, but this i tried already without success:

"Text" + =items.HM_WZ_Heizung_Humidity.state + "Text"
"Text" + items.HM_WZ_Heizung_Humidity.state + "Text"
"Text" + HM_WZ_Heizung_Humidity.state + "Text"

grafik

try
=“Text” + items.HM_WZ_Heizung_Humidity.state + “Text”

Thanks, but:
grafik

I finally got it:

= "Luftfeuchtigkeit " + items.HM_WZ_Heizung_Humidity.displayState

grafik

C1F61A78-0A59-44FB-9DEC-895A6D6800C4_4_5005_c

Just found out that Text can also contain emoji - how cool is that?