mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-13 19:54:42 +00:00
More consistent style for brita water button
This commit is contained in:
@@ -145,8 +145,22 @@
|
||||
return 'linear-gradient(180deg, var(--paper-card-background-color) 0%, var(--paper-card-background-color)' + percent + '%, var(--primary-color) ' + percent + '%)'
|
||||
]]]
|
||||
- color: white
|
||||
name:
|
||||
- color: >
|
||||
[[[
|
||||
const remaining = states['input_number.brita_remaining_liters'].state;
|
||||
const percent = 100 - (remaining / 150 * 100);
|
||||
|
||||
return percent < 75 ? 'black' : 'white';
|
||||
]]]
|
||||
icon:
|
||||
- color: white
|
||||
- color: >
|
||||
[[[
|
||||
const remaining = states['input_number.brita_remaining_liters'].state;
|
||||
const percent = 100 - (remaining / 150 * 100);
|
||||
|
||||
return percent < 25 ? 'black' : 'white';
|
||||
]]]
|
||||
custom_fields:
|
||||
remaining_liters:
|
||||
- position: absolute
|
||||
|
||||
Reference in New Issue
Block a user