One device, multiple integrations

Today I noticed something new that does not currently make sense to me. Some devices have entities apparently originating from more than one integration.

For example: I have an esphome device that has additional entities from the Fritz!Box integration (my wifi internet router). The additional entities are a device tracker as well as a switch to turn internet access on or off for the esphome module.

How does HA know how to combine the entities from the different integrations into one device? I’m not complaining about this, it’s just that I’m wondering how HA is able to make the connection, because I did not set this up manually.

The same also happens for a couple of Wifi switches I have set up with Tasmota.

4 Likes

+1 here. I see devices with entities from Sonos and Ubiquiti. Would like to extend on this capability to join integrations.

1 Like

I find that a little confusing as well. Many devices have infos from multiple integrations because I use UniFi and Fritz!Box.

It seems to see one as the dominating integration, though and displays it’s logo and device informations. I’d expect to see both here:

Also disabling one of the integrations (Fritz in my case) seems to disable the whole device which is not what I’d expect either.

1 Like

FWIW, this is based on devices being merged together based on (sort of free-form) identifiers, as explained here. They’re essentially arbitrary strings, and if two extensions use e.g. serial number as an identifier, they’ll be smooshed together.

Additionally, there’s the connections field, which will match devices together if they have the same MAC address (which is sort of logical), as well as UPnP and ZigBee, if I’m reading this correctly, although you can also be creative and define your own connections that other integrations may pick up; meaning if you’re providing an integration for e.g “My Funky 433 MHz remote control network” and define a clever name for the connection attribute, other integrations can piggyback onto that device to offer a more coherent experience.

Of course, it shouldn’t happen that manipulating one integration has effects on the other, but the UI seems to be less than ideal for handling multiple integrations offering the ‘same’ information; as above experienced, the logo of what’s actually being used. Should ideally be evaluated as a badge-y thing that shows all integration badges, but I digress.

2 Likes

Thank you for the explanation.

Joining the devices is not a bad idea. I actually like that HA now joins all the connectivity data from my router. It was just confusing to me when it was introduced. I think with the recent release they also improved this feature a bit. Now the logo for the device is again the logo of the “main” integration.

It’s still a bit unfortunate though, that you very often can’t tell from entity_id which integration created it.

1 Like

All my ESPHome devices also show as Fritz!box device which is fine with me. But the logo shown for the ESPHome devices in a device list is either ESPHome or Fritz!box. And which of the two shows seems to change with a restart, as if it depends on a race at start-up.

Does not seem to cause any problems, defeats the purpose of using the logos to some extend, but disturbing for my OCD.

1 Like

Agreed. It would be nice if one could be chosen as the “primary”

1 Like

I felt the same, I have created a feature request similar to this. If you think its a good idea, vote and discuss there.

Thanks.