---
name: "offDeviceStatusChange"
mode: "api"
versionRequirements:
  - { name: "@ray-js/lock-sdk", version: "1.0.0" }
title: "offDeviceStatusChange - Unregister device status change event."
summary: "Unregister device status change event."
---

## offDeviceStatusChange

> [VERSION] @ray-js/lock-sdk >= 1.0.0

### Description

Unsubscribe from device status changes (must use the same callback reference as when subscribing).

### Parameters

`(callback: Function)`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `callback` | `(status: DeviceStatus) => void` | Yes | Same reference as used when subscribing |

### Return Value

None


### Referenced Types

##### `interface` DeviceStatus

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | `"offline" \| "online" \| "sleep"` | Yes | Overall status: online / offline / sleep |
| `connectEnable` | `boolean` | Yes | Whether users are allowed to initiate connections manually (e.g., BLE) |
| `onlineTypes` | `"local" \| "cloud" \| "ble" \| "localMatter" \| "yuChannel" \| "unknown"[]` | Yes | Online channel list (bit semantics expanded by the platform into an array) local LAN online cloud Cloud online ble Bluetooth online localMatter Matter LAN online yuChannel Cloud Bridge online unknown Unknown |
| `sleepPeriod` | `Object` | No | Sleep window (sleep only) |
| `isWifiActive` | `boolean` | Yes | Whether the Wi‑Fi module is powered on and operating |
| `isWifiMatter` | `boolean` | Yes | Whether Matter over Wi‑Fi is supported |
| `isActiveThread` | `boolean` | Yes | Whether the Thread channel is enabled |
| `isShareThread` | `boolean` | Yes | Whether it is a shared Thread device |

##### `type` DeviceStatus.sleepPeriod

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `start` | `number` | Yes | Start |
| `end` | `number` | Yes | End |


### Examples

```ts
import { offDeviceStatusChange } from '@ray-js/lock-sdk';
offDeviceStatusChange((status) => {
  console.log(status);
});
```
