Ledger
set() [Ledger class]
Sets a value in the ledger. The data is saved to local flash storage immediately, but will be synchronized to the cloud at a later time.
// PROTOTYPE
int set(const LedgerData& data, SetMode mode = SetMode::REPLACE);
// EXAMPLE
Variant data;
data.set("sensor", sensorValue);
data.set("time", Time.format(TIME_FORMAT_ISO8601_FULL));
sensors.set(data);
While the parameter data
is a LedgerData
object, you will typically pass a Variant
. See Ledger sensor for the full example.
See SetMode, below, for valid values.