Have a look at Paul’s answer to my question and maybe the following workarounds.
Hello
Maybe you can share the code on the right?
The best to do this is by putting the logic in a script and call the script from your tap action. Keeps the UI file a bit neat and separates the logic from UI.
Hi there! Is it possible that collapse_controls for the Light card is not working? Example below:
After applying changes, the controls are still visible when light is off:
collapse_controls isn’t supported in mushroom cards.
It’s part of an upcoming release.
Understood, thank you!
Hello. Excellent what you are doing thank you very much.
I consult you this. I want to change the color of the icon but it also changes the color of the buttons. What should I put so that only the color of the icon changes? Thank you
type: custom:vertical-stack-in-card
cards:
- type: picture
image: >-
/api/media_player_proxy/media_player.spotify?token=7d369031b0da7f4092c93c10315be979826d5dd7f4e997dc10572389e0f34080&cache=acdaa0fa5c1a9e19
tap_action:
action: none
hold_action:
action: none
theme: Mushroom
card_mod: null
- type: custom:mushroom-media-player-card
entity: media_player.spotify
use_media_info: true
use_media_artwork: false
volume_controls:
- volume_mute
- volume_set
- volume_buttons
media_controls:
- on_off
- shuffle
- previous
- play_pause_stop
- next
- repeat
icon_color: red
card_mod: null
style: |
:host {
--card-mod-icon-color: green;
}
ha-card {
box-shadow: 0px 0px;
}
I thought that could be one way to do it, however I think the light card is getting the slider color from the attributes of the actual light, which I’d like to keep if possible. For ex:, my HUE lights that can change color will reflect their color in the slider and icon colors (if lights are purple, the icon and slider will be purple). I think if there is no color/temp attribute it just goes with the standard mush-rgb-orange. I’d love to somehow change the behavior so it picks up the brightness attribute instead and adjusts the icon and slider color accordingly.
You can
First of all, great work! This has been my favourite addition to HA in a very long time…
However, I seem to be having an issue trying to use the “use_entity_picture” option that was rolled out in 1.6.3 for chip and entity cards. I am using HACS for installation and updates and according to it I am up to date with version 1.6.3 but I see no option to use an entity picture in the visual editor and when I attempt to add the config variable myself I get an error.
Any help on how to fix this would be appreciated!
–Edit-- I should mention I have already tried to uninstall and reinstall which didn’t help
It doesn’t look like you are on 1.6.3. Or you haven’t cleared the browser cache.
Hello. Where did you locate that code? It does not work for me. Thank you
In the template cards.
Thanks! It was browser cache which is embarrassing because I thought I had cleared it. It seems to be working now.
It’s a bit odd that the entity chip cards aren’t a circle when Content is set to None (like they are when using an icon) if an entity picture is used. Instead seem to have what looks like a space (’ ') to the right, but it still takes up much less space than what I had before so I am grateful.
you have to use templates
this is my chips Temnplates code i reuse for updating icon ans color based on state
type: template
entity: cover.smart_garage_door_opener_door_status
icon: |
{% set state=states('cover.smart_garage_door_opener_door_status') %}
{% if state=='closed' %}
mdi:garage-variant-lock
{% elif state=='open' %}
mdi:garage-open-variant
{% endif %}
icon_color: |-
{% set state=states('cover.smart_garage_door_opener_door_status') %}
{% if state=='closed' %}
#52BE80
{% elif state=='open' %}
#E74C3C
{% endif %}
tap_action:
action: more-info
content: |-
{% set state=states('cover.smart_garage_door_opener_door_status') %}
{% if state=='closed' %}
Closed
{% elif state=='open' %}
Open
{% endif %}
double_tap_action:
action: none
hold_action:
action: none
seems like a lot of …
i just use
{% if is_state('switch.tasmota_universal_parent_192_2','on') %} purple {% endif %}
Is that just colour??
yip … and to be fair its just the same as your yourve just added a lot more