---
name: "SmartGroupModel.getDpState"
mode: "api"
versionRequirements:
  - { name: "@ray-js/panel-sdk", version: "1.5.0" }
title: "getDpState"
---

## SmartGroupModel.getDpState

> [VERSION] @ray-js/panel-sdk >= 1.5.0

### Description

Get smart group DP states

### Parameters

None


### Return Value

Type: `DpState`

Full DP state object where the key is the DP code and the value type is inferred from the Schema

**`type` DpState**

```typescript
export type DpState = Record<string, DpValue>;
```

### Referenced Types

##### `type` DpState

Datapoint status object, where the key is the datapoint code and the value is the datapoint value.

```typescript
export type DpState = Record<string, DpValue>;
```

##### `type` DpValue

Datapoint value type, which can be boolean, number, or string.

```typescript
export type DpValue = boolean | number | string;
```


### Examples

#### Example

```typescript
const dpState = group.getDpState();
console.log(dpState.switch_led);  // true
```
