It might differ from the individual battery condition on bikes with multiple batteries.
const onBatteryStateChange = (value: BatteryCondition, timestamp?: Date) => {
console.log(value, timestamp);
};
COBI.batteryController.state.read(onBatteryStateChange); // Instantly get the current value
COBI.batteryController.state.subscribe(onBatteryStateChange);
COBI.batteryController.state.unsubscribe(onBatteryStateChange);
const onBatteryStateChange = (value, timestamp) => {
console.log(value, timestamp);
};
COBI.batteryController.state.read(onBatteryStateChange); // Instantly get the current value
COBI.batteryController.state.subscribe(onBatteryStateChange);
COBI.batteryController.state.unsubscribe(onBatteryStateChange);