Raw type image on Label List Item

OH 5.0.2, Win 11

Hello,

I want to use picture generated by Local Weather binding:

on the Label List Item, to present actual forecast of the weather. I’m trying to do that by the field by Configure Item like following:

but unfortuntately something is wrong and the ico is not presented on the page.

How to do that correctly? Is it possible to realize my idea in this version of OH?

It is possible to place an image from an item in a widget. It is not possible to do it using the icon property or in any pre-made list widget component.

The oh-image component has an item property which does this automatically (set the item property to the name of your item and it will correctly display the image without you needing to do any other conversion). However, if you want this image to be in the media location of a list item, then you are going to have to build that list item yourself.

Any prompt how to do that please …. :slight_smile:

It used to be the case that you could kind of make this work by writing the image out to $OH_CONF/icons/classic. That should make it available as an OH icon, right? I used to do that with Wunderground on my sitemap.

That might be an approach that might work. In 5.1 M3 there is now HTTP Actions to pull images. Or one could theoretically parse the Base64 back to binary and save the file.

That’s a good point. As far as I know this is still a perfectly valid option. And is probably easier in many ways than building the item from scratch.

I would consider this to actually be a pretty advanced widget build. It’s going to take a lot of work to get it to match the style of the other list items. That’s because, in this case, you can’t even do this with an oh-list-item (i’m pretty sure), so you’ll have to fall back to an f7-list-item which means, both understanding the different slots in the f7-list-item and which style would need to be adjusted to match the oh-list-items (only a few, if I recall).

I’m still working on a tutorial to help with some of these advanced topics, but the short version is: if you look at the f7-list-item docs

You will see that many of the properties are the same (e.g., title, subtitle, etc.). There is no property for image, however, so you will need to add a media slot to the f7-list-item and put an oh-image component in that media slot (and set media-item to true in the list item).

Hohohohoh :face_with_spiral_eyes: Too advanced for me. I think I’ll pass and wait… maybe in the next version of OH, there will be such a possibility…