UI 3 Toggle card: description from Item

When adding a toggle card for example, to turn on and off an Item, is it possible to use the description already included on the item, instead of writing a new one?
I have the items defined like this:

Switch    infor_impressora_escritorio                 "Impressora Escritório"        (All, infor_grp_desligar_noite_1)                            {channel="zwave:device:926c4edb:node8:switch_binary"}

Is any field missing?


Short answer: Not really, no.

Long answer: In widget definitions there is an items object that has access to the state and (if it is different than the state) the modified displayState. There is no access to an item’s label. If you are willing to build a custom widget there are some awkward workarounds that can get you access to a more complete object which carries all the information about an item that is returned by a call to the API. This includes the item label. Creating an entire widget just to avoid hard coding a label, however, seems like overkill.

It always depends on the amount of items and the laziness of the programmer… :slight_smile: