diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index 507fd916..68722f99 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -1458,6 +1458,8 @@ #define HLW8012_CF1_PIN 5 #define HLW8012_CF_PIN 4 + #define HLW8012_VOLTAGE_R_UP ( 2 * 1000000 ) // Upstream voltage resistor + // ----------------------------------------------------------------------------- // Euromate (?) Wifi Stecker Shuko // https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko/p/2291706 diff --git a/code/espurna/homeassistant.ino b/code/espurna/homeassistant.ino index f3a400d1..14be576b 100644 --- a/code/espurna/homeassistant.ino +++ b/code/espurna/homeassistant.ino @@ -26,7 +26,7 @@ void _haSendMagnitude(unsigned char i, JsonObject& config) { config["platform"] = "mqtt"; config["device_class"] = "sensor"; config["state_topic"] = mqttTopic(magnitudeTopicIndex(i).c_str(), false); - config["unit_of_measurement"] = magnitudeUnits(type); + config["unit_of_measurement"] = String("\"") + magnitudeUnits(type) + String("\""); } diff --git a/code/html/index.html b/code/html/index.html index f791a4f3..31619cf5 100644 --- a/code/html/index.html +++ b/code/html/index.html @@ -857,7 +857,7 @@