There is one extra piece that you have to add to the oh-repeater
. You’ll note that to make the API call you had to specify the metadata namespace you wanted returned. The API cannot just return all metadata to with an item. So, for the repeater, you also have to specify this namespace using fetchMetadata
so it can pas that along to the api call. For your example then you just have to add the one line:
- component: oh-repeater
config:
for: item
sourceType: itemsInGroup
groupItem: Home_Licht
fragment: true
fetchMetadata: altTitle
Also, you don’t have to use “1.0” as a key for the metadata, that’s just what my example item uses as part of one of my automation systems because that corresponds to one of it’s potential states. You can use whatever you wish that make more sense (and also avoids the awkward ["1.0"]
as part of the object call. For instance, if you just used:
value: " "
config:
title: Wohnzimmer
Then your widget call would be:
loop.item.metadata.altTitle.config.title
which is a little more readable.