brands icon indicating copy to clipboard operation
brands copied to clipboard

Multiple brand Icons not loading

Open HarvsG opened this issue 1 year ago • 11 comments

The problem

image

image

But the images are located at: https://brands.home-assistant.io/brands/_/raspberry_pi/icon.png not https://brands.home-assistant.io/brands/_/raspberry/icon.png

https://github.com/home-assistant/core/blob/e7b550685e451f830ebb1069c720c73381e6befb/homeassistant/generated/integrations.json#L3489

What version of Home Assistant Core has the issue?

2022.10.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

raspberrypi

Link to integration documentation on our website

https://www.home-assistant.io/installation/raspberrypi/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

Also an issue with multiple others: SensorPush image

image

Smart Meter Texas

image

image

HarvsG avatar Oct 08 '22 10:10 HarvsG

Moving this issue into the issue tracker right repository

frenck avatar Oct 08 '22 10:10 frenck

OK. I put on core because I think the fix is likely renaming https://github.com/home-assistant/core/blob/dev/homeassistant/brands/raspberry.json to https://github.com/home-assistant/core/blob/dev/homeassistant/brands/raspberry_pi.json

HarvsG avatar Oct 08 '22 10:10 HarvsG

its brand image related, so the issue should be here, not core.

frenck avatar Oct 08 '22 10:10 frenck

I wonder if it would be possible to write a test that detects issues like this, might be helpful with a lot of upcoming brand re-organisation.

HarvsG avatar Oct 08 '22 11:10 HarvsG

devolo: recently added to brands folder in this repo, should be fixed soon.

locative: Completely missing from this repo.

smart_meter_texas: this has a logo, but no icon. They have no square logo variation, so the only option to create an icon is to extend the logo to be a square, and shrink to icon size. This is what other brands like Panasonic have done.

sensorpush: This has a logo and no icon. The logo is square looks like it is the correct size for an icon, so this looks liike the files were accidentally named wrong.

For Raspberry PI specifically, the cause is arguably the brand file violating the rules. Per https://developers.home-assistant.io/docs/creating_integration_brand/#domain the value in domain must match the file name. Currently the file is named raspberry.json and specifies raspberry_pi as the domain. Hassfess ignores the contents of the domain field, and uses the filename for generating the integrations list. (It should probably at least verify the domain matches file name rule.)

The image name as present in this repository's brands folder is raspberry_pi (matching the domain field, but not the brand json filename).

Fixing it over here would require symlinking core_brands/raspberry to core_brands/raspberry_pi (or moving core_brands/raspberry_pi, and updating a bunch of symlinks).

KevinCathcart avatar Oct 12 '22 18:10 KevinCathcart

@KevinCathcart This issue was about the raspberry pi branding, not sure what all others have to do with that.

frenck avatar Oct 12 '22 19:10 frenck

@frenck

The issue title is "Multiple brand Icons not loading", and issue body also lists sensorpush, and smart_meter_texas as additional examples. I also noticed the other two, and mentioned the status of them. All obviously should get addressed eventually, even though they could reasonably be broken out to separate issues.

KevinCathcart avatar Oct 12 '22 21:10 KevinCathcart

Some are not broken... missing/not provided icons is not a bug. And yes, it should have been broken out probably, but the report is made against the raspberry pi, as per form that has been filled out.

frenck avatar Oct 12 '22 21:10 frenck

Missing icons are not a bug, but they are an "issue" (in the sense of something that ideally ought to get addressed at some point). It is never intentional nor desirable for users to come across missing or broken images for built-in brands or integrations. It is something that does happen from time to time, but something the project does strive to avoid, hence things like the pull request templates suggesting that all new integrations create a pull request over here in brands to provide an icon and logo, or at least a link if a suitable icon for the brand is already available.

One should not blindly take the integration name and link fields that somebody types in the bug report as accurately limiting the scope of a bug report. People get those fields wrong all the time. It is always better to read the title and details of a bug report to accurately determine the scope. Here the full text of the issue provided seems to indicate to me that the poster is concerned about all of these, and has dug into one (Raspberry Pi) as a hopefully representative example, (although it appears that in actuality it is not so representative).

KevinCathcart avatar Oct 13 '22 03:10 KevinCathcart

Sorry, maybe I didn't got across in my previous message, let me try again:

Missing icons are not bugs. Feel free to contribute them if you like, but it is not broken.

The image shown is a fallback by design. Again: a missing icon is not a bug.

The raspberry pi case is valid, for which this issue was filed. Those icons are there an not shown. Smart meter taxes: nope, not a bug.

Thanks.

../Frenck

frenck avatar Oct 13 '22 05:10 frenck

Yes I originally opened the PR against raspberry pi in main because I spotted the rapsberry Vs raspberry_pi naming issue, which IMO is due to an error in folder name in core.

Then Frenk moved the issue here so I widened the scope to include all the missing brands I could find instead of opening many issues. Sorry if that has caused confusion.

HarvsG avatar Oct 13 '22 09:10 HarvsG