Color based on switch state

Hi,
I have a switch and I would like to use the hero layout for it in the dashboard. so what I want is
change the colour to red when the switch is on.

When I go to style to pick a colour based on state, it doesn’t show me any state ( e.g on/ off) but rather operators like >, <, == etc.

So, I tried setting if “Switch == on” the colour should be red, but it is not working.

Am I missing anything here? any help would be appreciated.

Can you share a screenshot of how you have things configured and what the tile currently looks like? It sounds like you’re close.

Note that attribute values typically need to be entered as all lowercase in custom state mappings.

Thanks! Josh, You are correct. just needed the lowercase letter and it’s working like a charm. I absolutely love the Sharptools community. You guys are super responsive and helpful.

1 Like