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

Feature Request: Add entity_picture as a scene parameter #126

Closed
kwbeck opened this issue Nov 28, 2023 · 11 comments
Closed

Feature Request: Add entity_picture as a scene parameter #126

kwbeck opened this issue Nov 28, 2023 · 11 comments
Labels
inspiration This issue contains come inspiration for future features

Comments

@kwbeck
Copy link

kwbeck commented Nov 28, 2023

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

@Gh61
Copy link
Owner

Gh61 commented Nov 28, 2023

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.

@kwbeck
Copy link
Author

kwbeck commented Nov 28, 2023

Excellent news! Thank you very much.

@Gh61 Gh61 added this to the v 1.6.0 - Last 2023 release milestone Nov 28, 2023
@Gh61 Gh61 added the inspiration This issue contains come inspiration for future features label Dec 2, 2023
Gh61 added a commit that referenced this issue Dec 3, 2023
Gh61 added a commit that referenced this issue Dec 3, 2023
Gh61 added a commit that referenced this issue Dec 3, 2023
@Gh61
Copy link
Owner

Gh61 commented Dec 3, 2023

Will be in the next release

@Gh61 Gh61 closed this as completed Dec 3, 2023
@kwbeck
Copy link
Author

kwbeck commented Dec 4, 2023

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

image

@Greenphlem
Copy link

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

@kwbeck
Copy link
Author

kwbeck commented Dec 4, 2023

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

@Greenphlem
Copy link

@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?

@Gh61
Copy link
Owner

Gh61 commented Dec 19, 2023

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.

@kwbeck
Copy link
Author

kwbeck commented Dec 19, 2023

@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.

@Greenphlem
Copy link

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

@RedwoodNL
Copy link

I feel like a total n00b again.
What exactly did you do to get the images? I'm missing the steps.
Do i need to add a customize.glob file and put code into it?

Thanks

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inspiration This issue contains come inspiration for future features
Projects
None yet
Development

No branches or pull requests

4 participants