diff --git a/include/mgos_shadow.h b/include/mgos_shadow.h index 930395f..152db74 100644 --- a/include/mgos_shadow.h +++ b/include/mgos_shadow.h @@ -73,8 +73,8 @@ bool mgos_shadow_get(void); /* * Send an update. Format string should define the value of the "state" key, - * i.e. it should be an object with "reported" and/or "desired" keys, e.g.: - * `mgos_shadow_updatef("{reported:{foo: %d, bar: %d}}", foo, bar)`. + * i.e. it should be an object with an update to the reported state, e.g.: + * `mgos_shadow_updatef("{foo: %d, bar: %d}", foo, bar)`. * Response will arrive via UPDATE_ACCEPTED or REJECTED topic. * If you want the update to be aplied only if a particular version is * current, diff --git a/mjs_fs/api_shadow.js b/mjs_fs/api_shadow.js index ed86ca0..48d3a72 100644 --- a/mjs_fs/api_shadow.js +++ b/mjs_fs/api_shadow.js @@ -37,7 +37,7 @@ let Shadow = { // `CONNECTED` event and report the current state, and b) catch `UPDATE_DELTA` // event, apply the delta, and report the state. Example: // ```javascript - // Shadow.update(0, {reported:{temperature: 12.34}}); + // Shadow.update(0, {temperature: 12.34}); // ``` update: function(version, obj) { this._upd(version, JSON.stringify(obj));