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 @@