Change content of gauge

I got a digital energy meter from Fluvius, and right now I’m struggeling with (i suppose) a basic issue…

The energy meter returns a “1” as peak tariff, and a “2” as off-peak tariff.
So I created a simple gauge. But how can I change the “content” of the gauge (1 or 2) into peak / offpeak?

(Oh, and if somebody knows the trick to show the needle in the middle of the red/green part : let me know!)

Blockquote - type: gauge
entity: sensor.stroommeter_actueel_tarief
min: 0
max: 2
needle: true
segments:
- from: 0
color: red
- from: 1
color: green
name: Piek / Dal

You can use the label (Gauge Card - Home Assistant) optional property under segment.

Doesn’t it go to that position when the value is 1?

Hi Odwide!

Label did the trick!
And no, it doesn’t go to the middle of the green/red part as you can see on the picture (the gauge at the right bottom)

The needle going to the wrong position could be related to the format of the source sensor.

Working :slight_smile:

  - type: gauge
    entity: sensor.stroommeter_actueel_tarief
    min: 0
    max: 3
    needle: true
    segments:
      - from: 0
        color: red
        label: Piek
      - from: 1.5
        color: green
        label: Dal
    name: Tarificatie

afbeelding

1 Like