CardsTemperature

Temperature Card

Preview

A specialized display card featuring a temperature icon and customizable symbol appending capability. Designed for presenting temperature-related data with visual indicators on the dashboard.

Initializer

/* 
  Temperature Card
  Valid Arguments: (ESPDash dashboard, Card Type, const char* name, const char* symbol (optional) )
*/
Card card1(&dashboard, TEMPERATURE_CARD, "Temperature1", "°C");

Callback

💡

Temperature card doesn’t require any callback.


Updater

card1.update(int value);
card1.update(float value);
card1.update(String value);

Or you can also update the symbol along with the value like this:

card1.update(value, "°F");

Reference

This is a reference sketch showing positions for intializer and updater.

 
...
 
/* Temperature card initializer */
Card temperature(&dashboard, TEMPERATURE_CARD, "Temperature1");
 
 
void setup() {
  ...
 
  /* Temperature card updater - can be used anywhere (apart from global scope) */
  temperature.update(100);
}
 
void loop() {
  ...
}
 
Copyright © 2024 Softt. All rights reserved.