If the state of the entity is greater than X, but less than Y, show the card. You know, like showing a heat advisory if the temperature goes above something without having to get into the weeds with custom templates.
Sometimes, you just need a simple thing, and not a programmer.