use %fieldname

This commit is contained in:
John
2022-02-06 01:16:43 +01:00
parent 02b04fe8ce
commit f772a1c834
+1 -1
View File
@@ -256,7 +256,7 @@ definition-topic ?= %haprefix/%type_topic/%{TOPIC}_%FIELD/config
# HA integration: this is the config topic payload for HA's MQTT discovery.
definition-payload = {
"unique_id":"%{TOPIC}_%FIELD",
"name":"%prefixn %circuit %name %field",
"name":"%prefixn %circuit %name %fieldname",
"device":%circuit_part,
"value_template":"{{value_json[\"%field\"].value}}",
"state_topic":"%topic"%field_payload