Skip to content

YamlSlots

olialb edited this page Jun 15, 2026 · 2 revisions

Slot classes

Slot class ohItem

The main slot class is ohItem which reference one or more items in openHAB and has different attributes depending on the slot type. The following tables show the attributes which are in common for all slot types.

Slot attribute default value optional / Mandetory Description
type - M The slot type itself. All type names and additonal specific attributes are listed in the next section
item - M openHAB item name shown in the slot
text openHAB item label O Text label shown for the item. If its not defined, the label of the openHAB item is used instead. For card type CardGrid it can be useful to show the item state instead of a text or item label. If you want this, set text attribute to =itemState
icon default icon from skin.json O see how to reference icons
iconColor default icon color from skin.json O see how to reference icon colors
speed 0 O controlls the animation speed for the slot (used in card type cardPower). Values between -120 and +120 are supported.
options options list from referenced openHAB item O Defines an options list loke in openHAB: TUNER=Radio,PHONO=Plattenspieler,AV2=vu2+
popupType O standard popup If the HMI supports alternative popups for a slot type. You can switch to the alternative popup with this optional attribute. More details in the slottypes which support this feature.

Reference icons

Icons are encoded as unicode characters. You find all possible icon unicodes on the page Material Icons. You can reference the icons in the yaml files over the unicode or the associated name in this page:

Examples:

icon: ab-testing     #By name
icon: "\uE1C8"       #As character
icon: \ue1c8         #As hex value

You can also define icons dependant on the openHAB item state:

Examples:

icon: ON=lightbulb-on-outline,OFF=lightbulb-outline
icon: CLOSED=window-closed,OPEN=window-open

Reference icon colors

You can reference the icon colors in the yaml files with a webcolor name or with an hex value:

Examples:

iconColor: white    #By name
iconColor: #FFFFFF  #As character

You can also define icon colors dependant on the openHAB item state:

Examples:

iconColor: ON=yellow,OFF=grey
iconColor: CLOSED=grey,OPEN=blue

Slot class navigate

The slot class navigate alows the navigation between cards and card groups. It use the following additional attributes:

Slot attribute default value optional / Mandetory Description
navTo - M Navigation link. See Navigation links

Example:

    ...
    slots:
     - class: navigate
       text: Lampen  #Text shown for the link
       icon: menu-open #default icon for a nav slot
       iconColor: blue
       navTo: home/light    #Move tor card light in group home

In cardEntities: image

In cardGrid: image

Navigation links

A navigation link is organized like a pathname in file system.

Examles:

Navigation link Description
groupname/cardname Navigate to group 'groupname' and card 'cardname'
./cardname Navigate tp card 'cardname' in current group
groupname/. Navigate to first card in group with name 'groupname' or to the card with the panel name in current group, if it exists.
./. or . Navigate to first card in current group or to the card with the panel name in current group, if it exists.

Clone this wiki locally