-
Notifications
You must be signed in to change notification settings - Fork 169
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
2025.1.0 beta breaks several fundamental card_mods #420
Comments
Having the same issue. None of my entity rows with |
only really related change in Frontend would e dhoeben/frontend@6e810d4 ? |
If you mean this PR: |
Marius, can you see issues with other parts? Is it only entity-row? |
separate post about combining this fold-entity-row with auto-entities..... nothing works anymore, the scroll-fold
or the colors on the icons. |
this is what's happened on the generic entity row but all the last PR changes is this: |
Can confirm that I am seeing this for any mods applied at the entity-row level. Also seeing the odd quirk noticed by Marius that row mods do seem to be applied to other custom entity rows e.g. template-entity-row as long as they are contained inside a fold-entity-row. But this is not the case for core entity-row types inside the same fold-entity-row.
I started working around this by applying entity row mods via drilling down from the level of the entities card, with some initial success, but the seemingly infinite variety of DOM paths for different entity types made me doubt the time it would take to fix this everywhere, and I soon hit some edge cases anyway where nothing would work. |
Believe it would be wise to add your findings in the community post replying to me there too. Fixing all locally is without end probably, especially if they change stuff without announcing any of it again. |
I've just backed out 2025.1 for this reason and the breakage of auto-backup and Generac. Changing icon colors is something long overdue for inclusion in HA as a core feature. |
I can confirm my styling is not applied after the update as well. Color styling is quite useful for me, especially for Photovoltaics, where the orange/red quickly have your attention. Example code:
|
--card-mod-icon-color: has also stopped working for me since upgrading to the stable release of 2025.1.0 |
please provide the full card_mod yaml you use for that, because the a single row suffices, or if identical to posted above, just confirm and +1. I expect a lot of me too's here, so trying to keep things as tidy as possible ;-) |
No worries. Here are a couple of examples, both row items in a standard entities card:
|
Font size, color stopped working in 2025.1.0 stable in Entities card
|
Hi same problem, color and icon stopped working in Core 2025.1.0 - Frontend 20250103.0
|
Hello,
|
Any card mod added to individual entities of an entity filter card, won't work anymore with 2025.1.0 update... Only works for the general filter card... so... This is still working
But this is not working anymore
Another thing is that in 2025.1.0, they made different elements for entity and attribute, so these are not using the same anymore: This:
Does not work anymore with this, like the entity type is:
Now it is working with:
|
Hi the same for me :
doesn't work anymore |
on which element please? post the card and entity for which this mod is set |
check, template entity-row was already noted ;-) throw them in a fold-entity-row, and you'll see the mod is working thanks for confirming |
sorry for the duplicate, I m new on HA ;-) |
Disclaimer - this is what I assume after some quick debugging. It appears that some of the methods that I examined I guess, as a start, someone has to check all the methods in patched versions of UI elements from This commit (linter fixes): home-assistant/frontend@7a12fd2 It appears linter wants private method names to start with the underscore because there is a whole lot of changes like this in that commit. Unfortunately, though, just changing the names of patched methods is not enough - it will stop working for older versions of HA. 🤦 |
@akomelj Interesting that home-assistant/frontend@7a12fd2 does not contain that "renderEntity". |
@ildar170975 , hm, you sure? I see it in this commit Doesn't matter - the change has been made. Now - for fixing it. One of the possible very-hacky-hacky options is changing the behaviour of Now, this is a very quick and dirty fix - obviously - so I guess not all problems can be solved by this. Something in the lines of export const patch_object = (obj, patch) => {
if (!obj) return;
const orig = Object.getOwnPropertyDescriptors(obj);
console.debug("CardMod orig methods", {orig, patch});
for (const method in Object.getOwnPropertyDescriptors(patch.prototype)) {
if (orig[method]) patch_method(obj, method, patch.prototype[method]);
else if (orig[`_${method}`]) patch_method(obj, `_${method}`, patch.prototype[method]);
else {
console.debug(`CardMod method ${method} of ${obj.constructor.name} not found. Injecting patched version.`);
patch_method(obj, method, patch.prototype[method]);
}
}
}; |
I wrote earlier, missed it somehow when tried to find by Ctrl-F.
Meanwhile users may merely open "card-mod.js" file and replace "renderEntity" with "_renderEntity", then purge a browser's cache. Of course a normal patch is needed for card-mod... |
Doesn't work for me, sorry. |
Have you deleted .gz file? |
You. But this helps other user having not your setup in which way? And of course you can do whatever you want, but you see in this thread that this way is not that error proven and needs to edit several files. I only wanted to give the advice, that the other way could be perhaps more stable. Esp. because of the many "didn't work" feedback here. I didn't double-check, what is happening, if both links are there, in config and in lovelace resource. And this is most probably the standard, because HACS set it in lovelace and the user perhaps only additionally in config. Or didn't do that at all ... And then you have two links or a not existing link and with your way you are changing only one. Anyway, You can do what you want, but I wanted to make the advice more stable for all, because your setup could not be seen as the same at other users. |
Fine. People posting ‘it doesn’t work for me’ is a well known phenomenon here and elsewhere. Mostly because not following advice, documentation or simply wrong configs. taking temporary files outside of HACS is a more reliable method of testing than any other. But sure, I am glad people get it to work how each and everyone manages in their own setting. |
I had it working in few seconds by just adding a _ 👍👌 |
I merely opened an original js file in editor and made a change as @akomelj suggested. Then purged a browser’s cache. |
I tried editing the card-mod.js file, restarting and clearing cache as well. No luck with my text colors. Waiting for an update to the HACS. |
not sure, but do I see 2 card_mod installs in that screen dump of the code? there is also a card-mod in the minimalist config? I suppose that would never be wise same for the mini-media-player btw.... |
Guys, apparently .gz file should be deleted. This make it working for me. Thanks to arganto from ha forum for tip. |
The copy method did not work for me but editing original .js AND renaming the .gz file did |
Did you also rename the .gz fie as I needed to that as well? |
No, I just deleted .gz file (moved to backup location), edited .js file and restarted HA. Then, cleared cache on each browser and mobile app. |
* Fix many lint warnings * Fix ALL lint warnings * small fix * type fixes
Changed it to work as a frontend module, deleted .gz file (moved to backup location), edited "card-mod.js" file and restarted HA. Then, cleared cache. Working +++ |
Feel free to ping me on discord for big things like this if discovered during the beta. Thanks to all the people debugging here, too. You were spot on! |
thanks Thomas, all the best, and stay healthy first! |
I just installed this, but it causes true upheaval in my config..... all of my nested cards are no longer using their box-shadow: none, and stack-cards really look very silly now. Probably need to find the new syntax, but I hadn't expected to be needing to adjust all of the card_mods because of this. Also, the badges that were modded fine (albeit with mod-card) now also require new mods, because somehow this doesnt look good ;-) squared background shining through there.... my theme classes are borked. and my scrolling folds no longer fold. so, all in all a rough ride this update the badges was a simple edit (posted in the community) but all others require so much work, I reverted to my previous edited resource for now until time permits..... |
im seeing the same thing/issue with shadows , any solution for it? |
suppose we need to open dedicated new issues per detail. Otherwise we wont be able to oversee things. Of course, that is assuming it is an issue, and not a matter of adapting syntax. For that we should probably hop over to the community. ( I just added something to a new issue regarding classes, which does feel like an issue. Could be wrong...) |
home-assistant/frontend#23603 will restore the removed attributes to ha-entity-marker (if approved 🤞 ) |
Yes, that would be great indeed, thanks! so much appreciated! |
I upgraded today to latest version, and even though it fixed my entities card formating and I can see the format as expected this upgrade broke the formating of my mushroom cards buttons below. See screenshot before and after card-mod update Below is the code I am using for the formating of the mushroom chips card
|
you have 2 version of card_mod.... |
I believe you should open a separate issue for the card_mod config on the mushroom card in this repo. It will get buried here. just be sure to only post a minimal failing yaml bit, and not complete cards ;-) |
Sure, makes total sense, will do as suggested. Thanks again! |
Ah, approved. Was not expecting it. |
I believe Bram just approved the PR? |
My Home Assistant version: 2025.1.0b2
My lovelace configuration method (GUI or yaml):
yaml
What I am doing:
modding an icon and its color
What I expected to happen:
the mod to be effective (as it has been for years...)
What happened instead:
nothing
Minimal steps to reproduce:
or even smaller:
there are many more mods that are not functional anymore, this is a very tight one to start investigating what has changed, I can upload more if required.
many of the others involve modding hui-generic-entity-row like this
Error messages from the browser console:
no errors at all
There has been some response in the current Beta channel onDiscord, and Bram said they changed some attributes, but that is about it for now, hope they will get back soon. (it's Christmas so sure hope everyone is well)
As far as merged PR's in Frontend, I havent been able to find any relevant change yet that could have caused this wide spread breaking changes in card_mod
Sincerely hope others can chime in and help out.
By putting an X in the boxes ([]) below, I indicate that I:
Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).
Have made sure I am using the latest version of the plugin.
Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.
Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.
The text was updated successfully, but these errors were encountered: