Hi,
I Am creating a template which hosts a static image as well as some OH items.
The items are displaying correctly, but I cannot get the image url to load…
itemState(itemname) (formerly itemValue) returns “N/A” either when the item name is null or invalid, or when no item was found with that name, so you should check for those - maybe the name of the item you configure is to blame, like you didn’t specify any in your config or it has invalid characters, but if it’s not, then I’m out of ideas.
Edit: the default value you specified (rose.jpg) is invalid, item configs hold the name of the item (as a string).
@marklavercombe - you probably don’t want/need to use items and a rule in order to configure your widgets titles and icon filenames of your widgets. I imagine you can replace the config items in your widget with two text configs (one for title, one for filename of the image) which would allow you to get rid of the rules as reduce the amount of items in your system.
Thanks @danielwalters86.
I tried that but kept getting N/A instead of the string for the image file and it wouldn’t show.
Can you show me how that might work because I’d love to simplify things!
Cheers