> For the complete documentation index, see [llms.txt](https://sryvkver.gitbook.io/cobi.bike/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sryvkver.gitbook.io/cobi.bike/namespaces/motor/range.md).

# Range

Defines the range value in km of the eBike.&#x20;

That means how many km you can travel with engine support.

{% tabs %}
{% tab title="Typescript" %}

```typescript
const onRangeChange = (value: number, timestamp?: Date) => {
    console.log(value, timestamp);
};

COBI.motor.range.read(onRangeChange); // Instantly get the current value
COBI.motor.range.subscribe(onRangeChange);
COBI.motor.range.unsubscribe(onRangeChange);
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const onRangeChange = (value, timestamp) => {
    console.log(value, timestamp);
};

COBI.motor.range.read(onRangeChange); // Instantly get the current value
COBI.motor.range.subscribe(onRangeChange);
COBI.motor.range.unsubscribe(onRangeChange);
```

{% endtab %}
{% endtabs %}
