-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add logic to find best device domain match + show correct brand logo #14762
Conversation
FYI, there is a long relevant discussion about these icons in #14184 (comment). The issue author wrote that the expectation would be that the brand icon be that of the device manufacturer, which I agree with. Does this change accomplish that? |
Haven't seen this discussion yet and it seems to be a long one... Yes, this PR would make sure that if a device is covered by multiple integrations, the one matching the manufacturer is chosen for the icon. Currently, that is not the case, e.g. I have some Shelly plugs that are of course part of the Shelly integration but the same devices are also linked to the AVM Fritz!Box integration which comes from my router which also detected those plugs in the network and tracks them. So one device covered by two integrations and currently it is more or less random which icon is shown. As the manufacturer is Shelly all should show Shelly, but for some the AVM icon is shown since for some that integration is randomly sorted in the first place (I think it depends on the GUIDs assigned to the configuration entries). So with this PR we should (at least most of the time) show the correct brand icon matching the manufacturer. |
If I'm reading the code correctly, this is only able to pick the manufacturer's icon if the device happens to also be included by a manufacturer-aligned integration. But that would leave out several common situations. For example, I have several Zooz devices integrated via Z-Wave JS that will still show the Z-Wave icon instead of Zooz. Or I have a Honeywell thermostat integrated via Homekit controller that will still show the Homekit icon. |
I don't like this, I think integrations should give us some info about what kind of integration it is, so we can prioritize better. |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
There is now a new arch discussion about enhancing the backend to provide that reliable information: home-assistant/architecture#936 |
Breaking change
Proposed change
Try to determine the "most correct" domain that should therefore be used to display the brands icon.
Both domain and integration names are used, since the manufacturer name does not necessarily match directly the domain, but it might the more user friendly name.
On the device page, we do not yet have the integration names available, although I could of course add a look-up here as well, so we have exactly the same logic int he device dashboard and the device info page.
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: