Use of colored dynamic icons within Habpanel

Hi,

I am trying to make use of coloured dynamic icons from within habpanel.

I am using the door icon to show the state of the door. The icon is dynamic and is displayed either as opened or closed door (in the icon) correctly.

However, what I need is a more prominent indication of the open door. I therefore would like to show openend doors as red.

I have downloaded the SVG door icons (door-opened.svg and door-closed.svg) and modified the SVG file to show a red door in the open case instead. I put the icons into the /etc/openhab2-conf/icons folder.

However, this does not have any effect. Still the original icon (without color modifications) is shown.

Are modified icons not supported by habpanel?

Thanks a lot, Torsten

With dynamic icons, you always need a third icon without the state.

In your case, you need:

door-opened.svg
door-closed.svg
door.svg

As the door.svg icon doesn’t get used in your case, you could just copy and rename one of the other ones.

1 Like

See the dynamic icons docs; the target folder is …/classic/icons

You’ll want a different base filename for your icon set from the standard icons e.g mydoor-opened.svg

You must have a default icon in your set e.g. mydoor.svg, or it simply doesn’t work.
(I often use a ! or ? mark image to highlight unexpectedly broke items, this is the one you will see if Item is NuLL)

1 Like

Thanks a lot, applying those tips worked for me!