I work with openHAB 4.1.1 and have the following widget
which is based on this code.
yamal code
config:
label: Z-Wave
sidebar: true
blocks:
- component: oh-block
config: {}
slots:
default:
- component: oh-grid-row
config: {}
slots:
default:
- component: oh-grid-col
config: {}
slots:
default:
- component: oh-list-card
config:
title: Z-Wave Status
slots:
default:
- component: oh-repeater
config:
for: equipmentItem
sourceType: itemsWithTags
itemTags: Blinds
fetchMetadata: semantics
slots:
default:
- component: oh-repeater
config:
for: locationItem
sourceType: itemsInGroup
groupItem: gZWaveStatus
fetchMetadata: semantics
filter: loop.equipmentItem.name ==
loop.locationItem.metadata.semantics.config.isPointOf
slots:
default:
- component: oh-list-item
config:
badge: "=(items[loop.locationItem.name].displayState === undefined) ?
loop.locationItem.state :
items[loop.locationItem.name].displ\
ayState"
badgeColor: '=(loop.locationItem.state == "Alive") ? "green" :
(loop.locationItem.state ==
"Asleep") ? "orange" : "red"'
icon: oh:z_wave
item: =loop.locationItem.name
title: '=loop.equipmentItem.metadata.semantics.config.hasLocation.replace ("Kue", "Kü") + " Rolladen
Schalter"'
footer: =loop.locationItem.label
- component: oh-grid-row
config: {}
slots:
default:
- component: oh-grid-col
config: {}
slots:
default:
- component: oh-list-card
config:
title:
slots:
default:
- component: oh-repeater
config:
for: equipmentItem
sourceType: itemsWithTags
itemTags: RadiatorControl
fetchMetadata: semantics
slots:
default:
- component: oh-repeater
config:
for: locationItem
sourceType: itemsInGroup
groupItem: gZWaveStatus
fetchMetadata: semantics
filter: loop.equipmentItem.name ==
loop.locationItem.metadata.semantics.config.isPointOf
slots:
default:
- component: oh-list-item
config:
badge: "=(items[loop.locationItem.name].displayState === undefined) ?
loop.locationItem.state :
items[loop.locationItem.name].displ\
ayState"
badgeColor: '=(loop.locationItem.state == "Alive") ? "green" :
(loop.locationItem.state ==
"Asleep") ? "orange" : "red"'
icon: oh:z_wave
item: =loop.locationItem.name
title: '=loop.equipmentItem.metadata.semantics.config.hasLocation.replace ("Kue", "Kü") + " Heizkörperthermostat"'
footer: =loop.locationItem.label
- component: oh-grid-row
config: {}
slots:
default:
- component: oh-grid-col
config: {}
slots:
default:
- component: oh-list-card
config:
title:
slots:
default:
- component: oh-repeater
config:
for: equipmentItem
sourceType: itemsWithTags
itemTags: Equipment
fetchMetadata: semantics
slots:
default:
- component: oh-repeater
config:
for: locationItem
sourceType: itemsInGroup
groupItem: gZWaveStatus
fetchMetadata: semantics
filter: loop.equipmentItem.name ==
loop.locationItem.metadata.semantics.config.isPointOf
slots:
default:
- component: oh-list-item
config:
badge: "=(items[loop.locationItem.name].displayState === undefined) ?
loop.locationItem.state :
items[loop.locationItem.name].displ\
ayState"
badgeColor: '=(loop.locationItem.state == "Alive") ? "green" :
(loop.locationItem.state ==
"Asleep") ? "orange" : "red"'
icon: oh:z_wave
item: =loop.locationItem.name
title: =loop.equipmentItem.metadata.semantics.config.hasLocation + " Sensor"
footer: =loop.locationItem.label
masonry: null
grid: []
canvas: []
As you can see I made a separate oh-list-card for each equipment (itemTags in oh-repeater) type.
Of course it would be great if I could put them all in one oh-list-card.
Unfortunately I am a bit lost here.
Several entries in itemTags of oh-repeater behave like an AND so I don’t know what to do here.