Hi!
Ist es nicht möglich, die Farbe des Icons von verschiedenen states abhängig zu machen?
- type: custom:mushroom-template-card
primary: SolaX
secondary: >-
{{ (states('sensor.solax_pv_power_total') | float * 0.001) |
round(1) }} kW {{ states('sensor.solax_battery_capacity') }} %
icon: |-
{% if states('sensor.solax_pv_power_total') | int <=1 %}
mdi:grid-off
{% else %}
mdi:solar-panel-large
{% endif %}
tap_action:
action: navigate
navigation_path: /lovelace/solax
color: |-
{% if states('sensor.solax_pv_power_total') | int <=1 %}
grey
{% elif states('sensor.solax_pv_power_total') | int >=1 %}
orange
{% elif states('sensor.solax_battery_capacity') | int >=80 %}
green
{% endif %}
vertical: true
features_position: bottom
color funktioniert bei state von …pv_power_total, aber nicht, wenn ich einen weiteren Parameter einer anderen entität übergebe.
Ich wollte grau, wenn die PV-Anlage nichts liefert, in Betrieb orange und wenn die Batterie zu einem bestimmten Grad voll ist, grün.
Danke!
