Represents the external battery condition (Hub or E-bike battery respectively). I.e. charging level in % and status.
constonBatteryStateChange= (value:BatteryCondition, timestamp?:Date) => {console.log(value, timestamp);};COBI.battery.state.read(onBatteryStateChange); // Instantly get the current valueCOBI.battery.state.subscribe(onBatteryStateChange);COBI.battery.state.unsubscribe(onBatteryStateChange);
constonBatteryStateChange= (value, timestamp) => {console.log(value, timestamp);};COBI.battery.state.read(onBatteryStateChange); // Instantly get the current valueCOBI.battery.state.subscribe(onBatteryStateChange);COBI.battery.state.unsubscribe(onBatteryStateChange);