WTH Use entity attributes for conditions (e.g. visibility)

Without making a template sensor of an attribute, It’s not possible to use entity attributes for conditions in the UI for e.g. visibility of badges on dashboard.

I would love to change the badge icon color based on the sensor state. For instance, if the temperature is above 22 Celsius, the icon color changes to red, else if below 22 Celsius, color is blue