mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-26 20:23:41 +00:00
Remove stat_cla property from HA discovery message if null
This commit is contained in:
@@ -227,7 +227,8 @@ bool HomeAssistantMqttHandler::publishSystem(HwTools* hw) {
|
||||
VERSION,
|
||||
haManuf.c_str(),
|
||||
haUrl.c_str(),
|
||||
strlen_P(HA_STACL[i]) > 0 ? (char *) FPSTR(HA_STACL[i]) : "null"
|
||||
strlen_P(HA_STACL[i]) > 0 ? ", \"stat_cla\" :" : "",
|
||||
strlen_P(HA_STACL[i]) > 0 ? (char *) FPSTR(HA_STACL[i]) : ""
|
||||
);
|
||||
mqtt->publish(haTopic + haUID + "_" + FPSTR(HA_PARAMS[i]) + "/config", json, true, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user