Change tile background color from App or Driver?

Is there a simple way to change the background color of a tile based on an attribute value? I need three colors that would represent GREEN, YELLOW, RED based on two thresholds I have set in an App.

The thresholds are constant, and when the attribute value comes within the threshold, I would like it to change from GREEN to YELLOW or RED.

for example, I can set the thresholds at 100 and 200 in an App. If my attribute value is below 100, it would be GREEN, between 100 and 200, YELLOW, and then RED above 200

Simple way, no, complicated and/or hacky ways, yes. Is this just for your own use or for something that others are supposed to be able to use?

You could probably get Tile Master to do what you want:

To do it "manually", there are also ways, but none are "easy".

Thank you. This is for my own use and i am fully ok with complicated. I need to be able to drive this from a custom zigbee device value.

You could give Tile Master a go, if that doesn't cut it for you, come back and we can discuss some of the alternatives :slight_smile:

I think I would like to consider the alternatives. It looks like this thread you had posted on is close to what i need: Multi Color Dashboard Tile

Yes, if it's a custom driver you could set an attribute to that and just load that attribute instead of the number one. There are other ways as well, with stacking tiles, but that becomes a bit cumbersome as well.

i tried that example above by putting this into the sendTile()

        textTile = "<div style='color: red; height: 130%; background-color: green; position: absolute; left: 0; top: -30%; width: 100%;'>"
    textTile += "<div style='position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);'${textData}"
    textTile += "</div></div>"

but when i clicked on the sendTile() in the devices area,
image

it did this to my screen in the devices:

LOL, I think i am missing something basic :wink: