I am very frustrated because I do not see the mistake in my configuration.
The color of the icon should change depending on the switching state (on/off). The state of “input_boolean.autokellerbeleuchtung_weekend” is correct. I can see it in the developer environment. Can anyoune help here?
Spartacus
type: custom:mushroom-chips-card
chips:
- type: entity
entity: input_boolean.autokellerbeleuchtung_weekend
icon: mdi:lightbulb-auto
tap_action:
action: toggle
name: Auto Wochenende
use_entity_picture: true
double_tap_action:
action: none
hold_action:
action: none
icon_color: |-
{% if is_state('input_boolean.autokellerbeleuchtung_weekend', 'on') %}
green
{% else %}
red
{% endif %}
hm! This matter is quite new to me, and i need some more help. If i change “entity” to “template” nothing works abymore. So I guess that there is much more to do, than only changing he type !
OK, assuming that it only has 2 states, you could try this (I have reversed the logic):
icon_color: "{{ 'red' if states('alarm_control_panel.section_2') == 'armed_away' else 'green' }}"
…but I am not sure that there isn’t an armed_home (for nights, maybe), so perhaps check what that sensor shows when you alarm is disarmed (maybe it’s disarmed_home)?