[Custom Component] Battery Notes

Hi, for 2 you can use the event data to know what battery type/quantity was used
If you look at this example you can see there are data elements for the type and quantity and you would have to work out your appropriate input_number based on the {{ trigger.event.data.battery_type }}
1 is more tricky as you would have to create an automation for each battery note device on the button press, I think this would be more effort than it was worth to achieve this.

1 Like

Yeah, thank you, I understand your suggestion, and will try to do that (for option 2). Although I think that this may fail, because sometimes battery values are not consistent.
Early this morning I had a sensor reporting 10%, and after a few hours returned to 50%, without battery changingā€¦
Would it be possible to include in your integration an event ā€˜battery_replacedā€™, triggered by the button press, with the same attributes?
Thanks!!!

That should be possible to add by both the button and the action. Iā€™ll look into it, thanks for the suggestion.

1 Like

Hello,
I checked many threads referring to your integration but was not able to trace solution to what I encounter. I have multiple fibaro battery devices managed through fibaro integration and none of these devices is detected as battery device. I can add them manually but as a result they only have 3 information in diagnostic. there is no battery level or battery + sensor.
image
even thought they have batterly_level attribute.
image
Iā€™m not sure where to look for solution. As no one is mentioning fibaro anywhere Iā€™m getting to conclusion that issue is due to my devices being added through a fibaro integration not somehow directly.

Hi guys,
How do you track none-Home Assistant devices? I would love to use Battery Notes to track ā€œvirtualā€ devices such as car keys, TV remote etc

That does not even make sense. How do you track something in HA that is not tracked in HA???

Just saying we have to be realistic about what can be done here.

I meant adding such devices as virtual entities in HA that donā€™t do much other than the ability to track battery changes. Itā€™s like creating a virtual device that represents these devices which wouldnā€™t actually control in HA.

The battery plus and battery low indicators will only show if Battery Notes can detect a battery, it would seem the Fibaro devices donā€™t present a proper battery so thereā€™s little I can do about these ones Iā€™m afraid.

This isnā€™t something Battery Notes will do but if someone were to create a virtual device integration for setting these up thereā€™s no reason you couldnā€™t add a battery note to it.
Fairly simple integration to write but Iā€™m afraid Iā€™m not interested in developing it myself.

Hello,

Thank you for reply. I just wonder if there is battery_level attribute of the device present maybe it would be somehow possible for your integration to detect such device as battery device ?
as I mentioned all these devices have this attribute and value assign so following other instances at least sensor.device_battery_level could be created :slight_smile:

Batteries should have the appropriate device class and unit of measurement to be a proper battery, I cannot start adding exceptions for devices that donā€™t implement batteries properly.

entity.device_class == SensorDeviceClass.BATTERY
and entity.unit_of_measurement == PERCENTAGE

You can implement the battery low sensor with a template like this

Hello,

fair enough :slight_smile:

thank you for suggestion.