SmartStorageAbility.set(key: string, value: T)

Requires:
@ray-js/panel-sdk≥1.0.0

Description

Store data for the specified key

Parameters

ParameterTypeRequiredDescription
keystringYesStorage key
valueTYesValue to store; its serialized length must not exceed 900 characters (256 or less is recommended)

Return Value

Type: Promise<boolean>
Storage operation result

Examples

Example

await sdm.storage.set('brightness', 80);
await sdm.storage.set('config', { mode: 'auto', level: 3 });