Can't use input number in value

I’m thinkering with a gauge card which has some hardcoded values and try to switch to input_number as a global variable which is easy to change.

Currently, I have this code which insterestingly does work with picture-element’s badges and card-mod

type: gauge
entity: sensor.temperatura_bajo_bingo
view_layout:
  position: sidebar
severity:
  green: 20
  yellow: |
    {{ states("input_number.temperatura_maxima") | int }}
  red: 30

You are correct, you can’t use the input_number here. The card doesn’t accept templates:

image

1 Like

Then is there any alternative to achieve this?

My next option would be to change the color the same way I did with badges on my floorplan using card-mod

But I want to keep it as stock as possible

Not possible.