From 6829d0a2800905d4c1a8e150311c687981ddb6b9 Mon Sep 17 00:00:00 2001 From: Robert Resch Date: Mon, 23 Jun 2025 10:10:10 +0200 Subject: [PATCH] Fix range icon example (#2706) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Franck Nijhof Co-authored-by: AbĂ­lio Costa --- .../integration-quality-scale/rules/icon-translations.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/core/integration-quality-scale/rules/icon-translations.md b/docs/core/integration-quality-scale/rules/icon-translations.md index 27258d3d..3f3b0f71 100644 --- a/docs/core/integration-quality-scale/rules/icon-translations.md +++ b/docs/core/integration-quality-scale/rules/icon-translations.md @@ -77,7 +77,7 @@ In the `icons.json` file, define the ranges and their corresponding icons in asc "entity": { "sensor": { "battery_level": { - "default": "mdi:battery", + "default": "mdi:battery-unknown", "range": { "0": "mdi:battery-outline", "10": "mdi:battery-10", @@ -103,8 +103,8 @@ The system selects the icon associated with the highest range value that's less - A value of 45 will show the `mdi:battery-40` icon (45 is greater than 40 but less than 50) - A value of 100 will show the `mdi:battery` icon (100 equals the highest defined range) - A value of 5 will show the `mdi:battery-outline` icon (5 is greater than 0 but less than 10) -- A value of -10 will show the `mdi:battery` default icon (value is outside defined ranges) -- A value of 120 will show the `mdi:battery` default icon (value exceeds all defined ranges) +- A value of -10 will show the `mdi:battery-unknown` default icon (value is outside defined ranges) +- A value of 120 will show the `mdi:battery` icon (any value exceeding the last defined range entry, 100, will use the icon associated with that final range value) When implementing range-based icons: @@ -128,4 +128,4 @@ There are no exceptions to this rule. ## Related rules - \ No newline at end of file +