From f01f2454cc51e6efa497bc4476660bb106d8fd32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Mon, 24 Sep 2018 21:31:42 +0200 Subject: [PATCH] Quote unit_of_measurement is homeassistant module as it might have invalid chars (#1227) --- code/espurna/homeassistant.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) + "\""; }