Closed tomtom13 closed 4 months ago
I have the same issue with cover entities. The issue started occurring for me immediately upon upgrading to Core 2024.2.0.
Core 2024.2.0 Supervisor 2024.01.1 Operating System 11.4 Frontend 20240207.0
Same (or similar) here. Started once updated to HA 2024.2.0 from 2024.1.6. Same with HA 2024.2.1 also.
In more detail as per what I observe:
multiple-entity-row
configuration (then correctly shown).multiple-entity-row
, affecting only their listed entities, i.e., entities: [{ entity: sensor.foo; icon: true; }]
. Wrong icons are shown for the latter even when the same entity is also the primary entity of same row, i.e., the icon is correct at the start of the row but wrong later on the same row.multiple-entity-row
(bar the above exceptions) currently show up as mdi:eye
at the moment, same as all my switches and binary sensors there (ditto) show up as mdi:bookmark
.mdi:eye
for sensors) or mdi:bookmark
for domains with no icon. What appears somehow ignored is the icon that depends on the device class of the entity.Core: 2024.2.0 (later 2024.2.1) Supervisor: 2024.01.1 Frontend: 20240207.0 (later 20240207.1)
Adding a little more context plus a visual to what others have observed.
Here you can see a mix and match of icons that show properly, and ones that don't. I hadn't fully figured out the pattern until the previous post. To add to what was mentioned before, with the exception of the window, all of the correctly showing icons in my case are template sensors. The icon changes based on state. The window is a normal Z-wave contact sensor set to show as window
Confirm, leakage sensors also began to appear as bookmarks
Very similar issue with battery status icons. They have been replaced with mdi:eye.
A PR is submitted https://github.com/benct/lovelace-multiple-entity-row/pull/331
Very similar issue with battery status icons. They have been replaced with mdi:eye.
TBH, this proves that somebody is always watching :D
Some problem :(
Is there a way to test this while waiting for the PR to be merged? I can't find the patched file (index.js
) in my local filesystem
Tested it locally (made changes in an obfuscated js file by myself) with no success.
Do not think the added ".hass=${this._hass}
" line helps, the changed ha-state-icon
object seems to be needed here.
But ofc we should wait for a feedback from the author of the PR.
@ildar170975 I saw your comment on the PR. Where/how did you access the obfuscated file?
@jeremysherriff The obfuscated file is located in /config/www/community/lovelace-multiple-.... folder. What I did was:
.hass=${this._hass}
" line should be added. Add the line (similarly like already present lines).Have to do this "brute" update since did not have the generated updated js-file. But later after reading Dev blog started to doubt about a correctness of added change.
Tested it locally (made changes in an obfuscated js file by myself) with no success. Do not think the added "
.hass=${this._hass}
" line helps, the changedha-state-icon
object seems to be needed here. But ofc we should wait for a feedback from the author of the PR.
I've also tested the proposed fix locally by overriding the code directly using Chrome dev tools, and it surely fixes the problem as it should. The ha-state-icon
component is already in use, just not directly but wrapped via state-badge
, so to speak. Responded to the PR comment too.
How to:
multiple-entity-row
in Google Chrome, open dev tools.renderIcon
to find the snippet:
key: "renderIcon",
value: function(t, e) {
return H(ye || (ye = we(['<state-badge\n [...]
.overrideIcon="', '"\n
, insert .hass="', '"\n
and, further along the same line, change t,
to t, this._hass,
. Be careful with all those commas and quote marks etc, the code editor wants to “help”, which here may be counter-productive.I hope this helps!
- in front of
.overrideIcon="', '"\n
, insert.hass="', '"\n
and, further along the same line, changet,
tot, this._hass,
.
Very tricky.
What I did was just adding this line:
which seems to be wrong.
In fact, all these is a waste since we cannot get an updated js ))))
Oh, bingo:
Seems to be fixed )))))
Order is important, as this is messing with concatenation of text strings within a function. Adding a text version for easier copy/paste, and pointers to the location of the edits. I actually edited the file in the HA filesystem, but forcing the browser to flush the original file from cache was harder than it should have been, so I recommend using the local override file as described above.
Relevant part of original line:
<state-badge\n class="icon-small"\n .stateObj="','"\n .overrideIcon="','"\n .stateColor="','"\n ></state-badge>'])),t,!0===e.icon
Alter to:
<state-badge\n class="icon-small"\n .stateObj="','"\n .hass="','"\n .overrideIcon="','"\n .stateColor="','"\n ></state-badge>'])),t,this._hass,!0===e.icon
---------------------------------------------------------------------------------------^^^^^^^^^^^^^---------------------------------------------------------------------------------------------^^^^^^^^^^^
If you do use a local override file, you'll need to remember to remove that override once the update has been released.
I think I might be not the only person wondering, BUT assuming that this PR would be berged this very instant - how quickly we would be blessed with a release that includes it ?
Not seeing any activity from @benct since December...
So ... is that repo dead ? Should we fork it ?
I'll merge the PR and try to get a new version released as soon as possible.
heeeeeeyyyy ! lost person found ! thanks a lot bud !
Should be fixed with version 4.5.1
.
FYI - works like a charm ! Thanks again.
Hi, after most recent update to HASS, the icons for stuff that has icon dependant of it's state (motion sensors / window & door sensors) stoped showing appropriate icons and shows mdi:bookmark. Saying that the state colour works.
Current system info: Core 2024.2.0 Supervisor 2024.01.1 Operating System 11.5 Frontend 20240207.0