Counter to have a state, so the entity card colour can change upon the target value

Let’s say I have a counter.letterbox defined, which counts how many times the letter box has been triggered (via a sensor).

  • The counter begins with a 0, so the state of the counter is off.
  • A configuration setting could be set, so when the counter reaches a target value (let’s say 1) - the state can change to on.

When a card with the counter entity is plotted on a dashboard, and the counter reaches the target value - it would appear in a different colour.