I am trying to configure a template card with a mushroom chip card… I followed the guide that was on youtube from My Smart home…@ https://www.youtube.com/watch?v=pQkOaH44Dzo
The state changes for all tab selections but the tab colors remain default.
Any help is appreciated… Code is below.
- type: vertical-stack
cards:
- type: custom:mushroom-chips-card
chips:
- type: template
icon: mdi:fan
content: HVAC
card_mod:
style: |
ha-card {
--chip-background: {{ 'green' if is_state('input_number.tabs_home'), '1.0') else 'red' }}
}
tap_action:
action: call-service
service: input_number.set_value
target:
entity_id: input_number.tabs_home
data:
value: 1
- type: template
icon: mdi:lightbulb
content: Lights
card_mod:
style: |
ha-card {
--chip-background: {{ 'green' if is_state('input_number.tabs_home'), '2.0') else 'red' }}
}
tap_action:
action: call-service
service: input_number.set_value
target:
entity_id: input_number.tabs_home
data:
value: 2
- type: template
icon: mdi:car
content: Cars
card_mod:
style: |
ha-card {
--chip-background: {{ 'green' if is_state('input_number.tabs_home'), '3.0') else 'red' }}
}
tap_action:
action: call-service
service: input_number.set_value
target:
entity_id: input_number.tabs_home
data:
value: 3
- type: template
icon: mdi:baseball
content: Sports
card_mod:
style: |
ha-card {
--chip-background: {{ 'green' if is_state('input_number.tabs_home'), '4.0') else 'red' }}
}
tap_action:
action: call-service
service: input_number.set_value
target:
entity_id: input_number.tabs_home
data:
value: 4
alignment: center