|
@ -391,9 +391,9 @@ class PubMqtt { |
|
|
const char *devCls, *stateCls; |
|
|
const char *devCls, *stateCls; |
|
|
if (!total) { |
|
|
if (!total) { |
|
|
if (rec->assign[mDiscovery.sub].ch == CH0) |
|
|
if (rec->assign[mDiscovery.sub].ch == CH0) |
|
|
snprintf(name, 32, "%s %s", iv->config->name, iv->getFieldName(mDiscovery.sub, rec)); |
|
|
snprintf(name, 32, "%s %s", iv->getFieldName(mDiscovery.sub, rec)); |
|
|
else |
|
|
else |
|
|
snprintf(name, 32, "%s CH%d %s", iv->config->name, rec->assign[mDiscovery.sub].ch, iv->getFieldName(mDiscovery.sub, rec)); |
|
|
snprintf(name, 32, "CH%d_%s", rec->assign[mDiscovery.sub].ch, iv->getFieldName(mDiscovery.sub, rec)); |
|
|
snprintf(topic, 64, "/ch%d/%s", rec->assign[mDiscovery.sub].ch, iv->getFieldName(mDiscovery.sub, rec)); |
|
|
snprintf(topic, 64, "/ch%d/%s", rec->assign[mDiscovery.sub].ch, iv->getFieldName(mDiscovery.sub, rec)); |
|
|
snprintf(uniq_id, 32, "ch%d_%s", rec->assign[mDiscovery.sub].ch, iv->getFieldName(mDiscovery.sub, rec)); |
|
|
snprintf(uniq_id, 32, "ch%d_%s", rec->assign[mDiscovery.sub].ch, iv->getFieldName(mDiscovery.sub, rec)); |
|
|
|
|
|
|
|
|