|
|
@ -44,6 +44,7 @@ void _haSendMagnitudes() { |
|
|
|
JsonObject& config = jsonBuffer.createObject(); |
|
|
|
_haSendMagnitude(i, config); |
|
|
|
config.printTo(output); |
|
|
|
jsonBuffer.clear(); |
|
|
|
} |
|
|
|
|
|
|
|
mqttSendRaw(topic.c_str(), output.c_str()); |
|
|
@ -123,6 +124,7 @@ void _haSendSwitches() { |
|
|
|
JsonObject& config = jsonBuffer.createObject(); |
|
|
|
_haSendSwitch(i, config); |
|
|
|
config.printTo(output); |
|
|
|
jsonBuffer.clear(); |
|
|
|
} |
|
|
|
|
|
|
|
mqttSendRaw(topic.c_str(), output.c_str()); |
|
|
@ -163,6 +165,8 @@ String _haGetConfig() { |
|
|
|
} |
|
|
|
output += "\n"; |
|
|
|
|
|
|
|
jsonBuffer.clear(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#if SENSOR_SUPPORT
|
|
|
@ -186,6 +190,8 @@ String _haGetConfig() { |
|
|
|
} |
|
|
|
output += "\n"; |
|
|
|
|
|
|
|
jsonBuffer.clear(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endif
|
|
|
|