Material Design Icons

I have been looking at Home Assistant lately and was attracted to their use of material design icons. This is a superset of Google’s icons and is regularly extended.

Has anyone considered using this icon set for Basic UI? Would it be possible to use the font Version? Or should we stick to svg and png files?

These icons could then be used in different colored styles.

Just curious about others’ opinions.

https://www.materialdesignicons.com/

The icon set from your link already contains svg files:

https://github.com/Templarian/MaterialDesign/tree/master/icons/svg

The only challenge would be to map ESH Classic Icon Set to these :wink:

I wonder if we could just create an /icons/material/ folder and configure BasicUI to use that folder instead of /icons/classic :thinking:

2 Likes

If I’m correct, the current iOS app is only able to use PNG files so one should always need to convert first.

Just creating a set in the icons/classic would do for now, but it would indeed be awesome if you could configure UI’s to use a different icon set.

Anyone up to the challenge?

BTW, I have already started developing a smart python script to generate my own set as a proof of concept. When it is working I will upload it to a repo for sharing.

Definitely not. This is why we have the concept of icon sets - we should have an additional icon set under smarthome/extensions/ui/iconset at master · eclipse-archived/smarthome · GitHub; such an icon set comes as an OSGi bundle, which packages everything, so that it can be easily installed, updated, etc. The structure can be copied from the classic icon set, this should be no big deal.

Ideally, you would do it the same way as it is done for the Classic icon set: There is a copy script and a convert script available.

Best if you directly create it as a PR (if the license is clear and compatible with EPL you can do that against ESH, otherwise we would better put it in https://github.com/openhab/openhab2-addons/tree/master/addons/ui).

@Kai That’s some food for thought!

The current material design icons set does not yet have substitutes for all available classic icons. Would there be a minimal set to include for the PR to be accepted?

This isn’t yet anywhere clearly documented, but the minimal expected set is mainly the list of defined channel categories, which you can find here: https://www.eclipse.org/smarthome/documentation/development/bindings/thing-definition.html#channel-categories

So, can I have multiple icon sets installed? And if so, which one gets priority if I ask for an icon name that is available in both?

Yes, you can have multiple installed.

You can define the default to be used by setting

org.eclipse.smarthome.iconset:default=classic

in your runtime.cfg.
The UIs can in theory chose the icon set by adding an iconset url parameter when requesting an icon, but as far as I know, this hasn’t yet been implemented in any of the UIs - but it should be rather straight-forward.

The current complete icon set covers 1900 icons. The naming convention uses a lot of dashes as separators, which is used for state in openHAB.

I don’t think we’ll be able to copy and use the set 1 by one. I will create a mapping table in the openHAB repo ( forum doesn’t support tables). We can always move to ESH later.

1 Like

FYI I shared the Material-Classic mapping in the link below.

How can i install the material icons set as an additional icon set for openhab?
Can anybody write a simple how to?

2 Likes