From ff5b0d51658f1da14ba5ed6407fcb2d13ce87222 Mon Sep 17 00:00:00 2001 From: Max Prokhorov Date: Wed, 16 Oct 2019 14:27:25 +0300 Subject: [PATCH] ha: add platform="mqtt" back to the yaml output (#1949) --- code/espurna/homeassistant.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/espurna/homeassistant.ino b/code/espurna/homeassistant.ino index 6a56f0fa..49798791 100644 --- a/code/espurna/homeassistant.ino +++ b/code/espurna/homeassistant.ino @@ -214,6 +214,7 @@ void _haSwitchYaml(unsigned char index, JsonObject& root) { output.reserve(HA_YAML_BUFFER_SIZE); JsonObject& config = root.createNestedObject("config"); + config["platform"] = "mqtt"; _haSendSwitch(index, config); if (index == 0) output += "\n\n" + switchType + ":"; @@ -250,6 +251,7 @@ void _haSensorYaml(unsigned char index, JsonObject& root) { output.reserve(HA_YAML_BUFFER_SIZE); JsonObject& config = root.createNestedObject("config"); + config["platform"] = "mqtt"; _haSendMagnitude(index, config); if (index == 0) output += "\n\nsensor:";