Gauge more than 3 severity steps?

Hello lovely people ( :
i set up 2 gauges according to:

while defining the severitys i noticed that as soon as i set a 4th color step it falls back to one color for every severity.

is there any known way to fix this?

with kind regards

severity only supports green, yellow and red so not sure how you can say you set it up according to the docs if you are talking about a 4th severity colour.

Share some code?

type: gauge
entity: sensor.kitchen_humidity
needle: true
min: 20
max: 80
segments:
  - from: 0
    color: '#db4437'
  - from: 35
    color: '#ffa600'
  - from: 40
    color: '#43a047'
  - from: 60
    color: '#ffa600'
  - from: 65
    color: '#db4437'

Must have needle: true for multi segment

2 Likes

There are 4 colors possible.

1 Like

Thankf you for your Tips @rossk & @VDRainer sadly i dont like to have segments :confused:

You can change your colors like:

    severity:
      purple: 125
      orange: 250
      red: 500

and in this example there is even a “4th color” because before the value of 125 lovelaces default color (blue) is shown as gauge.

i tried adding an aditional color by just adding the next line like ‘yellow: 750’ but it didnt work :frowning:

Ahh wow I was not aware you could write any colour. Nice find.

But yes it is 3 only for now, plus the default blue as you mentioned if you start above 0.

150 steps…
colors picked from Leonardo (leonardocolor.io) then some procrastinating tinkering with excel and formating in visual studio…

2 Likes

care to share?

1 Like

There is nothing special from what was said above. I just had to spend 1,5hrs by formatting a long code. I generated the color codes in the Adobe Leonardo open source online tool and then played with excel, exported in csv and formatted it properly in visual studio code.

1 Like

Cannot attach a yaml file here, so let’s do it this blunt way… to save your time!

segments:
  - from: 0
    color: '#15118d'
  - from: 1
    color: '#18108e'
  - from: 2
    color: '#1b0f90'
  - from: 3
    color: '#1e0e92'
  - from: 4
    color: '#210d94'
  - from: 5
    color: '#230c96'
  - from: 6
    color: '#260b98'
  - from: 7
    color: '#280a99'
  - from: 8
    color: '#2a089b'
  - from: 9
    color: '#2d079d'
  - from: 10
    color: '#2f059e'
  - from: 11
    color: '#3104a0'
  - from: 12
    color: '#3302a2'
  - from: 13
    color: '#3501a3'
  - from: 14
    color: '#3701a4'
  - from: 15
    color: '#3901a5'
  - from: 16
    color: '#3a01a6'
  - from: 17
    color: '#3c01a7'
  - from: 18
    color: '#3e01a8'
  - from: 19
    color: '#3f01a9'
  - from: 20
    color: '#4100aa'
  - from: 21
    color: '#4200ab'
  - from: 22
    color: '#4400ac'
  - from: 23
    color: '#4600ad'
  - from: 24
    color: '#4700ae'
  - from: 25
    color: '#4900af'
  - from: 26
    color: '#4a00b0'
  - from: 27
    color: '#4c00b0'
  - from: 28
    color: '#4d00b1'
  - from: 29
    color: '#4f00b2'
  - from: 30
    color: '#5000b3'
  - from: 31
    color: '#5200b4'
  - from: 32
    color: '#5300b4'
  - from: 33
    color: '#5500b5'
  - from: 34
    color: '#5600b6'
  - from: 35
    color: '#5700b6'
  - from: 36
    color: '#5900b7'
  - from: 37
    color: '#5a00b8'
  - from: 38
    color: '#5c00b8'
  - from: 39
    color: '#5d00b9'
  - from: 40
    color: '#5f00ba'
  - from: 41
    color: '#6000ba'
  - from: 42
    color: '#6200bb'
  - from: 43
    color: '#6300bb'
  - from: 44
    color: '#6500bc'
  - from: 45
    color: '#6600bc'
  - from: 46
    color: '#6700bd'
  - from: 47
    color: '#6900bd'
  - from: 48
    color: '#6a00be'
  - from: 49
    color: '#6c00be'
  - from: 50
    color: '#6d00be'
  - from: 51
    color: '#6f00be'
  - from: 52
    color: '#7000bf'
  - from: 53
    color: '#7200bf'
  - from: 54
    color: '#7300bf'
  - from: 55
    color: '#7500bf'
  - from: 56
    color: '#7600bf'
  - from: 57
    color: '#7800bf'
  - from: 58
    color: '#7900bf'
  - from: 59
    color: '#7b00bf'
  - from: 60
    color: '#7c00bf'
  - from: 61
    color: '#7e00bf'
  - from: 62
    color: '#7f00bf'
  - from: 63
    color: '#8100bf'
  - from: 64
    color: '#8300bf'
  - from: 65
    color: '#8400bf'
  - from: 66
    color: '#8600bf'
  - from: 67
    color: '#8700be'
  - from: 68
    color: '#8900be'
  - from: 69
    color: '#8a00be'
  - from: 70
    color: '#8c00bd'
  - from: 71
    color: '#8d00bd'
  - from: 72
    color: '#8f00bd'
  - from: 73
    color: '#9000bc'
  - from: 74
    color: '#9200bc'
  - from: 75
    color: '#9300bb'
  - from: 76
    color: '#9500ba'
  - from: 77
    color: '#9700ba'
  - from: 78
    color: '#9800b9'
  - from: 79
    color: '#9a00b8'
  - from: 80
    color: '#9b00b7'
  - from: 81
    color: '#9d00b7'
  - from: 82
    color: '#9f00b6'
  - from: 83
    color: '#a000b5'
  - from: 84
    color: '#a200b4'
  - from: 85
    color: '#a300b3'
  - from: 86
    color: '#a500b2'
  - from: 87
    color: '#a600b1'
  - from: 88
    color: '#a800b0'
  - from: 89
    color: '#a900ae'
  - from: 90
    color: '#ab00ad'
  - from: 91
    color: '#ad00ac'
  - from: 92
    color: '#ae00aa'
  - from: 93
    color: '#b000a9'
  - from: 94
    color: '#b100a8'
  - from: 95
    color: '#b300a6'
  - from: 96
    color: '#b500a4'
  - from: 97
    color: '#b600a3'
  - from: 98
    color: '#b800a1'
  - from: 99
    color: '#b900a0'
  - from: 100
    color: '#bb009e'
  - from: 101
    color: '#bc009c'
  - from: 102
    color: '#be009a'
  - from: 103
    color: '#bf0098'
  - from: 104
    color: '#c10097'
  - from: 105
    color: '#c20095'
  - from: 106
    color: '#c40093'
  - from: 107
    color: '#c60091'
  - from: 108
    color: '#c8008f'
  - from: 109
    color: '#ca008d'
  - from: 110
    color: '#cb008b'
  - from: 111
    color: '#cd0089'
  - from: 112
    color: '#cf0087'
  - from: 113
    color: '#d10084'
  - from: 114
    color: '#d20082'
  - from: 115
    color: '#d40080'
  - from: 116
    color: '#d6007d'
  - from: 117
    color: '#d7007b'
  - from: 118
    color: '#d90078'
  - from: 119
    color: '#db0075'
  - from: 120
    color: '#dc0073'
  - from: 121
    color: '#de0070'
  - from: 122
    color: '#df006d'
  - from: 123
    color: '#e1006a'
  - from: 124
    color: '#e20067'
  - from: 125
    color: '#e40065'
  - from: 126
    color: '#e50062'
  - from: 127
    color: '#e7005f'
  - from: 128
    color: '#e8005b'
  - from: 129
    color: '#e90058'
  - from: 130
    color: '#eb0055'
  - from: 131
    color: '#ec0052'
  - from: 132
    color: '#ed004f'
  - from: 133
    color: '#ef004c'
  - from: 134
    color: '#f00048'
  - from: 135
    color: '#f10045'
  - from: 136
    color: '#f20041'
  - from: 137
    color: '#f3003e'
  - from: 138
    color: '#f4003a'
  - from: 139
    color: '#f50037'
  - from: 140
    color: '#f60033'
  - from: 141
    color: '#f7002f'
  - from: 142
    color: '#f8002b'
  - from: 143
    color: '#f90027'
  - from: 144
    color: '#fa0022'
  - from: 145
    color: '#fb001d'
  - from: 146
    color: '#fc0018'
  - from: 147
    color: '#fd0011'
  - from: 148
    color: '#fe0009'
  - from: 149
    color: '#ff0000'
7 Likes

In case you need a different min max on 150 steps, it is useful to use interpolation function in excell:
Method to calculate interpolation step value in Excel - Office | Microsoft Learn

1 Like

a wonderful tool to make it directly for HA:
https://ha.labtool.pl/

4 Likes