Input number as max value in bar gauge

Hi Guys,

i am new to HA and unfortunatelly AI failed to figure it out in this case.

I have a code:

type: tile
grid_options:
columns: 9
rows: 2
entity: sensor.bthome_sensor_1234_temperature
name: Heating Progress
hide_state: true
vertical: false
features:

  • type: bar-gauge
    max: 21
    min: 20.5
    features_position: bottom

I also have a input number input_number.xxx which value is being updated by an automation.

i would like the value of ‘max:’ (in this case 21) be that input number.

can anyone help how to code it?

Most core cards and features do not allow templating. You can find the allowed data types for configuration options in their respective documentation.

Dashboards - Features - Bar Gauge

As shown in the link above min and max accept only integer values.


There are probably a few different custom components that you could use to get what you want.

Here’s a basic example using Custom Card Features:

Card Configuration
type: tile
entity: sensor.bthome_sensor_1234_temperature
name: Heating Progress
hide_state: true
vertical: false
features:
  - type: custom:service-call
    entries:
      - type: slider
        thumb: flat
        entity_id: sensor.bthome_sensor_1234_temperature
        range:
          - 20.5
          - "{{ states('input_number.xxx')|float(0) }}"
features_position: bottom

Thanks for confirming that is is not possible by built in bar gauge. I would be probably looking into is much more wasting time if not you.