Gh61/lovelace-hue-like-light-card

Feature Request: Add entity_picture as a scene parameter

kwbeck opened this issue · 10 comments

Great card! Exactly what I had been looking for. Very much appreciate the work you've put into this.

One request.

Would it be possible to add an option for using an entity_picture in the scene parameters?

I have been using the method/resources below to add the Hue scene pictures to the scene entities in HA, but in HA terms, they are "entity_pictures", not icons, so aren't pulled into the Hue-Like Light Card.

https://github.com/mattmon/hue-scene-icons

Examples from my HA setup:

image

vs:

image

Nice setup here.

I've never noticed the entity_pictures attribute in scene entity.
I'll definitely add support for this as soon as possible.

I'd also like to do some "autodetection" of these images for scenes, so thank you for pointing out interesting project.

Excellent news! Thank you very much.

Will be in the next release

Updated and works like a charm! Many thanks for the (quick!) update.

image

@kwbeck May I ask how you got the scenes to have icons? Did you have to manually do that?

Not purely manual, but it does involve a few steps. Here's the background:

I had found a link to a "hue-scene-icons" project on GitHub that enables this for HA generally, and was using it, but at the time the lovelace-hue-like-light-card didn't support the necessary "entity_picture" attribute.

I then suggested to @Gh61 that he add support for the entity_picture attribute so that this card could support the scene icons. He (very quickly) added that functionality in the latest release. (Thanks again!)

Check the "Scene Configuration" section in his README file (screenshot below). He links to that "hue-scene-icons" project which provides the icons and the instructions to add them as a global customization to HA.

Once this is done, the icons (FYI, they are actually "entity_picture" pictures in HA terms, not true icons) will appear in both the HA Scene entity entries as well as in this card.

FWIW, my experience was that to get this to work, I needed to reboot HA after downloading/installing the pictures and manually clear cached images in my browser.

Screenshot:

image

@kwbeck Hey! I was able to follow those instructions but after running the hue_scene_selector.yaml automations, my scenes are just blank icons:

image

I have tried to reboot HA, My RPi, and try in incognito. Any suggestions?

I think it might be the case that you forgot to upload the images to your RPi, or they are not in the correct directory.
If you set the customize_glob to this

scene.*read:
  entity_picture: /local/hue_scene_icons/read.png

You have to upload the file read.png into the /homeassistant/www/hue_scene_icons directory.

@Greenphlem, I think @Gh61 's comment is the most likely solution to the problem you're seeing, but if not, then try manually clearing cached images in your browser. That's what solved the problem for me.

Yep, you're both right! I had it in /www/community because that where all the HACS stuff was. I edited my YAML to point there and it's all working now. Thank you both <3

image