alexander-vitishchenko / hc3-to-mqtt

Fibaro HC3 integration with Home Assistant & NodeRed
MIT License
31 stars 13 forks source link

Duplicate battery entities for each device #41

Closed rico0260 closed 1 year ago

rico0260 commented 1 year ago

I have the impression that for each device on battery, a new battery entity is created for each child entity. Shouldn't we create a battery entity linked to the parent, to no longer have multiple battery entities for each device?

alexander-vitishchenko commented 1 year ago

Hi @rico0260,

Yes, Fibaro device model is exactly like you described => the battery interface is assigned to each child device, and not exposed as a single sensor for a physical device.

The QuickApp goal is to rely on Fibaro device model, not invent a replacement for what Fibaro does. This is why multiple battery sensors created in Home Assistant.

This looks like a usability/aesthetics issue, not as a functional defect, with several solutions possible:

  1. Contact Fibaro team and ask if they can implement a single battery sensor per physical device, not getting a battery interface assigned to each child device
  2. Hide "extra" battery sensors in Home Assistant using built-in Configuration UI
  3. I can implement the heuristic algorithm to identify potential battery sensor duplicates within a physical device, but does it worth the effort...? Let me know
MomosX commented 1 year ago

Hi,

Here is a Fibaro Motion sensor - exposed devicesin Fibaro are Motion and Lux, rest are hidden. image

as it should , the motion has a battery sensor.

image The Lux does not.

Can you please post some pics of the setup of that device in Fibaro and what goes in HA ?

rico0260 commented 1 year ago

Hello, that would be perfect, but for the moment it's not worth it, because there are other more important things to settle.

alexander-vitishchenko commented 1 year ago

Then we close the issue for now