From 1e45aa59305c69aa09c309b222e35f4f579b163a Mon Sep 17 00:00:00 2001 From: Julian Gog Date: Fri, 11 Nov 2022 07:20:13 +0100 Subject: [PATCH] fix(units): correct unit names as requested --- tools/esp8266/web.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/esp8266/web.cpp b/tools/esp8266/web.cpp index ce318afc..0aa6a4c4 100644 --- a/tools/esp8266/web.cpp +++ b/tools/esp8266/web.cpp @@ -602,12 +602,12 @@ void web::showJson(void) { std::pair 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"};