diff --git a/source/_dashboards/gauge.markdown b/source/_dashboards/gauge.markdown index 98664ce0d61..6faa9b5b5cc 100644 --- a/source/_dashboards/gauge.markdown +++ b/source/_dashboards/gauge.markdown @@ -81,6 +81,19 @@ severity: required: true description: Value from which to start red color. type: integer +segments: + required: false + description: List of colors and their corresponding start values. Segments will override the severity settings. + type: list + keys: + from: + required: true + description: Value from which to start the color. + type: integer + color: + required: true + description: Color of the segment, may be any CSS color declaration like "red", "#0000FF" or "rgb(255, 120, 0)". + type: string {% endconfiguration %} ## Examples @@ -111,3 +124,29 @@ severity: yellow: 45 red: 85 ``` + +Multiple segments: + +

+Screenshot of the gauge card with multiple colored segments. +Screenshot of the gauge card with multiple colored segments. +

+ +```yaml +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' +``` diff --git a/source/images/dashboards/lovelace_gauge_segments.png b/source/images/dashboards/lovelace_gauge_segments.png new file mode 100644 index 00000000000..9914af816e8 Binary files /dev/null and b/source/images/dashboards/lovelace_gauge_segments.png differ