---
name: "removeTimer"
mode: "kit"
versionRequirements:
  - { name: "DeviceKit", version: "1.2.6" }
platform:
  - "iOS"
  - "Android"
async: true
---

## removeTimer

> [VERSION] DeviceKit >= 1.2.6

> [PLATFORM] iOS, Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Description

Delete timer

### Parameters

| Property | Type | Required | Default | Since | Description |
| --- | --- | --- | --- | --- | --- |
| `deviceId` | `string` | No | - | `1.2.6` | deviceId Device ID; at least one of deviceId or groupId must be provided |
| `groupId` | `string` | No | - | `1.2.6` | groupId Group ID; at least one of deviceId or groupId must be provided |
| `timerId` | `string` | Yes | - | `1.2.6` | timerId Timer ID |
| `complete` | `() => void` | No | - | - | Callback invoked when the API call completes (executed on success or failure) |
| `success` | `() => void` | No | - | - | Callback invoked when the API call succeeds |
| `fail` | `(params: Object) => void` ↓see below | No | - | - | Callback invoked when the API call fails |

#### fail callback parameters

| Property | Type | Description |
| --- | --- | --- |
| `errorMsg` | `string` | Error message |
| `errorCode` | `string \| number` | Error code |
| `innerError` | `Object` | Error extensions |

##### fail(params).innerError properties

| Property | Type | Description |
| --- | --- | --- |
| `errorCode` | `string \| number` | Extended error code |
| `errorMsg` | `string` | Extended error information |


### Examples

#### Demo

```tsx
ty.device.removeTimer({
  deviceId: "vdevo177319884964790",
  timerId: "82818370",
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});
```
