diff --git a/code/espurna/homeassistant.ino b/code/espurna/homeassistant.ino index 593f4cdb..4074a1bf 100644 --- a/code/espurna/homeassistant.ino +++ b/code/espurna/homeassistant.ino @@ -36,7 +36,7 @@ void _haSendMagnitude(unsigned char i, JsonObject& config) { config["name"] = _haFixName(getSetting("hostname") + String(" ") + magnitudeTopic(type)); config.set("platform", "mqtt"); config["state_topic"] = mqttTopic(magnitudeTopicIndex(i).c_str(), false); - config["unit_of_measurement"] = magnitudeUnits(type); + config["unit_of_measurement"] = "\"" + magnitudeUnits(type) + "\""; }