HA Core 2025.1 entities card mod styling broken

I don’t defend, I explain.
Been there, done that as a core dev on a project of millions of users.

Betas are there for integrations/add-ons/plugins maintainers to test their code if they care.

Agreed. This is how it is supposed to work - in a perfect world.
But in reality we have a bit different situation & both sides should understand each other.
Anyway, THIS particular “card-mod broken situation” was luckily solved.

Hi.
The problem is solved? Please, how?

You have already found it)
For other people - main card-mod thread.

Well, the renderEntity hack don’t work for me.
I edited www/community/lovelace-card-mod/card-mod.js, changed renderEntity to _renderEntity, just one occurence found.
Edited file was just one byte larger than original, which sounds right.
Cleared cache, tryed with different browsers, no luck. Following very important piece of code for me not working.
Nor color, nor height of row are changed. Is it hopeless?

type: entities
card_mod:
  style:
    .: |
      ha-card {
        background: #d2d2d2;
        border-top-left-radius: 0px !important;
        border-color: transparent !important;
      }
entities:
  - entity: sensor.trv_dkuhinja_hybrid_state
    name: Donja kuhinja
    tap_action:
      entity: sensor.trv_dkuhinja_temperature
      action: more-info
    double_tap_action:
      entity: sensor.trv_donji_stan
      action: more-info
    hold_action:
      entity: climate.trv_dkuhinja
      action: more-info
    card_mod:
      style: >-
        * {height: 16px; border-bottom: solid 1px rgba(255, 255, 255, 0.5); color: {% if is_state('sensor.trv_dkuhinja_hvac_action','heating') %}maroon{% elif is_state('sensor.trv_dkuhinja_hvac_action','idle') %}navy{% else %}gray{% endif %};}
  - entity: sensor.trv_dsoba_hybrid_state
    name: Donja soba
    tap_action:
      entity: sensor.trv_dsoba_temperature
      action: more-info
    double_tap_action:
      entity: sensor.trv_donji_stan
      action: more-info
    hold_action:
      entity: climate.trv_dsoba
      action: more-info
    card_mod:
      style: >-
        * {height: 16px; border-bottom: solid 1px rgba(255, 255, 255, 0.5); color: {% if is_state('sensor.trv_dsoba_hvac_action','heating') %}maroon{% elif is_state('sensor.trv_dsoba_hvac_action','idle') %}navy{% else %}gray{% endif %}; }

Did you delete or rename the gz file as well? At least, it is not in the list what you have done.

2 Likes

Whoops, I didn’t. I’ll try right now!

Same problem here, I’m searching for a solution also.

@arganto
You are the genius!
Thank you very, very much!

  1. replace rednerEntity to _renderEntity in www/community/lovelace-card-mod/card-mod.js
  2. remove card-mod.js.gz
    This is working solution olso for me! Thanks a lot

Mine was already _renderEntity inside card_mod.js and I removed card_mod.js.gz but no luck.

Did you update to 3.5.0 from HACS couple hours ago?
If you did, you have version which fixed some problems, but introduces some new.
Take look on posts arround this one: link to main thread

Hmm noticed now that I do have 3.5.0, might be from there I started to notice some “issue” with the coloring. Thanks I will see the other forum for updates.

I personally use card-mod a lot, somehow none of my customizations broke with this update.

So, I understand the frustration from people here when a very popular extension breaks in a new release. However I must agree with @koying and @Edwin_D, we can’t expect the core devs to fix and ensure compatibility of new releases with third party tools, the only thing they could have done better was maybe raise a breaking change in the changelog for how the card is rendered.

Who is responsible to ensure the third party tools don’t break are the third party tools developers themselves. If you develop an extension for something, you should have your own tests that cover all possible scenarios and these tests should be executed every time a new beta of the main core is available so you then have time to act upon it and fix your extension before final core release.

I had the big issue with Card-mod v3.5.0. I fixed the problem:

  1. Uninstall all Card-mod v3.5.0.
  2. Restart HA.
  3. Install Card-mod v3.4.5.
    After this steps I got back all card-mod functions.
1 Like

I have the same problem with car-mod after update core to 2025.1. But after update car-mod to latest 3.4.4 (released 7 hours ago), everything is OK, but only when using browser (Safari in my case). In case of using HA app on iOS, problem still lasts…

Did you clear cache of the mobile app?
I know do that for android… Settings->Apps-Home Assistant->Storage->Clear cache
Should be something similar for IOS.

Thanks, this helped me!

I had the same problem after core update but uninstalling and reinstalling of Card-Mod solved the problem.

2 Likes

Worked for most of my cards as well!