2x same color in gauge

Hello,
I am creating a gauge for the humidity in my house.
Everything between 0% and 39% should be in the red zone. Between 40% and 60% it must be in the green zone. And from 61% till 100% it should be red again.

But when I try this, I got a “duplicated mapping key” error.

- type: gauge
        entity: sensor.atc_bergin_8669_humidity
        min: 0
        max: 100
        needle: true
        name: Luchtvochtigheid
        severity:
          red: 0
          green: 40
          red: 60

afbeelding

Try this:

- type: gauge
  entity: sensor.atc_bergin_8669_humidity
  min: 0
  max: 100
  needle: true
  name: Luchtvochtigheid
  segments:
    - from: 0
      color: red
    - from: 40
      color: green
    - from: 60
      color: red
2 Likes