Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Card mod configuration no appearing in card YAMLs but appear in dashboard YAML #375

Open
4 tasks done
idogrf opened this issue May 5, 2024 · 1 comment
Open
4 tasks done

Comments

@idogrf
Copy link

idogrf commented May 5, 2024

My Home Assistant version: 2024.5.1

My lovelace configuration method (GUI or yaml): both

What I am doing:
Trying to edit a card's card_mod settings through the card's YAML by opening "SHOW CODE EDITOR"
I just updated to HA 2024.5.1 and the latest card_mod
Didn't have the issue in previous versions

What I expected to happen:
The opened YAML would contain the card_mod section

What happened instead:
The card_mod section doesn't show up. It does show up if I edit the entire dashboard's yaml

This is how the card's YAML looks when opening only it -

type: custom:mushroom-climate-card
entity: climate.main_ac
fill_container: false
show_temperature_control: true
hvac_modes:
  - auto
  - heat
  - cool
  - 'off'
primary_info: state
secondary_info: last-changed
collapsible_controls: true
icon: mdi:fan

and this is how it looks inside the dashboard page's YAML -

views:
  - title: test
    path: test
    badges: []
    cards:
      - type: custom:mushroom-climate-card
        entity: climate.main_ac
        fill_container: false
        show_temperature_control: true
        hvac_modes:
          - auto
          - heat
          - cool
          - 'off'
        primary_info: state
        secondary_info: last-changed
        collapsible_controls: true
        icon: mdi:fan
        card_mod:
          style: |
            :host {
            --mush-icon-symbol-size: 1em;
            --mush-icon-size: 100px;
            {% if is_state("climate.main_ac", "off") %}

            }
            {% else %}
            # --mush-card-primary-font-size: 25px
            }
            ha-state-icon {
              animation: spin 5s linear infinite;
            }
            {% endif %}
            ha-card {
            {% if is_state("climate.main_ac", "cool") %}
                --ha-card-background: linear-gradient(-45deg, rgba(20, 80, 163,0.8) 0%, rgba(255,255,255,0.5) 75%);
            {% elif is_state("climate.main_ac", "heat") %}
                --ha-card-background: linear-gradient(-45deg, rgba(183, 4, 4,0.8) 25%, rgba(0,0,0,0.5) 100%);
            {% endif %} ;
            --control-height: 70px;
            }

By putting an X in the boxes ([]) below, I indicate that I:

@ildar170975
Copy link
Contributor

Duplicate of #337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants