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.
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.
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.
even thought they have batterly_level attribute.
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
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
thank you for suggestion.
Hey @codechimp.
First, youĀ“ve doing a damn good job with your integration, it make something easier for me. But, i donĀ“t know if i making a mistake or the integration doesnĀ“t work correctly ā¦
I`ve many HM-IP devices, and as you know they donĀ“t show the voltage in percent. Yeah, i know, i can use the low_bat entity but i donĀ“t want that ;o) A while back iĀ“ve found a solution somewhere in the web to calculate the percentage from the voltage.
The MAX bat-level voltage for the HM-IP devices are 3 volt. So iām using this template to convert the voltage:
{{ ((states(āsensor.climate_flur_eg_battery_levelā)|float(0) - 2.2) / ((3 - 2.2) / 100))|round(0) }}
2.2 volt is the level that is reported in raspberrymatic as a low battery level.
In my example the radiator bat level voltage is 2.8 V. IĀ“m pasting the template in the template editor and it shows me this:
But in your integration it shows me this:
Explanation: If iĀ“m using a template it doesnĀ“t show me the ābattery_plusā entity. For other devices where i donĀ“t use a template, everything is working correctly
This is by design the Battery Plus will only appear on devices with a āproperā battery percentage, not the levels since different devices implement this very differently, from voltages, boolean, strings and also the entity names vary as well making the config very complex.
I havenāt found a solution I like for this yet, so hence thereās no battery plus shown.
Thanks for the fast answer. I understand that, but isnāt a value transferred that Battery Plus can process? The integration receives a valid percentage value. IĀ“m not a coder nor a mathematik genie, but isnāt that basically the same principle?
For Battery Notes to determine a battery plus it has to look at the available entities and determine if any meet the criteria (itās device class is battery and unit of measurement is a percentage).
The template you created isnāt part of the device, itās an associated entity, much like the battery notes entities themselves so Battery Notes wonāt find it.
Ahhh all right, now Iāve understood Then I have to continue using my sensor templates for the HM-IP devices for the percentage.
Thanks for the answer and keep up the good work