OH:icons maintaining

Somehow I would like to contribute some icons to the OH:Icons library, but I don’t find where to do it on github.

Can anybody give me a hint in which part of the project they belong?

Exactly it is not even much, but the on/off icon from widgets section can only be used for Channel/Widgets, but not for Things…
Or in other words, if I have a switch in OH, where I turn something on and off (e.g. an output coil of an PLC) I can use the switch item to represent it’s state, but if it is something that reports it’s state (e.g. an input coil of an PLC) then the switch icon is not aviable and I have to use something from things like the open and closed door.
So I added to my individual classic items folder a switch2-closed and switch2-open file, to have that icon also aviable for input type things. But that’s tbh not the right way to do it in an open project.

Hi, I think this should be the path :

Show what you are doing because it’s not clear.

You can use any of the built in icons anywhere where an icon can be used.

But it looks like your problem is using the switch icon with a Contact Item. To a large extent that’s deliberate.

There are a number of ways to work with this:

  1. don’t use a Contact Item, use a Switch Item. You can set a Switch Item to be read only in the State Description Metadata, though that’s mostly just a hint to MainUI. If you are using sitemaps that is ignored. If you’ve defined the Channel yourself (MQTT, HTTP, etc.) just change the type of the Item. If not, use a transform profile to map OPEN/CLOSED to ON/OFF.

  2. If you are using MainUI, you can use an expression to choose any icon you want based on the state of the Item. See Creating Personal Widgets | openHAB or one of the many examples on the marketplace.

  3. add your own custom icons as you’ve done

I’m not sure adding these icons to the official distro would be accepted. And to be honest, with the introduction of support for Material, F7, and iconify icons, I’m not sure there is a lot of apatite to add duplicates of existing icons that work with a different Item type. But it doesn’t hurt to try.

Thank you, I will try

Thank you rlkoshak.

Yes those are all options.

Option 1 I considered to be “wrong”, from a semantic way, as a input is a “contact” and an output is an switch or coil, at least in my world… Yes obviously an read only switch somehow also is a input / a contact.
The mapping idea I should try as a suitable workaround, cause the “contact” stays a contact, just representing it’s state with the names ON and OFF, instead of OPEN and CLOSe… This especially sounds apealing as it is not even sure in all cases, that OPEN equals ON and CLOSED equals OFF, It could be the exact other way round, depending on the “physical type of contact [NO / NC]”. This would somehow represent it… A OPEN contact respresenting the state of OFF, could work in “my semantics”.
Option 2 how to say, I don’t really understand / investigated enough and creating a widget just because I want to represent the state of something with the green or red ON Switch symbol, doesn’t feellike the way I want to go.
Option 3 I did :slight_smile: and am generally happy with it, but copying this personalified items to every installation of OH I do sounds also somehow strange.

So I try to get it into the distro, should not be that difficult unless someone has the drive to explain, why the on / off switch symbol a circle with an I in it,in red / green is inappropriate to represent an on / off state and cannot be differentiaten then from an switch that changes the state… So in “owrst case” in my opinion the outcome is a symbol set for contacts with a green I and a red O to indicate a state.

:slight_smile:

When ever the default isn’t what you want, creating a custom widget is always the way to go. Simple widgets need not get that complex and you have way more flexibility. The defaults are never going to server your needs in every case.

Most people have one instance. A rare few have two. This is home automation, not an industrial automation service.

If you are worried about backup and restore, the icons will be part of the backup taken by openhab-cli backup and restored along with the rest of your configs.

It’s worth a try but don’t be disappointed if the PR is rejected. OH offers ample ways to customize icons right now, the built in icons are to some extent mostly there for legacy support now that sitemaps support the other icon providers, and these icons have remained largely unchanged since OH 2.0.

When using any of the other icon sources, you get to choose what color they show.