At first, I’m afraid my English is a bit rusty.
I dont know if i post it in the rigth way. I have an idea.
I try to show the weather data in the UI and will post the correct weather icon(sun_clouds, sun…) for an String item with infomation like “Überwiegend Bewölkt -1.5 °C / 2.7 °C”, but i see no solution at the moment. My idea is that the “icon”-option can set by an additional Variable an other item for the dynamic part. So i can display the date “Überwiegend Bewölkt -1.5 °C / 2.7 °C” and the icon is related to a other item(“weather_cond_short”) with the dynamical data “sun”, “stormy” or “snow”…
The icon definition on the item can be fro example:
the reladed icon file for that ist for example:
“weather-sun.png” or “weather-snow.png”
Maybee other people haves the same problem like i and it would be an good solution if a function like that would implement in OH2.
It’s a good idea. It would be nice to have it implemented. Post an issue on GitHub as a request. Not sure if all providers return the same strings though. You could do this with your own icons though. I think you would just need some mapping.
Edit: That looks like what the CommonId and custom icons are used for here.
That’s what I was asking. The text string is one item and the condition is another. I don’t think you can display a dynamic icon for one item with another item (specifically it’s string). By the way, how exactly are you getting a string with the Day, Min, and Max in it? (I run wunderground so maybe this is possible with another provider)
That is referring to a Webview (html layout of weather). That makes a little more sense now… You’re able to do some manipulation there, whereas in a sitemap or item file you cannot. That wasn’t clear in your post.
My solution to the condition icon in a sitemap was to download the icons, convert them to svg, throw them in the icons/classic folder, then rename them all to have condition- as a prefix (condition-cloudy.svg). Download the map file. I changed mine to condition.map.
@awsnap: I will look for the solution for the weather binding. But i also will place a request for my idea in Github, but i don’t foind the rigth place. Can you post a link to the correct github-place i can post it?