Docs

Labeled Value

The Labeled Value widget shows a reading with its name beside it, on one line.

Use it when the dashboard has many readings and you want them stacked in rows rather than spread across tiles. The Value Display widget puts the name above the number, this one puts it in front.

SettingWhat it does
Pinthe virtual pin your code writes to
Labelthe name shown before the value
Decimalshow many digits after the point
Unittext appended to the number

Open these from the canvas: tap Edit, then long press the widget and choose Configure.

Example

Three readings in three rows.

labeled-value.ino
#include <PlynxSimpleEsp32.h>

PlynxTimer timer;

void sendReadings()
{
  Plynx.virtualWrite(V29, analogRead(34) * (3.3 / 4095.0) * 100.0);
  Plynx.virtualWrite(V30, analogRead(35) * 100.0 / 4095.0);
  Plynx.virtualWrite(V31, millis() / 60000);
}

void setup()
{
  Serial.begin(115200);

  // Auto setup: WiFi and the Plynx token are configured from the app.
  //
  // To provide them directly in the sketch instead, use:
  //   Plynx.begin(auth, ssid, pass);
  Plynx.begin();

  timer.setInterval(10000L, sendReadings);
}

void loop()
{
  Plynx.run();
  timer.run();
}

The sketch is the same as for a Value widget. Only the layout in the app changes, so you can swap one for the other without touching the code.

Set the unit in the widget rather than building it into the string, or the value stops being a number.

Troubleshooting

ProblemCheck
Widget stays emptynothing calls virtualWrite() on that pin
Label and value overlapshorten the label, or use a wider widget
Too many digitsset Decimals in the widget settings

Next