Dynamic Icon for Color / Colorpicker

Hi,

I am struggling in finding a solution for following idea:

  • I am using a Color item and a Colorpicker Element in the Sitemap
  • I want a dynamic icon, which should reflect, if the item is on or off (basically I want to use the standard and nice color wheel when on and a self made (grey), when off)
  • My idea was, to switch the icon based on the brighness (>0).

I tried some experiements with mappings but struggled. Other idea was to do it over rules (where i know how to read the brightness, but i have no idea how so manipulate the icon from rules).

Same issue happened, when I mapped a switch Element to the color item.

Any ideas out there?

The icon chosen is based on the state of the Item. A Color item stores its state has a Hue, Saturation, Brightness triplet. I really don’t know if icons can support that but if it does I would try to use “colorlight-0,0,0.png” for the icon that shows it as off and “colorlight.png” for on to see if that works.

If not there may not be an easy way to do this. You might be able to use the visibility tag in some way.

Thanks for the reply and your idea. Issue there is (what I understand), that the state does not go to 0,0,0. It goes to X,Y,0 (where X and Y are the old values before switch off). Just the brightness goes to 0.

Regarding visibility I have not concrete idea, how I could use it.

Regarding visibilty I found an interresting apprach at Dynamic Icons to show battery status. Will try it.

Is there an update or has anyone come up with a better solution on dynamically updating “Colorpicker” icons in the meantime? The “battery status” workaround didn’t work for me… Thx!