Gauge Card Show green between 2 values and red outside it

Can’t find anyone else reporting this (or I missed it).

My case:
I’m measuring the Humidity in my living room using an ESPHome made AQS. Works great but I also want to make things visible as they should be.

For Humidy inside the house the ideal Humitity level is between 40% and 60% Below and higher is unhealthy. So this way I want to use the Gauge card to show values as follows:

Between 0% and 39% in RED
Between 40% and 60% in Green
Between 60% and 100% in RED

Currently there’s only a severity possibility which has green, yellow, and red.

Humidy seems to be very common to measure if you ask me so this can be of great value of many HA Enhusiasts :slight_smile:

This can be usefull to everything that needs a value between 2 values.

Have a look at using ‘segments’. You can do you want with that config.

Thanks, I didn’t immediately linked the segments to a solution for my needs.

For anyone else that found this post. For me this was the solution, please have a look at the yaml code example below:

type: gauge
entity: sensor.aqs_meter_1_humidity
needle: true
name: AQS Woonkamer Humidity
min: 0
max: 100
segments:
  - from: 0
    color: red
    label: Humidity too low!
  - from: 40
    color: green
    label: Humidity OK
  - from: 61
    color: red
    label: Humidity too high!

Result:
image