diff --git a/src/index.js b/src/index.js index 8d42e8d..01311a0 100644 --- a/src/index.js +++ b/src/index.js @@ -616,6 +616,16 @@ const onPropertyValue = (thingId, name, cb) => { return Promise.resolve(propOutputTopic); }; +const removePropertyValueCallback = (thingId, name) => { + if (!name) { + throw new Error('Invalid property name'); + } + const propOutputTopic = `/a/t/${thingId}/e/o`; + delete propertyCallback[propOutputTopic][name]; + return Promise.resolve(propOutputTopic); +}; + + export default { connect, disconnect, @@ -629,6 +639,7 @@ export default { sendProperty, sendPropertyAsDevice, onPropertyValue, + removePropertyValueCallback, getCborValue, getSenml, ArduinoCloudError,