Open Anashost opened 5 months ago
300 lines of code is not a minimal working example. Besides, 3 custom cards here...
300 lines of code is not a minimal working example. Besides, 3 custom cards here...
yaml reduced
(unrelated to the issue):
return `${states['sensor.office_lights_of_count'].state}`
should be just
return states['sensor.office_lights_of_count'].state;
And in JS it is needed to use ";" in places like this:
if (...)
return '-'
return `${states['sensor.office_temperature'].state}°`
@ildar170975 It's working fine the way I've configured it.
Doing this:
should be just
return states['sensor.office_lights_of_count'].state;
Resulted an error:
It's working fine the way I've configured it.
Not gonna convince you. But check the docs, ask in button-card threads etc. The major thing is that to sort out any issues with card-mod you should have cleared all your other code first.
Sorry i don't mean you're wrong, but it didn't work that way for me, i made those cards over a year ago, so maybe card-mod/button-card changed a little over time.
The things I were talking about are only button-card-related. To sort out any problems we need to simplify/localize/exclude any other options.
Button-card is at least 3 years same in part of JS...
Ive just edited my comment
You're right, but i thought if the card works and no errors in HA or in browser inspection, then everything is alright 🤔
then everything is alright
unfortunately, could be not in general.
Yeah, sometimes it's a pain to debug some issues.
For now i will stick to version Card-mod 3.4.0
as it doesn't lead to slowness in rendering the card and icons. Hopefully others may notice similar issue to mine and report to get it fixed.
I experience the same with card-mod 3.4.1+ I can now see the style being applied. Before it was instant. I might be that the page loads faster now, but with 3.4.1+ I see some cards changing after the page loads.
I'm using card-mod with the minimalist theme/button-card.
Yeah, it's s mostly the icons and buttons like button-card
that are taking longer to load, and make loading feels laggy.
Same issue here. I use mod-card to have a fixed height and background color of layout card (which doesn't have card element itself, so need mod-card). I use it to create my own header card. It loads up and in a splitseconds I see it get the correct size. Definitely a noticeable downgrade and looks horrible when switching from tabs. I reverted back to 3.4.0, which works normal.
I hope this can get fixed.
Zainstalowałem wersję 3.4.2 i nadal karty ładują się z opóźnieniem. Powrót do 3.4.0 powoduje normalne działanie. Oczekujemy poprawki. Pozdrowieenia
Similar issues here.
card-mod 3.4.2 is significantly slower to load. On some older devices (Android eReader, iPad mini 4 and iPad Air 2), about 1/3 of mushroom cards do not load with formatting and the HA app (or browser) hangs for extended periods of time, making them unusable. Moving back to card-mod 3.4.0 helped significantly.
Occasional performance issues w/ 3.4.2 seen even on higher powered devices, e.g. iPad Pro M2, MacBookAir13" 2020 and iPhone 12 Pro Max.
So, the devs are aware? Or not enough people effected by this issue yet!!
many people have this symptom, but they don't write like in the book of condolence when they see that the error has already been reportedSent from Android device12 lut 2024 06:30 Anashost @.***> napisał(a): So, the devs are aware? Or not enough people effected by this issue yet!!
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
Same issue, too slow, don't open correctly, can pass in edit mode. Come back to 3.4.0 and no more issue.
Same problem, somethime very slow with 3.4.1
Confirm, rolling back to 3.4.0 works as a workaround.
v.3.4.3 restored pre v3.4.1 performance levels.
Thanks for keep this amazing and unique project alive.
I also experience this, where I can see card-mod changes being drawn. This is with card-mod 3.4.2, HA running in Windows 11 Hyper-V (on a relatively fast AMD Ryzen 5 PRO 3400GE w/ Radeon Vega Graphics 3.30 GHz). Ideally, if possible,, inserting a 250ms delay (or selectable delay) before presenting the GUI would solve this. I suspect this is difficult/impossible to tell the HA code above you to do this; just sharing my thoughts.
Sample/Screenshot:
My relevant Theme yaml code (don't think indentation is showing properly; but this is indented and works) :
` card-mod-theme: "iFone Dark" card-mod-card-yaml: | .: | ha-card.type-entities { background: transparent; # var(--x-stealth-color), "inheriting" mod-card bg box-shadow: none; border-width: 0px; border-color: transparent; border-radius: var(--x-border-radius); } ha-card.type-entities .card-header { display: block; font-size: 14px;
text-transform: uppercase;
letter-spacing: 0.04em;
padding: 0px 0px 0px 20px;
color: rgb(148, 150, 148); # text-medium-color is rgb(128, 130, 138)
}
.entities-title {
background: black !important;
border-radius: 0px !important;
}
.entities-creep-up {
margin-top: 0px; # edge up to neighbor
}
ha-card.type-custom-mod-card {
background: var(--ha-card-background);
height: var(--x-grid-height);
width: var(--x-grid-width);
border-radius: var(--x-border-radius);
margin-top: -22px; # pull up to touch/cover entities-title
}
card-mod-row-yaml: | .: | :host { display: block; height: 38px; margin-top: -4px; border-bottom: 2px solid var(--divider-color); } :host(.firstrow) { margin-top: -12px; } :host(.lastrow) { border-bottom: 0px; margin-bottom: -12px; } :host(.ipsensor) { margin-top: -12px; border-bottom: 4px solid var(--divider-color); --card-mod-icon-color: var(--x-icon-neutral-color); }
`
Card code:
`type: vertical-stack cards:
Joe
I also experience this, where I can see card-mod changes being drawn. This is with card-mod 3.4.2, HA running in Windows 11 Hyper-V (on a relatively fast AMD Ryzen 5 PRO 3400GE w/ Radeon Vega Graphics 3.30 GHz). Ideally, if possible,, inserting a 250ms delay (or selectable delay) before presenting the GUI would solve this. I suspect this is difficult/impossible to tell the HA code above you to do this; just sharing my thoughts.
Sample/Screenshot:
My relevant Theme yaml code (don't think indentation is showing properly; but this is indented and works) :
` card-mod-theme: "iFone Dark" card-mod-card-yaml: | .: | ha-card.type-entities { background: transparent; # var(--x-stealth-color), "inheriting" mod-card bg box-shadow: none; border-width: 0px; border-color: transparent; border-radius: var(--x-border-radius); } ha-card.type-entities .card-header { display: block; font-size: 14px; #background: black; text-transform: uppercase; letter-spacing: 0.04em; padding: 0px 0px 0px 20px; color: rgb(148, 150, 148); # text-medium-color is rgb(128, 130, 138) } .entities-title { background: black !important; border-radius: 0px !important; } .entities-creep-up { margin-top: 0px; # edge up to neighbor } ha-card.type-custom-mod-card { background: var(--ha-card-background); height: var(--x-grid-height); width: var(--x-grid-width); border-radius: var(--x-border-radius); margin-top: -22px; # pull up to touch/cover entities-title } card-mod-row-yaml: | .: | :host { display: block; height: 38px; margin-top: -4px; border-bottom: 2px solid var(--divider-color); } :host(.firstrow) { margin-top: -12px; } :host(.lastrow) { border-bottom: 0px; margin-bottom: -12px; } :host(.ipsensor) { margin-top: -12px; border-bottom: 4px solid var(--divider-color); --card-mod-icon-color: var(--x-icon-neutral-color); }
`
Card code:
`type: vertical-stack cards:
- type: entities entities: [] show_header_toggle: false title: Sockets (various) card_mod: class: entities-title
- type: custom:mod-card card: type: vertical-stack cards:
- type: entities show_header_toggle: false state_color: true card_mod: class: entities-creep-up entities:
- entity: switch.xmas_tree_mss110_main_channel icon: mdi:power-socket-us name: Xmas Tree card_mod: class: firstrow
- entity: switch.mantle_mss105_main_channel icon: mdi:power-socket-us name: Mantle
- entity: switch.gumball_plug_mss110_main_channel icon: mdi:power-socket-us name: Gumball Socket
- entity: switch.smart_plug_mini_mss105_main_channel icon: mdi:power-socket-us name: Hall Table
- entity: switch.roku_streambar_mss105_main_channel name: Roku Streambar icon: mdi:soundbar
- entity: switch.treadmill_fan_socket_mss110_main_channel name: Treadmill Fan icon: mdi:fan card_mod: class: lastrow ` Thank you,
Joe
are you still having issues and using 3.4.0 as a workaround or is it fixed for you with 3.4.3 ? here 3.4.0 seems to perform better than 3.4.3. thx
I still see a delay with 3.4.3; but this is no longer an issue for me. I changed the way I'm using theme constants. It is fast enough. Thank you!
I changed the way I'm using theme constants.
Thank you. May I ask: what have you changed in the way you are using theme constants?
Yes, of course. I was setting values in my theme yaml, for example,
card-mod-card-yaml: | .: | ha-card._wrapped_.type-entities { border-radius: var(--x-border-radius); text-transform: uppercase; font-size: 16px; !important; }
This seemed ideal to me (centralized control).
Now, instead, I set the constant values in my theme yaml, and use them in the card. I notice this is faster. Examples follow.
Tn the theme yaml file:
x-header-line-height: 24px x-header-text-transform: uppercase
In the card:
` - type: custom:button-card
color_type: label-card
show_icon: false
show_name: true
show_label: false
name: '[[title]]'
styles:
card:
Thank you,
Joe
My Home Assistant version:
2023.12.4 / 2024.1.2
My lovelace configuration method (GUI or yaml):
GUI
What I expected to happen:
how card used to load in
Card-mod 3.4.0
What happened instead:
how cards are loading in
Card-mod 3.4.1
same issue in android HA app and browser (tested chrome/ brave)Minimal steps to reproduce:
yaml of the cards above
:Note: the slowness is only visible in a crowded page.
Error messages from the browser console:
none