16 433
правки
Строка 275: | Строка 275: | ||
"write": { | "write": { | ||
"cluster": "yourCluster", | "cluster": "yourCluster", | ||
"options": {"manufacturerCode": 26214}, | "options": {"manufacturerCode":26214}, | ||
"payload": { | "payload": { | ||
"yourAttribute": NEW_VALUE | "yourAttribute": NEW_VALUE | ||
Строка 281: | Строка 281: | ||
} | } | ||
} | } | ||
</syntaxhighlight> | |||
Например, включим с помощью wb-rules принудительную калибровку датчика CO2 в устройстве с адресом ''0x842e14fffe8b184e'': | |||
<syntaxhighlight lang="js"> | |||
message = { | |||
"write": { | |||
"cluster": "msCO2", | |||
"options": {"manufacturerCode":26214}, | |||
"payload": { | |||
"sprutCO2Calibration": 1 | |||
} | |||
} | |||
} | |||
publish('zigbee2mqtt/0x842e14fffe8b184e/set', JSON.stringify(message), 2, false); | |||
</syntaxhighlight> | </syntaxhighlight> | ||