Dude! Who knows what you wantā¦
type: vertical-stack
cards:
- type: custom:stack-in-card
mode: horizontal
cards:
- type: custom:mushroom-template-card
primary: Test Card
secondary: Good Evening, {{user}}
layout: horizontal
tap_action: none
entity: input_boolean.YOUR_TOGGLE_BOOLEAN
- type: vertical-stack
cards:
- type: custom:mushroom-chips-card
chips:
- type: template
card_mod: null
style: |
ha-card {
--chip-box-shadow: 0px 0px;
}
alignment: end
- type: custom:mushroom-chips-card
chips:
- type: template
card_mod: null
style: |
ha-card {
--chip-box-shadow: 0px 0px;
}
tap_action:
action: call-service
service: input_boolean.toggle
service_data: {}
target:
entity_id: input_boolean.YOUR_TOGGLE_BOOLEAN
icon: >
{% if is_state('input_boolean.YOUR_TOGGLE_BOOLEAN', 'off')
%}
mdi:chevron-down
{% elif is_state('input_boolean.YOUR_TOGGLE_BOOLEAN',
'on') %}
mdi:chevron-up
{% endif %}
alignment: end
- type: conditional
conditions:
- entity: input_boolean.YOUR_TOGGLE_BOOLEAN
state: 'on'
card:
type: calendar
entities:
- calendar.ASANEXAMPLE
chip āonā
chip to āoffā
The calendar card shows when the template chip is pushed. Iād advise to start in visual editor and use āhorizontal stackā before you change to ācustom:stack-in-cardā so you could use everything in visual editor.
Edith says:
I overhauled the code and now even the icon changes from ādownā to āupā with the chip is pressed.
3 Likes
hi, fancy card - is there the possibility to share your āgarbageā cards code?
Itās already there and thank you
Thank you and yes. Itās the first card and as I mentioned Iāve a room specific view behind every room and person card.
All uppercase words are based on my personal entities or gusto.
kiosk_mode:
mobile_settings:
hide_header: true
ignore_entity_settings: true
custom_width: 812
views:
- theme: Google Theme
title: Home
icon: mdi:home
visible:
- user: PERSON_1
- user: PERSON_!
badges: []
cards:
- type: custom:swipe-card
cards: []
ā¦
Works for me, put these lines in your template file.
mush-rgb-lime: 205, 220, 57
mush-rgb-state-entity: var(--mush-rgb-lime)
1 Like
pepe59
(Pepe59)
June 1, 2022, 8:39am
1000
I guess I misunderstood that it only works for mushroom cards. I tried to set the color on other tabs and the entity name and it doesnāt work.
Thank you
weemaba999
(Bart Weemaels)
June 1, 2022, 1:17pm
1001
Very nice work, really love it.
Unfortunately I have ONE Question Iām trying to display current water usage, with icon colors based on value
Please have a look at picture, code + outcome. It seems that when current usage = 0.0 (which is actual state currently), it doesnāt show the content
The colors donāt change either by using, while for example the power usage does work
Any ideas ?
Kr,
Bart
pedolsky
(Pedolsky)
June 1, 2022, 2:41pm
1002
What is the output if you copy your code into Developer Tools?
TaFfinSki
(Michael)
June 1, 2022, 4:34pm
1003
Ow manā¦Lime with black colorā¦Nice!
The Mushrooms are growing (and glowing). itās an unbelievable addition to Home Assissant
Is it possible if I have an input select with only 2 options (on and off) to use one of these cards to tap to turn on if off and tap to turn off if on rather than having to do a tap for on and a double tap for off for example? Would the card also be able to show the state of the input select so the user knows when they tap it will turn off/on rather than tapping but not knowing what it did.
Have a look at what Iāve posted above.
Dude! Who knows what you wantā¦
type: vertical-stack
cards:
- type: custom:stack-in-card
mode: horizontal
cards:
- type: custom:mushroom-template-card
primary: Test Card
secondary: Good Evening, {{user}}
layout: horizontal
tap_action: none
entity: input_boolean.YOUR_TOGGLE_BOOLEAN
- type: vertical-stack
cards:
- type: custom:mushroom-chips-card
chips:
- type: template
card_moā¦
āToggleā is the magic word.
Of course you can template the icon so it correspondents youāre needs and show the state of you input boolean.
But why would you use an input.select rather than a input.boolean as you only what to states?
I used input select as I didnāt like the default look of the input boolean for my use case.
I tried your code and the icon is not rendering.
type: custom:mushroom-chips-card
chips:
- type: action
tap_action:
action: call-service
service: input_boolean.toggle
service_data: {}
target:
entity_id: input_boolean.left_dockpro_mode
icon: >
{% if is_state('input_boolean.left_dockpro_mode', 'off') %}
mdi:chevron-down
{% elif is_state('input_boolean.left_dockpro_mode','on') %}
mdi:chevron-up
{% endif %}
Bad indentation in the mdi rows. Both should be indented by two spaces.
Hey guys
is there a way to change the size of a single chip?
tried it like this
- type: custom:mushroom-chips-card
chips:
- type: action
tap_action:
action: navigate
navigation_path: test
icon: mdi:home
icon_color: green
mush-chip-height: 60px
card_mod:
style: |
ha-card {
mush-chip-height: 50px;
}
But it doesnt work?
Appreciate your help
Thank you
Still doesnāt work.
type: custom:mushroom-chips-card
chips:
- type: action
tap_action:
action: call-service
service: input_boolean.toggle
service_data: {}
target:
entity_id: input_boolean.left_dockpro_mode
icon: >
{% if is_state('input_boolean.left_dockpro_mode', 'off') %}
mdi:chevron-down
{% elif is_state('input_bo olean.left_dockpro_mode','on') %}
mdi:chevron-up
{% endif %}
This time you have a space between the oās in the elif-row.
Have you looked in the Developers Tools ā Template section?
Alright I fixed that.
type: custom:mushroom-chips-card
chips:
- type: action
tap_action:
action: call-service
service: input_boolean.toggle
service_data: {}
target:
entity_id: input_boolean.left_dockpro_mode
icon: |
{% if is_state('input_boolean.left_dockpro_mode','off') %}
mdi:chevron-down
{% elif is_state('input_boolean.left_dockpro_mode','on') %}
mdi:chevron-up
{% endif %}
It evaluates properly in the template editor. When I get rid of the template and choose a specific icon it shows the icon, once I add a template it shows nothing.
Results:
mdi:chevron-up
1 Like
You canāt use templates in chips with type: action. You need to use type: template.
type: custom:mushroom-chips-card
chips:
- type: template
icon: |-
{% if is_state('input_boolean.left_dockpro_mode', 'off') %}
mdi:chevron-down
{% elif is_state('input_boolean.left_dockpro_mode', 'on') %}
mdi:chevron-up
{% endif %}
tap_action:
action: call-service
service: input_boolean.toggle
service_data: {}
target:
entity_id: input_boolean.left_dockpro_mode