add %fieldname
This commit is contained in:
@@ -48,8 +48,10 @@
|
||||
# Available as "%type_map".
|
||||
|
||||
# 6. other field specific variables for each field (only once for each message if the topic is field specific):
|
||||
# %index the field index (excluding ignored fields).
|
||||
# %field the field name (or the field index if no name is defined or the names are not unique in the message).
|
||||
# %index the numeric field index (excluding ignored fields).
|
||||
# %field the field name and key for JSON objects (equals the field index if no name is defined or the names are not
|
||||
# unique in the message).
|
||||
# %fieldname the field name (and nothing else like in %field, might be empty though!)
|
||||
# %type the field type (one of "number", "list", "string", "date", "time", or "datetime").
|
||||
# %basetype the base data type ID (e.g. "UCH").
|
||||
# %comment the field comment (if any).
|
||||
|
||||
@@ -42,8 +42,10 @@
|
||||
# Available as "%type_map".
|
||||
|
||||
# 6. other field specific variables for each field (only once for each message if the topic is field specific):
|
||||
# %index the field index (excluding ignored fields).
|
||||
# %field the field name (or the field index if no name is defined or the names are not unique in the message).
|
||||
# %index the numeric field index (excluding ignored fields).
|
||||
# %field the field name and key for JSON objects (equals the field index if no name is defined or the names are not
|
||||
# unique in the message).
|
||||
# %fieldname the field name (and nothing else like in %field, might be empty though!)
|
||||
# %type the field type (one of "number", "list", "string", "date", "time", or "datetime").
|
||||
# %basetype the base data type ID (e.g. "UCH").
|
||||
# %comment the field comment (if any).
|
||||
|
||||
@@ -1439,6 +1439,7 @@ void MqttHandler::run() {
|
||||
MqttReplacers values = msgValues; // need a copy here as the contents are manipulated
|
||||
values.set("index", static_cast<signed>(index));
|
||||
values.set("field", fieldName);
|
||||
values.set("fieldname", field->getName(-1));
|
||||
values.set("type", typeStr);
|
||||
values.set("type_map", str);
|
||||
values.set("basetype", dataType->getId());
|
||||
|
||||
Reference in New Issue
Block a user