Can I customize a card based on a RESTful sensor state?

I implemented a sensor using the RESTful sensor type so I can read a value and set it as the state as part of the JSON response.

Now, I’d like to customize a card base on this state.
Specifically, the returned response is numeric and has 4 possible options, so the closest card I could find is the gauge type, and since it has only 3 severities I’ll need to merge two of the states into one severity.

So a question about customizing cards based on state:

  1. Is there a way to get 4 or more levels of severities with the built-in gauge card type?
  2. Is there a way to customize other card types like say a button’s icon type or the icon’s color based on the states?

Is this something we can do without referring to 3rd party custom components/cards, and such?
I’m happy with achieving it with code in configuration.yml.

This custom button card can do almost everything

1 Like

It definitely looks comprehensive!

Is it not possible to achieve any sort of these state-related updates for cards other than gauge? I’d like to do my best to do it without external dependencies.

This is going to be extremly hard/impossible. In my opinion you only get the full lovelace experience with custom cards, the built in ones are pretty limited.

Yep, it does seem like it so far…