Closed lboue closed 5 years ago
This is correct. You must also implement the corresponding functions in getFunctions.ts.
I have a working solution for this, expect a PR shortly https://github.com/hovorkap/homebridge-Fibaro-HC2/pull/2
Fixed by PR #150.
Hello,
Could you tell me how to add the hapService.BatteryService service to the accessory in the createShadowAccessory method? The goal is to expose Battery Level
homebridge-mi-aqara I found an implementation example here with the homebridge-mi-aqara plugin and the SmokeDetectorParser.js class
homebridge-hue example https://github.com/ebaauw/homebridge-hue/blob/314719ea2771381289b65c828471646e085a5663/lib/HueAccessory.js#L292
Can you confirm it should be declared like this?
new ShadowService(new hapService.BatteryService(device.name), [hapCharacteristic.StatusLowBattery, hapCharacteristic.BatteryLevel, hapCharacteristic.ChargingState])
Regards