---
name: "SmartLampAdvancedAbility.convertBrightness"
mode: "api"
versionRequirements:
  - { name: "", version: "1.15.0" }
title: "convertBrightness — convert brightness; with thousandth brightness enabled, returns a value with units, otherwise the raw value."
summary: "Converts brightness; when thousandth brightness is enabled, returns a display value with units."
---

## SmartLampAdvancedAbility.convertBrightness

> [VERSION] v1.15.0+

### Description

Convert brightness value: if the device has the thousandth-level brightness capability enabled, return a display value with unit; otherwise return the raw value and an empty unit.

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `brightness` | `number` | Yes | Raw brightness value (typical range e.g., 10-1000) |

### Return Value

Type: `ConvertValue`

Converted value and unit; unit is an empty string when the advanced capability is not enabled. Depends on a cloud API; network required.

**`type` ConvertValue**

| Property | Type | Description |
| --- | --- | --- |
| `value` | `number` | Value |
| `unit` | `string` | Unit |

### Referenced Types

##### `type` ConvertValue

| Property | Type | Description |
| --- | --- | --- |
| `value` | `number` | Value |
| `unit` | `string` | Unit |


### Examples

#### Example

```typescript
const result = await sdm.lampAdv.convertBrightness(100);
console.log('Brightness:', result.value, result.unit);
```


**Notes**

1. This method detects whether thousandth brightness is enabled.
2. If advanced capability is off, it returns the raw value and an empty unit.
3. Conversion uses a cloud API; network is required.
4. Brightness range is typically 10–1000 (thousandth brightness).
