Skip to content
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

Newer HA icons are not displayed (replaced with a check) #456

Closed
2 tasks done
domneedham opened this issue Mar 7, 2022 · 12 comments
Closed
2 tasks done

Newer HA icons are not displayed (replaced with a check) #456

domneedham opened this issue Mar 7, 2022 · 12 comments
Labels
bug Something isn't working

Comments

@domneedham
Copy link

Checklist:

  • I updated to the latest version available
  • I cleared the cache of my browser

Release with the issue:
v3.0.2

Last working release (if known):
(I think HA icon update broke it?)

Browser and Operating System:
iOS, macOS, Firefox, Chrome

Description of problem:
When using frigate-card-menu-state-icon, the new person motion sensor icon does not display correctly. It is replaced by a default check icon for a binary sensor.

image

In this image, the first check is a person motion sensor and the other is related to the 'music-note' icon.

Javascript errors shown in the web inspector (if applicable):
None

Additional information:

@domneedham domneedham added the bug Something isn't working label Mar 7, 2022
@dermotduffy
Copy link
Owner

Not quite following this. My motion sensors are showing as as the "walking human" icon -- would you mind including your config, and perhaps a screenshot of what you expected to show up? Did this work in a prior version

(I think HA icon update broke it?)

I'm not aware about this -- mind saying a bit more?

@dermotduffy dermotduffy added this to the v3.0.0 milestone Mar 8, 2022
@domneedham
Copy link
Author

domneedham commented Mar 8, 2022

Hmm strange. I also expect the "walking human" icon to show, but as per screenshot above, it doesn't. It only seems to be the icons that got an update in some HA release not too long ago. My yaml for the config (changed camera name):

type: custom:frigate-card
cameras:
  - camera_entity: camera.1
    title: 1 Substream
    id: sub
    live_provider: webrtc-card
    webrtc_card:
      entity: camera.1_substream
  - camera_entity: camera.2
    title: 2 Mainstream
    id: main
    live_provider: webrtc-card
    webrtc_card:
      entity: camera.2_mainstream
menu:
  mode: below
  buttons:
    image: false
    clips: true
    download: true
    frigate: false
    live: true
    snapshots: false
    frigate_ui: false
event_viewer:
  controls:
    next_previous:
      style: thumbnails
dimensions:
  aspect_ratio_mode: dynamic
live:
  controls:
    next_previous:
      style: none
    draggable: false
    # thumbnails:
    #   mode: below
    #   media: clips
view:
  default: live
elements:
  - type: custom:frigate-card-menu-state-icon
    entity: binary_sensor.1_person_motion
    tap_action:
      action: more-info
  - type: custom:frigate-card-menu-state-icon
    entity: binary_sensor.1_dog_motion
    tap_action:
      action: more-info
  - type: custom:frigate-card-menu-state-icon
    entity: binary_sensor.dog_barking
    tap_action:
      action: more-info
  - type: custom:frigate-card-menu-submenu
    icon: mdi:bell
    items:
      - entity: input_boolean.notify_1_camera_if_one_person_home
        tap_action:
          action: more-info
      - entity: input_boolean.notify_1_camera_if_both_home
        tap_action:
          action: more-info
      - entity: input_boolean.notify_1_camera_if_away
        tap_action:
          action: more-info

I am referring to when they updated the mdi icon set (it was in a release note - I just can't remember which :)). To be honest, it has been off a while, I should have raised the issue sooner than now. It wasn't a frigate card update that broke.

If it helps, I know the mushroom cards had the same issue and they released a fix (piitaya/lovelace-mushroom#147).

@dermotduffy
Copy link
Owner

What device do those binary_sensors belong to? (Are they frigate entities, or something else?)

If it helps, I know the mushroom cards had the same issue and they released a fix (piitaya/lovelace-mushroom#147).

That really helps! As in that change, I am using the custom-card-helpers that provides the functionality to map entity domain to icon. The fix applied there is to copy/re-implement that logic, which is not super attractive though ...

@domneedham
Copy link
Author

They belong to the same camera used in the configuration. As per the screenshot, the dog icon only shows as I changed that from the default.

As for fix, yeah I thought the same thing, shame HA don't expose that logic without copying it or need of another custom card..

@dermotduffy
Copy link
Owner

dermotduffy commented Mar 11, 2022

What I can't figure out is how come it works for me ... if I attach a binary sensor, from a Frigate camera, here's what I get (icon on the end):

Screenshot from 2022-03-10 18-48-40

elements:
  - type: custom:frigate-card-menu-state-icon
    entity: binary_sensor.office_person_motion
    tap_action:
      action: toggle

That is the raw entity, no icon customizations applied at the HA level.

What version of the HA are you using?

@domneedham
Copy link
Author

Yeah is very strange.

I am using HA latest (2022.3.3?) and running on docker.

@dermotduffy
Copy link
Owner

@domneedham Do you have any icon related integrations, or relevant custom frontend resources, that might influence this?

Anyone else reading this: Seeking more people who can confirm they have this problem. If that describes you, please chime in!

@domneedham
Copy link
Author

Not that I know of. No icon packs or anything of the sorts. The issue that describes my exact problem is seen at custom-cards/custom-card-helpers#57.

@peledzius
Copy link

Just encountered this too:

elements:
  - type: custom:frigate-card-menu-state-icon
    entity: binary_sensor.main_door

image

I'm still on HA 2022.2 though.

@peledzius
Copy link

peledzius commented Mar 27, 2022

Found out that it doesn't show check mark when entity icon is customized manually.

image

image

@dermotduffy
Copy link
Owner

"Good news": I have also started encountering this. Still don't know why, but at least I have a test case. I imagine my solution is going to be similar to mushroom card 'duplication' solution -- as it doesn't seem like the pace of commits / PRs on custom-card-helpers is particularly high so waiting for that might be too long a wait.

And yes, I think manually overriding the icon can be a workaround in the meantime.

@dermotduffy
Copy link
Owner

Fixed, will be in the v4.0.0 build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants