Browse Source

ha: add platform="mqtt" back to the yaml output (#1949)

master
Max Prokhorov 5 years ago
committed by GitHub
parent
commit
ff5b0d5165
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      code/espurna/homeassistant.ino

+ 2
- 0
code/espurna/homeassistant.ino View File

@ -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:";


Loading…
Cancel
Save