Use "Image"-Item as Icon in sitemap

sitemap
items
Tags: #<Tag:0x00007fd3128cfb08> #<Tag:0x00007fd3128cf900>

(HoLiuS) #1

Dear community,

I’m quite new to the whole openhab topic and i’m stuck on a very specific topic related to icons.

I am using the “Weather Underground” binding to receiver weather information, this binding has a channel which provide the current “weather icon” (sun,cloud,fog,etc.) as an image:

Image  WeatherIcon "Icon"                  {channel="weatherunderground:weather:NNN:current#icon"}
Number Temperature "Temperature [%.1f °C]" {channel="weatherunderground:weather:NNN:current#temperature"}

Now I would like to use that “Image” as an “Icon” in the sitemap like this, which does not work:

Text item=Temperature label="Temperature" icon=WeatherIcon

Is anyone aware of a a way to accomplish this?

Thank you,
HoLiuS


(Lolodomo) #2

This is not possible.


(HoLiuS) #3

OK, thanks. Then I will have to use dynamic icons based on a string containing the weather conditions.


(Rich Koshak) #4

Shows how to download the icons and set up Rules to copy the icon returned by the icon field to a named dynamic icon which will then show up in your sitemap. I’ve run this way since writing that posting and it has worked great.


(HoLiuS) #5

I’m also experiencing odd values displayed by the original wunderground binding, I will try your approuch using the HTTP Binding


(Rich Koshak) #6

One word of warning, I think Wunderground has changed their JSON a bit. I’m getting periodic errors when I need to parse the forecast JSON. You might need to make adjustments.