Hi all. Forgive me this newbie question but I’ve always learned that the dummest questions are the once never asked
I’m trying to change the color of the battery level text in a mushroom template card with help of card_mod. This is what it looks like now:
and this is the code I’ve been trying:
type: horizontal-stack
cards:
- type: custom:mushroom-template-card
card_mod:
style: |
.multiline_secondary {
color: green;
}
primary: Bijkeuken binnendeur
secondary: >-
{% if
is_state('binary_sensor.bijkeuken_binnendeur_sensor_state_any_2', 'off')
%}
dicht
{% elif
is_state('binary_sensor.bijkeuken_binnendeur_sensor_state_any_2', 'on') %}
open
{% else %}
niet open of dicht
{% endif %}battery level: {{
states('sensor.bijkeuken_binnendeur_battery_level_2') }}%
icon: >-
{% if
is_state('binary_sensor.bijkeuken_binnendeur_sensor_state_any_2', 'off')
%}
mdi:door-closed
{% elif
is_state('binary_sensor.bijkeuken_binnendeur_sensor_state_any_2', 'on') %}
mdi:door-open
{% else %}
mdi:door-open
{% endif %}
entity: binary_sensor.bijkeuken_binnendeur_sensor_state_any_2
multiline_secondary: true
icon_color: >-
{% if is_state('binary_sensor.bijkeuken_binnendeur_sensor_state_any_2',
'off') %}
grey
{% elif is_state('binary_sensor.bijkeuken_binnendeur_sensor_state_any_2',
'on') %}
brown
{% else %}
mdi:window-open-variant
{% endif %}
My question mainly is: how do I figure out which CSS element to put after style: |
I have been investigating with devTools and cannot figure out what I am doing wrong: