mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-19 07:16:29 +00:00
Fix range icon example (#2706)
Co-authored-by: Franck Nijhof <git@frenck.dev> Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>
This commit is contained in:
parent
b6880e1e73
commit
6829d0a280
@ -77,7 +77,7 @@ In the `icons.json` file, define the ranges and their corresponding icons in asc
|
|||||||
"entity": {
|
"entity": {
|
||||||
"sensor": {
|
"sensor": {
|
||||||
"battery_level": {
|
"battery_level": {
|
||||||
"default": "mdi:battery",
|
"default": "mdi:battery-unknown",
|
||||||
"range": {
|
"range": {
|
||||||
"0": "mdi:battery-outline",
|
"0": "mdi:battery-outline",
|
||||||
"10": "mdi:battery-10",
|
"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 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 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 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 -10 will show the `mdi:battery-unknown` 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 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:
|
When implementing range-based icons:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user