Dynamic Icons

has anyone experimented with dynamic icons? I want the Icon for CPU% to actually be a pie chart or gague showing that.

here is an example call to google charts that returns a 120x120 .png

http://chart.apis.google.com/chart?cht=p&chs=120x120&chd=t:80,20&chco=ff000d&chf=bg,s,FFFFFF|c,s,FFFFFF

by changing the two numbers in chd=t:80,20 you can get any result you want. I have also seen examples where someone actually saved 100 different icons and then just called them as something like pie80.png.

I would prefer the google chart version but I can not get it to display anything returned by the call.

does anybody know how to get this to work or have another option ?

The best you could do right now is to color the tile for certain CPU percent ranges or like you said above just make some images and call each image from the web for each value. I don’t think one option is better then the other though.

Not exactly what you are like looking for but can still give you tons of valuable visual info.

1 Like

the individual images are a better option than the color, which I am already doing. can I change the icon in the sendEvent at the same time I update the value ?

1 Like

You should be able to in the state. Open closed sensors do. You would just need to create an image for each state, maybe round them up or something.

1 Like