benct / lovelace-multiple-entity-row

Show multiple entity states and attributes on entity rows in Home Assistant's Lovelace UI
MIT License
768 stars 55 forks source link

State dependant icons (motion, door / window sensors) replaced with mdi:bookmark #330

Closed tomtom13 closed 4 months ago

tomtom13 commented 4 months ago

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

noharminthat commented 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

QRPp commented 4 months ago

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:

Core: 2024.2.0 (later 2024.2.1) Supervisor: 2024.01.1 Frontend: 20240207.0 (later 20240207.1)

tankdeer commented 4 months ago

Adding a little more context plus a visual to what others have observed.

image

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

sulimoff commented 4 months ago

Confirm, leakage sensors also began to appear as bookmarks Screenshot_20240209-181010

aredon commented 4 months ago

Very similar issue with battery status icons. They have been replaced with mdi:eye.

image

bratanon commented 4 months ago

A PR is submitted https://github.com/benct/lovelace-multiple-entity-row/pull/331

tomtom13 commented 4 months ago

Very similar issue with battery status icons. They have been replaced with mdi:eye.

image

TBH, this proves that somebody is always watching :D

zhenyatk commented 4 months ago

Some problem :(

jeremysherriff commented 4 months ago

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

ildar170975 commented 4 months ago

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.

jeremysherriff commented 4 months ago

@ildar170975 I saw your comment on the PR. Where/how did you access the obfuscated file?

ildar170975 commented 4 months ago

@jeremysherriff The obfuscated file is located in /config/www/community/lovelace-multiple-.... folder. What I did was:

  1. Remove gz-file.
  2. Open js file in a text editor.
  3. Find the place where this ".hass=${this._hass}" line should be added. Add the line (similarly like already present lines).
  4. Save, clear cache, refresh a page.

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.

QRPp commented 4 months ago

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.

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:

I hope this helps!

ildar170975 commented 4 months ago
  • in front of .overrideIcon="', '"\n, insert .hass="', '"\n and, further along the same line, change t, to t, this._hass,.

Very tricky. What I did was just adding this line: image which seems to be wrong. In fact, all these is a waste since we cannot get an updated js ))))

Oh, bingo: image Seems to be fixed )))))

jeremysherriff commented 4 months ago

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.

tomtom13 commented 4 months ago

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 ?

kineticscreen commented 4 months ago

Not seeing any activity from @benct since December...

tomtom13 commented 4 months ago

So ... is that repo dead ? Should we fork it ?

benct commented 4 months ago

I'll merge the PR and try to get a new version released as soon as possible.

tomtom13 commented 4 months ago

heeeeeeyyyy ! lost person found ! thanks a lot bud !

benct commented 4 months ago

Should be fixed with version 4.5.1.

tomtom13 commented 4 months ago

FYI - works like a charm ! Thanks again.