Device icon with multiple integrations associated

I recently added a custom integration called Battery Notes which enhances battery functionality which is great.

You need to add an existing device to the battery notes integration and then both integrations are associated with a device. What I noticed is that Home Assistant seems to choose the order of the integrations associated at random. For one device it is MQTT then battery notes and for another it is battery notes and then MQTT.

The annoying thing is that in the device list it also picks the device icon based on the first mentioned integration which is super annoying as now I have a wild mix of icons and it makes it harder to quickly identify which integration a device belongs to.

Is there any way to tell HA which is the leading / primary / first integration?

Yeah. I have that too. Not sure what to do about it. I have not seen anything like you are asking for. I just resigned myself to the fact that it is what it is.

So sorry for posting a completely NON answer.

1 Like

How much more does that give you than just using the (excellent) autoentities plugin

Here is some code

type: custom:auto-entities
card:
  type: entities
  title: All Batteries
  state_color: true
filter:
  include:
    - entity_id: '*battery*'
  exclude:
    - entity_id: '*phone_battery_state*'
sort:
  method: state
  numeric: true

Not sure if I understand the question correctly but I think you wanna know what the benefits of the integration are?

For one you can tigger automations by events if eg a battery goes under a certain percentage and eg create a persistent notification and dismiss it if the battery is replaced. I can also see for each device what batteries it uses and I can track when I have replaced the batteries and much more. Just check out the documentation

1 Like