hap-java / HAP-Java

Java implementation of the HomeKit Accessory Protocol
MIT License
155 stars 82 forks source link

Add support for battery status indicator in accessories (in percentage) #164

Closed JacekKac closed 2 years ago

JacekKac commented 2 years ago

It will be good to show full battery status in % not only a warning using LowBattery switch.

yfre commented 2 years ago

this is already support with "Battery Service" here is the characteristic for % https://github.com/hap-java/HAP-Java/blob/master/src/main/java/io/github/hapjava/characteristics/impl/battery/BatteryLevelCharacteristic.java

JacekKac commented 2 years ago

hm... can you tell me how to use in in openhab homekit binding?did't now where to submit this issue :(

yfre commented 2 years ago

you can submit this kind request directly at openhab addon https://github.com/openhab/openhab-addons

but support for battery service is already implemented and will be available in the next openhab release 3.3, in around 2-3 weeks

yfre commented 2 years ago

check the documentation for latest snapshot https://next.openhab.org/addons/integrations/homekit/ the battery service is already there

JacekKac commented 2 years ago

ok! but i thought it will be implemented at the accessorie level : TemperatureSensor.BatteryLevel and home app will show it in accessory details or maybe you ment xxx .BatteryLowStatus which i already implemented. The case is i have battery powered temperature sensors, with TemperatureSensor.BatteryLow which is working fine, but i want to have detailed information about % of battery in TemperatureSensor details. (i saw on screens from homeapp that this is possible

JacekKac commented 2 years ago

oh! should i use multiple tags on one accessory to achieve this ?