SmartDeviceModel.publishDps(data: Record<string, DpValue>, options?: SendDpOption)
Requires:
@ray-js/panel-sdk≥1.6.0
Description
Control multiple smart device DPs in batch, built on top of ty.device.publishDps
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
data | Record<string, DpValue> | Yes | Key-value pairs of DPs to publish. Keys are DP codes; value types must be derived from the device’s DP schema: bool → boolean, value → number, enum → property.range literal union, bitmap → number, string/raw → string |
| No | Publish options. deviceId and dps are no longer required parameters. SendDpOption is an advanced configuration provided by dp-kit interceptors |
Return Value
Type: Promise<boolean>
Whether the publish was successful
Referenced Types
type
DpValueDatapoint value type, which can be boolean, number, or string.