Map files

I recently discovered the .map files…
The problem I see is, that if there is a state which is not covered by the map file OH throws an error and displays nothing…

My first question is: is the a way to add some kind of a wildcard mapping? Like…

*=undefined

Is there a way to put an icon in there instead of plaintext? Is it possible to colorize the values in the (site)aps

thx & regards,
Dave

Hi Dave,

I do not know about wildcards, but you can use unicode symbols to spice up the map; see

For value specific colors maybe this helps out:
https://docs.openhab.org/configuration/sitemaps.html#label-and-value-colors

with kind regards,
Patrik

I don’t know if with cards work. I suspect not but it sounds like a good idea. Try it and if it doesn’t work file a feature request to add it.

As Patrik said, you can use Unicode to get symbols. For color, there is a color attribute you can set in the sitemap to change the color of the label based on the state of that it some other item.

I can’t check at the moment, but I have a faint memory that the example mappings for the weather binding would have a “mechanism” for unmatched translations. There’s a zip at the bottom of https://github.com/openhab/openhab1-addons/wiki/Weather-Binding that could maybe provide an answer.

Mikael

Thanks… It’s a start but actually I’m a design freak… I want the icons to be consistent (I’m using material UI icons)

Try it
I did but I ran out of ideas how…

I’m afraid not…
I tried:

unknown=Unbekannt

But it doesnd work

Not sue if you can get all you would like the sitemap UI´s; maybe you should consider habpanel.

You can also try to adjust basic ui a bit using CSS injection

However - none of those options will work for the apps. For me that´s not a big thing, as the web pages work well on mobile devices.

Just for completenes there are also options to use other UI like comet visu, imperihome, Rotini - but with none of them I´ve experience; for me a tweaked basic ui it is:slight_smile: .

with kind regards,
Patrik