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.batteryTwo.state.read(onBatteryStateChange); // Instantly get the current valueCOBI.batteryTwo.state.subscribe(onBatteryStateChange);COBI.batteryTwo.state.unsubscribe(onBatteryStateChange);
constonBatteryStateChange= (value, timestamp) => {console.log(value, timestamp);};COBI.batteryTwo.state.read(onBatteryStateChange); // Instantly get the current valueCOBI.batteryTwo.state.subscribe(onBatteryStateChange);COBI.batteryTwo.state.unsubscribe(onBatteryStateChange);