Browse Source

fix(units): correct unit names as requested

pull/356/head
Julian Gog 3 years ago
parent
commit
1e45aa5930
  1. 10
      tools/esp8266/web.cpp

10
tools/esp8266/web.cpp

@ -602,12 +602,12 @@ void web::showJson(void) {
std::pair<String, String> web::convertToPromUnits(String shortUnit) {
if(shortUnit == "A") return {"amplere", "gauge"};
if(shortUnit == "V") return {"volts", "gauge"};
if(shortUnit == "A") return {"ampere", "gauge"};
if(shortUnit == "V") return {"volt", "gauge"};
if(shortUnit == "%") return {"ratio", "gauge"};
if(shortUnit == "W") return {"watts", "gauge"};
if(shortUnit == "Wh") return {"watts_daily", "counter"};
if(shortUnit == "kWh") return {"watts_total", "counter"};
if(shortUnit == "W") return {"watt", "gauge"};
if(shortUnit == "Wh") return {"watt_daily", "counter"};
if(shortUnit == "kWh") return {"watt_total", "counter"};
if(shortUnit == "°C") return {"celsius", "gauge"};
return {"", "gauge"};

Loading…
Cancel
Save